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 | EntityManagerRequiredidentifier
stringRequiredAccessors
activeManager_
Protected
get
activeManager_(): EntityManager
Returns
EntityManager
EntityManager
EntityManagerRequiredImplementation 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.
TResult
objectRequiredTError
objectRequiredParameters
work
(transactionManager: EntityManager) => Promise<TResult>RequiredisolationOrErrorHandler
IsolationLevel | (error: TError) => Promise<void | TResult>maybeErrorHandlerOrDontFail
(error: TError) => Promise<void | TResult>Returns
Promise
<TResult
>
Promise
Promise<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
>
Promise
Promise<void>RequiredDeprecated
in the near future
Implementation of
getIdentifier
getIdentifier(): string
Returns
string
string
stringImplementation 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
refundAmount
numberRequiredReturns
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
err
Record<string, unknown> | { code: string }RequiredReturns
boolean
boolean
booleanImplementation 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
transactionManager
EntityManagerReturns
Implementation of
PaymentService.withTransaction