feat(medusa): manage payment sessions from payment collection (#2402)
* feat: manage payment sessions from payment collection
This commit is contained in:
1 parent
a014e3623c
commit
c3f8297599
28 files changed
+2002
-1315
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
PaymentSessionStatus,
|
||||
} from "../models"
|
||||
import { PaymentService } from "medusa-interfaces"
|
||||
import { PaymentProviderDataInput } from "../types/payment-collection"
|
||||
|
||||
export type Data = Record<string, unknown>
|
||||
export type PaymentData = Data
|
||||
@@ -76,6 +77,9 @@ export abstract class AbstractPaymentService
|
||||
): Promise<PaymentSessionData>
|
||||
|
||||
public abstract createPayment(cart: Cart): Promise<PaymentSessionData>
|
||||
public abstract createPaymentNew(
|
||||
paymentInput: PaymentProviderDataInput
|
||||
): Promise<PaymentSessionData>
|
||||
|
||||
public abstract retrievePayment(paymentData: PaymentData): Promise<Data>
|
||||
|
||||
@@ -84,6 +88,11 @@ export abstract class AbstractPaymentService
|
||||
cart: Cart
|
||||
): Promise<PaymentSessionData>
|
||||
|
||||
public abstract updatePaymentNew(
|
||||
paymentSessionData: PaymentSessionData,
|
||||
paymentInput: PaymentProviderDataInput
|
||||
): Promise<PaymentSessionData>
|
||||
|
||||
public abstract authorizePayment(
|
||||
paymentSession: PaymentSession,
|
||||
context: Data
|
||||
|
||||
Reference in new issue
Block a user