UNPKG

@pisell/pisellos

Version:

一个可扩展的前端模块化SDK框架,支持插件系统

17 lines (16 loc) 818 B
import { Module, PisellCore, ModuleOptions } from '../../types'; import { BaseModule } from '../BaseModule'; import { Payment, PaymentModuleAPI, PaymentMethod, PaymentStatus } from './types'; export declare class PaymentModule extends BaseModule implements Module, PaymentModuleAPI { protected defaultName: string; protected defaultVersion: string; private state; constructor(name?: string, version?: string); initialize(core: PisellCore, options?: ModuleOptions): Promise<void>; processPayment(paymentId: string): Promise<void>; getPayment(paymentId: string): Promise<Payment>; getPaymentHistory(): Promise<Payment[]>; refund(paymentId: string): Promise<void>; getAvailablePaymentMethods(): PaymentMethod[]; checkPaymentStatus(paymentId: string): Promise<PaymentStatus>; }