wip: session methods
This commit is contained in:
1 parent
fbd3fedb68
commit
66ec3d0931
3 files changed
+28
-1
No files matched your search
@@ -63,6 +63,9 @@ export default class Payment {
|
|||||||
@Property({ columnType: "text", nullable: true })
|
@Property({ columnType: "text", nullable: true })
|
||||||
order_id: string | null
|
order_id: string | null
|
||||||
|
|
||||||
|
@Property({ columnType: "text", nullable: true })
|
||||||
|
order_edit_id: string | null
|
||||||
|
|
||||||
@Property({ columnType: "text", nullable: true })
|
@Property({ columnType: "text", nullable: true })
|
||||||
customer_id: string | null
|
customer_id: string | null
|
||||||
|
|
||||||
|
|||||||
@@ -14,11 +14,15 @@ export interface CreatePaymentDTO {
|
|||||||
|
|
||||||
cart_id?: string
|
cart_id?: string
|
||||||
order_id?: string
|
order_id?: string
|
||||||
|
order_edit_id?: string
|
||||||
customer_id?: string
|
customer_id?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UpdatePaymentDTO {
|
export interface UpdatePaymentDTO {
|
||||||
cart_id?: string
|
cart_id?: string
|
||||||
order_id?: string
|
order_id?: string
|
||||||
|
order_edit_id?: string
|
||||||
customer_id?: string
|
customer_id?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CreatePaymentSessionDTO {}
|
||||||
@@ -3,6 +3,7 @@ import { Context } from "../shared-context"
|
|||||||
import {
|
import {
|
||||||
CreatePaymentCollectionDTO,
|
CreatePaymentCollectionDTO,
|
||||||
CreatePaymentDTO,
|
CreatePaymentDTO,
|
||||||
|
CreatePaymentSessionDTO,
|
||||||
UpdatePaymentCollectionDTO,
|
UpdatePaymentCollectionDTO,
|
||||||
UpdatePaymentDTO,
|
UpdatePaymentDTO,
|
||||||
} from "./mutations"
|
} from "./mutations"
|
||||||
@@ -69,6 +70,8 @@ export interface IPaymentModuleService extends IModuleService {
|
|||||||
sharedContext?: Context
|
sharedContext?: Context
|
||||||
): Promise<PaymentCollectionDTO>
|
): Promise<PaymentCollectionDTO>
|
||||||
|
|
||||||
|
/* ********** PAYMENTS ********** */
|
||||||
|
|
||||||
createPayment(data: CreatePaymentDTO): Promise<PaymentDTO>
|
createPayment(data: CreatePaymentDTO): Promise<PaymentDTO>
|
||||||
|
|
||||||
capturePayment(paymentId: string, amount: number): Promise<PaymentDTO>
|
capturePayment(paymentId: string, amount: number): Promise<PaymentDTO>
|
||||||
@@ -76,5 +79,22 @@ export interface IPaymentModuleService extends IModuleService {
|
|||||||
|
|
||||||
updatePayment(data: UpdatePaymentDTO): Promise<PaymentDTO>
|
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