AbstractPaymentService
This will be
Deprecated
in the near future use the AbstractPaymentProcessor instead
Implements
Constructors
constructor
Protected
new AbstractPaymentService(container
, config?
)
Parameters
container
unknownRequiredconfig
Record<string, unknown>Properties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequiredidentifier
stringRequiredAccessors
activeManager_
Protected
get
activeManager_(): EntityManager
Returns
EntityManager
EntityManager
EntityManagerRequiredMethods
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>RequiredauthorizePayment
Abstract
authorizePayment(paymentSession
, context
): Promise
<{ data
: Data
; status
: PaymentSessionStatus
}>
Parameters
Returns
Promise
<{ data
: Data
; status
: PaymentSessionStatus
}>
Deprecated
cancelPayment
Abstract
cancelPayment(payment
): Promise
<Data
>
This will be
Parameters
Returns
Promise
<Data
>
Deprecated
in the near future
capturePayment
Abstract
capturePayment(payment
): Promise
<Data
>
This will be
Parameters
Returns
Promise
<Data
>
Deprecated
in the near future
createPayment
Abstract
createPayment(context
): Promise
<PaymentSessionResponse
>
Parameters
Returns
Promise
<PaymentSessionResponse
>
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
deletePayment
Abstract
deletePayment(paymentSession
): Promise
<void
>
This will be
Parameters
Returns
Promise
<void
>
Promise
Promise<void>RequiredDeprecated
in the near future
getIdentifier
getIdentifier(): string
Returns
string
string
stringgetPaymentData
Abstract
getPaymentData(paymentSession
): Promise
<Data
>
Parameters
Returns
Promise
<Data
>
Deprecated
getStatus
Abstract
getStatus(data
): Promise
<PaymentSessionStatus
>
This will be
Parameters
Returns
Promise
<PaymentSessionStatus
>
Deprecated
in the near future
refundPayment
Abstract
refundPayment(payment
, refundAmount
): Promise
<Data
>
This will be
Parameters
refundAmount
numberRequiredReturns
Promise
<Data
>
Deprecated
in the near future
retrievePayment
Abstract
retrievePayment(paymentData
): Promise
<Data
>
Parameters
Returns
Promise
<Data
>
Deprecated
retrieveSavedMethods
retrieveSavedMethods(customer
): Promise
<Data
[]>
This will be
Parameters
Returns
Promise
<Data
[]>
Deprecated
in the near future
shouldRetryTransaction_
Protected
shouldRetryTransaction_(err
): boolean
Parameters
err
Record<string, unknown> | { code: string }RequiredReturns
boolean
boolean
booleanupdatePayment
Abstract
updatePayment(paymentSessionData
, context
): Promise
<Record<string
, unknown
> | PaymentSessionResponse
>
Parameters
Returns
Promise
<Record<string
, unknown
> | PaymentSessionResponse
>
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
updatePaymentData
Abstract
updatePaymentData(paymentSessionData
, data
): Promise
<Data
>
Parameters
Returns
Promise
<Data
>
Deprecated
withTransaction
withTransaction(transactionManager?
): AbstractPaymentService
Parameters
transactionManager
EntityManager