wip: service
This commit is contained in:
@@ -1,3 +1,24 @@
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
|
||||
export interface CreatePaymentCollectionDTO {}
|
||||
|
||||
export interface UpdatePaymentCollectionDTO {}
|
||||
|
||||
export interface CreatePaymentDTO {
|
||||
amount: number
|
||||
currency_code: string
|
||||
provider_id: string
|
||||
data: Record<string, unknown>
|
||||
|
||||
cart_id?: string
|
||||
order_id?: string
|
||||
customer_id?: string
|
||||
}
|
||||
|
||||
export interface UpdatePaymentDTO {
|
||||
cart_id?: string
|
||||
order_id?: string
|
||||
customer_id?: string
|
||||
}
|
||||
|
||||
@@ -2,7 +2,9 @@ import { IModuleService } from "../modules-sdk"
|
||||
import { Context } from "../shared-context"
|
||||
import {
|
||||
CreatePaymentCollectionDTO,
|
||||
CreatePaymentDTO,
|
||||
UpdatePaymentCollectionDTO,
|
||||
UpdatePaymentDTO,
|
||||
} from "./mutations"
|
||||
import {
|
||||
FilterablePaymentCollectionProps,
|
||||
@@ -67,8 +69,12 @@ export interface IPaymentModuleService extends IModuleService {
|
||||
sharedContext?: Context
|
||||
): Promise<PaymentCollectionDTO>
|
||||
|
||||
capturePayment(paymentId: string): Promise<PaymentDTO>
|
||||
refundPayment(paymentId: string): Promise<PaymentDTO>
|
||||
createPayment(data: CreatePaymentDTO): Promise<PaymentDTO>
|
||||
|
||||
createPayment()
|
||||
capturePayment(paymentId: string, amount: number): Promise<PaymentDTO>
|
||||
refundPayment(paymentId: string, amount: number): Promise<PaymentDTO>
|
||||
|
||||
updatePayment(data: UpdatePaymentDTO): Promise<PaymentDTO>
|
||||
|
||||
// TODO: PaymentSession methods
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user