AbstractPaymentService
internal.internal.AbstractPaymentService
This will be
Deprecated
in the near future use the AbstractPaymentProcessor instead
Implements
Properties
__configModule__Record<string, unknown>__container__anyRequired__moduleDeclaration__Record<string, unknown>manager_EntityManagerRequiredtransactionManager_undefined | EntityManagerRequiredidentifierstringRequiredAccessors
activeManager_
Protected get activeManager_(): EntityManager
Returns
EntityManager
EntityManagerEntityManagerRequiredImplementation of
PaymentService.activeManager_
Inherited from
TransactionBaseService.activeManager_
Methods
atomicPhase_
Protected atomicPhase_<TResult, TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>
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.
TResultobjectRequiredTErrorobjectRequiredParameters
work(transactionManager: EntityManager) => Promise<TResult>RequiredisolationOrErrorHandlerIsolationLevel | (error: TError) => Promise<void | TResult>maybeErrorHandlerOrDontFail(error: TError) => Promise<void | TResult>Returns
Promise<TResult>
PromisePromise<TResult>RequiredImplementation of
Inherited from
TransactionBaseService.atomicPhase_
authorizePayment
Abstract authorizePayment(paymentSession, context): Promise<{ data: Data ; status: PaymentSessionStatus }>
Parameters
Returns
Promise<{ data: Data ; status: PaymentSessionStatus }>
Deprecated
Implementation of
PaymentService.authorizePayment
cancelPayment
Abstract cancelPayment(payment): Promise<Data>
This will be
Parameters
Returns
Promise<Data>
Deprecated
in the near future
Implementation of
capturePayment
Abstract capturePayment(payment): Promise<Data>
This will be
Parameters
Returns
Promise<Data>
Deprecated
in the near future
Implementation of
createPayment
Abstract createPayment(context): Promise<PaymentSessionResponse>
Parameters
Returns
Promise<PaymentSessionResponse>
Implementation of
Abstract createPayment(cart): Promise<Data>
This will be
Parameters
Returns
Promise<Data>
Deprecated
in the near future use createPayment(context: Cart & PaymentContext): Promise<PaymentSessionResponse> instead
Implementation of
deletePayment
Abstract deletePayment(paymentSession): Promise<void>
This will be
Parameters
Returns
Promise<void>
PromisePromise<void>RequiredDeprecated
in the near future
Implementation of
getIdentifier
getIdentifier(): string
Returns
string
stringstringImplementation of
getPaymentData
Abstract getPaymentData(paymentSession): Promise<Data>
Parameters
Returns
Promise<Data>
Deprecated
Implementation of
getStatus
Abstract getStatus(data): Promise<PaymentSessionStatus>
This will be
Parameters
Returns
Promise<PaymentSessionStatus>
Deprecated
in the near future
Implementation of
refundPayment
Abstract refundPayment(payment, refundAmount): Promise<Data>
This will be
Parameters
refundAmountnumberRequiredReturns
Promise<Data>
Deprecated
in the near future
Implementation of
retrievePayment
Abstract retrievePayment(paymentData): Promise<Data>
Parameters
Returns
Promise<Data>
Deprecated
Implementation of
PaymentService.retrievePayment
retrieveSavedMethods
retrieveSavedMethods(customer): Promise<Data[]>
This will be
Parameters
Returns
Promise<Data[]>
Deprecated
in the near future
Implementation of
PaymentService.retrieveSavedMethods
shouldRetryTransaction_
Protected shouldRetryTransaction_(err): boolean
Parameters
errRecord<string, unknown> | { code: string }RequiredReturns
boolean
booleanbooleanImplementation of
PaymentService.shouldRetryTransaction_
Inherited from
TransactionBaseService.shouldRetryTransaction_
updatePayment
Abstract updatePayment(paymentSessionData, context): Promise<Record<string, unknown> | PaymentSessionResponse>
Parameters
Returns
Promise<Record<string, unknown> | PaymentSessionResponse>
it return either a PaymentSessionResponse or PaymentSessionResponse["session_data"] to maintain backward compatibility
Implementation of
Abstract updatePayment(paymentSessionData, cart): Promise<Data>
This will be
Parameters
Returns
Promise<Data>
Deprecated
in the near future use updatePayment(paymentSessionData: PaymentSessionData, context: Cart & PaymentContext): Promise<PaymentSessionResponse> instead
Implementation of
updatePaymentData
Abstract updatePaymentData(paymentSessionData, data): Promise<Data>
Parameters
Returns
Promise<Data>
Deprecated
Implementation of
PaymentService.updatePaymentData
withTransaction
withTransaction(transactionManager?): AbstractPaymentService
Parameters
transactionManagerEntityManagerReturns
Implementation of
PaymentService.withTransaction