Update remote soul-content with local content
This commit is contained in:
26
lib/modules/payment/types.ts
Normal file
26
lib/modules/payment/types.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
export type PaymentStatus = 'pending' | 'success' | 'failed' | 'refunded';
|
||||
|
||||
export interface Order {
|
||||
id: string;
|
||||
userId: string;
|
||||
amount: number;
|
||||
currency: string;
|
||||
status: PaymentStatus;
|
||||
items: OrderItem[];
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export interface OrderItem {
|
||||
id: string;
|
||||
productId: string;
|
||||
productType: 'section' | 'full_book' | 'membership';
|
||||
quantity: number;
|
||||
price: number;
|
||||
}
|
||||
|
||||
export interface PaymentProvider {
|
||||
name: string;
|
||||
createOrder(order: Order): Promise<{ payUrl: string; orderId: string }>;
|
||||
checkStatus(orderId: string): Promise<PaymentStatus>;
|
||||
}
|
||||
Reference in New Issue
Block a user