wip: session methods

This commit is contained in:
fPolic committed 2024-01-15 18:40:05 +01:00
1 parent fbd3fedb68
commit 66ec3d0931
3 files changed
+28 -1

No files matched your search

+4
View File
@@ -14,11 +14,15 @@ export interface CreatePaymentDTO {
cart_id?: string
order_id?: string
order_edit_id?: string
customer_id?: string
}
export interface UpdatePaymentDTO {
cart_id?: string
order_id?: string
order_edit_id?: string
customer_id?: string
}
export interface CreatePaymentSessionDTO {}
+21 -1
View File
@@ -3,6 +3,7 @@ import { Context } from "../shared-context"
import {
CreatePaymentCollectionDTO,
CreatePaymentDTO,
CreatePaymentSessionDTO,
UpdatePaymentCollectionDTO,
UpdatePaymentDTO,
} from "./mutations"
@@ -69,6 +70,8 @@ export interface IPaymentModuleService extends IModuleService {
sharedContext?: Context
): Promise<PaymentCollectionDTO>
/* ********** PAYMENTS ********** */
createPayment(data: CreatePaymentDTO): Promise<PaymentDTO>
capturePayment(paymentId: string, amount: number): Promise<PaymentDTO>
@@ -76,5 +79,22 @@ export interface IPaymentModuleService extends IModuleService {
updatePayment(data: UpdatePaymentDTO): Promise<PaymentDTO>
// TODO: PaymentSession methods
/* ********** PAYMENT SESSIONS ********** */
createPaymentSession(
paymentCollectionId: string,
data: CreatePaymentSessionDTO
): Promise<PaymentCollectionDTO>
authorizePaymentSessions(
paymentCollectionId: string,
sessionIds: string[]
): Promise<PaymentCollectionDTO>
completePaymentSessions(
paymentCollectionId: string,
sessionIds: string[]
): Promise<PaymentCollectionDTO>
// TODO: PaymentSession set session
}