This will be
Deprecated
in the near future use the AbstractPaymentProcessor instead
Implements
Properties
__configModule__
Record<string, unknown>
__moduleDeclaration__
Record<string, unknown>
manager_
EntityManagerRequired
transactionManager_
undefined | EntityManagerRequired
Accessors
activeManager_
Returns
EntityManager
EntityManagerRequired
Methods
atomicPhase_
Wraps some work within a transactional block. If the service already has
a transaction manager attached this will be reused, otherwise a new
transaction manager is created.
Parameters
work
(transactionManager: EntityManager) => Promise<TResult>Required
the transactional work to be done
isolationOrErrorHandler
IsolationLevel | (error: TError) => Promise<void | TResult>
the isolation level to be used for the work.
maybeErrorHandlerOrDontFail
(error: TError) => Promise<void | TResult>
Potential error handler
Returns
Promise
Promise<TResult>Required
the result of the transactional work
authorizePayment
Parameters
A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections.
Returns
Deprecated
cancelPayment
This will be
Parameters
A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.
Returns
Promise
Promise<Data>Required
Deprecated
in the near future
capturePayment
This will be
Parameters
A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.
Returns
Promise
Promise<Data>Required
Deprecated
in the near future
createPayment
Abstract **createPayment**(context): Promise<[PaymentSessionResponse](/references/js-client/internal/types/internal.internal.PaymentSessionResponse)>
Parameters
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
Returns
Abstract **createPayment**(cart): Promise<[Data](/references/js-client/internal/types/internal.internal.Data)>
This will be
Parameters
Returns
Promise
Promise<Data>Required
Deprecated
in the near future use createPayment(context: Cart & PaymentContext): Promise<PaymentSessionResponse>
instead
deletePayment
This will be
Parameters
A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections.
Returns
Promise
Promise<void>Required
Deprecated
in the near future
getIdentifier
Returns
getPaymentData
Parameters
A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections.
Returns
Promise
Promise<Data>Required
Deprecated
getStatus
This will be
Parameters
Returns
Deprecated
in the near future
refundPayment
This will be
Parameters
A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.
refundAmount
numberRequired
Returns
Promise
Promise<Data>Required
Deprecated
in the near future
retrievePayment
Parameters
Returns
Promise
Promise<Data>Required
Deprecated
retrieveSavedMethods
This will be
Parameters
A customer can make purchases in your store and manage their profile.
Returns
Promise
Promise<Data[]>Required
Deprecated
in the near future
shouldRetryTransaction_
Parameters
err
Record<string, unknown> | { code: string }Required
Returns
updatePayment
Abstract **updatePayment**(paymentSessionData, context): Promise<Record<string, unknown> \| [PaymentSessionResponse](/references/js-client/internal/types/internal.internal.PaymentSessionResponse)>
Parameters
paymentSessionData
DataRequiredThe 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
Returns
it return either a PaymentSessionResponse or PaymentSessionResponse["session_data"] to maintain backward compatibility
Abstract **updatePayment**(paymentSessionData, cart): Promise<[Data](/references/js-client/internal/types/internal.internal.Data)>
This will be
Parameters
paymentSessionData
DataRequired
Returns
Promise
Promise<Data>Required
Deprecated
in the near future use updatePayment(paymentSessionData: PaymentSessionData, context: Cart & PaymentContext): Promise<PaymentSessionResponse>
instead
updatePaymentData
Parameters
paymentSessionData
DataRequired
Returns
Promise
Promise<Data>Required
Deprecated
withTransaction
Parameters
transactionManager
EntityManager
Returns