import { daffCartPaymentProcessorUpdate } from '@daffodil/cart/state'
Performs a payment update on the current cart.
function daffCartPaymentProcessorUpdate<Cart extends DaffCart = DaffCart, Request extends DaffPaymentRequest = DaffPaymentRequest, Response extends DaffPaymentResponse = DaffPaymentResponse, Success = unknown, PaymentFailure = unknown, UpdateFailure = unknown>(
payload: DaffPaymentGenerateTokenPayload<Request>
deps: { cartDriver: DaffCartPaymentServiceInterface<Cart>; paymentDriver: DaffPaymentDriverInterface<Response>; cartResolver: DaffCartDriverResolveService<...>; }
cbs: { success: (resp: Cart) => any; paymentFailure: (errors: DaffError[]) => any; updateFailure: (errors: DaffError[]) => any; }
): any
Parameter | payload: DaffPaymentGenerateTokenPayload |
---|---|
Description | The generate token request. |
Parameter | deps: { cartDriver: DaffCartPaymentServiceInterface<Cart>; paymentDriver: DaffPaymentDriverInterface |
---|---|
Description | DI deps. |
Parameter | cbs: { success: (resp: Cart) => any; paymentFailure: (errors: DaffError[]) => any; updateFailure: (errors: DaffError[]) => any; } |
---|---|
Description | Return the actions and/or perform custom behavior in response to each particular case. |