fix: Allow setting the status of a payment session when updating (#12809)

This commit is contained in:
Stevche Radevski
2025-06-24 13:15:10 +02:00
committed by GitHub
parent 474e97c9be
commit c0807f5496
6 changed files with 52 additions and 14 deletions

View File

@@ -38,6 +38,11 @@ export interface CreatePaymentSessionStepInput {
* Learn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/payment/payment-session#data-property).
*/
data?: Record<string, unknown>
/**
* Holds custom data in key-value pairs.
*/
metadata?: Record<string, unknown>
}
export const createPaymentSessionStepId = "create-payment-session"
@@ -57,6 +62,7 @@ export const createPaymentSessionStep = createStep(
amount: input.amount,
data: input.data ?? {},
context: input.context,
metadata: input.metadata ?? {},
}
)