wip: session methods
This commit is contained in:
@@ -63,6 +63,9 @@ export default class Payment {
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
order_id: string | null
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
order_edit_id: string | null
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
customer_id: string | null
|
||||
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user