wip: service
This commit is contained in:
@@ -1,3 +1,24 @@
|
|||||||
|
/**
|
||||||
|
* TODO
|
||||||
|
*/
|
||||||
|
|
||||||
export interface CreatePaymentCollectionDTO {}
|
export interface CreatePaymentCollectionDTO {}
|
||||||
|
|
||||||
export interface UpdatePaymentCollectionDTO {}
|
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 { Context } from "../shared-context"
|
||||||
import {
|
import {
|
||||||
CreatePaymentCollectionDTO,
|
CreatePaymentCollectionDTO,
|
||||||
|
CreatePaymentDTO,
|
||||||
UpdatePaymentCollectionDTO,
|
UpdatePaymentCollectionDTO,
|
||||||
|
UpdatePaymentDTO,
|
||||||
} from "./mutations"
|
} from "./mutations"
|
||||||
import {
|
import {
|
||||||
FilterablePaymentCollectionProps,
|
FilterablePaymentCollectionProps,
|
||||||
@@ -67,8 +69,12 @@ export interface IPaymentModuleService extends IModuleService {
|
|||||||
sharedContext?: Context
|
sharedContext?: Context
|
||||||
): Promise<PaymentCollectionDTO>
|
): Promise<PaymentCollectionDTO>
|
||||||
|
|
||||||
capturePayment(paymentId: string): Promise<PaymentDTO>
|
createPayment(data: CreatePaymentDTO): Promise<PaymentDTO>
|
||||||
refundPayment(paymentId: string): 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