feat(medusa): Update payment session management (#2937)

This commit is contained in:
Adrien de Peretti
2023-01-10 16:33:24 +01:00
committed by GitHub
parent 71fa60892c
commit cac81749ea
11 changed files with 464 additions and 241 deletions
@@ -195,11 +195,12 @@ export abstract class AbstractPaymentService
* @param paymentSessionData
* @param context The type of this argument is meant to be temporary and once the previous method signature
* will be removed, the type will only be PaymentContext instead of Cart & PaymentContext
* @return it return either a PaymentSessionResponse or PaymentSessionResponse["session_data"] to maintain backward compatibility
*/
public abstract updatePayment(
paymentSessionData: PaymentSessionData,
context: Cart & PaymentContext
): Promise<PaymentSessionResponse>
): Promise<PaymentSessionResponse | PaymentSessionResponse["session_data"]>
/**
* @deprecated use updatePayment(paymentSessionData: PaymentSessionData, context: Cart & PaymentContext): Promise<PaymentSessionResponse> instead