PaymentMethodConfigOptions
PaymentMethodConfigOptions
Defines the object which is used to construct the PaymentMethodHandler.
Signature
interface PaymentMethodConfigOptions<T extends ConfigArgs> extends ConfigurableOperationDefOptions<T> {
createPayment: CreatePaymentFn<T>;
settlePayment: SettlePaymentFn<T>;
cancelPayment?: CancelPaymentFn<T>;
createRefund?: CreateRefundFn<T>;
onStateTransitionStart?: OnTransitionStartFn<PaymentState, PaymentTransitionData>;
}
Extends
Members
createPayment
CreatePaymentFn<T>
settlePayment
SettlePaymentFn<T>
createPayment()
method returns with a state of 'Settled'
) this method
need only return { success: true }
.
cancelPayment
cancelPayment
mutation in the Admin API. Cancelling a payment can apply
if, for example, you have created a “payment intent” with the payment provider but not yet
completed the payment. It allows the incomplete payment to be cleaned up on the provider’s end
if it gets cancelled via Vendure.
createRefund
CreateRefundFn<T>
onStateTransitionStart
boolean
) is used to determine whether the transition is permitted.