PaymentService
internal.internal.PaymentService
This will be
Deprecated
in the near future use the new PaymentProcessor interface instead
Implemented by
Properties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequiredAccessors
activeManager_
Protected
get
activeManager_(): EntityManager
Returns
EntityManager
EntityManager
EntityManagerRequiredInherited 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>RequiredInherited from
TransactionBaseService.atomicPhase_
authorizePayment
authorizePayment(paymentSession
, context
): Promise
<{ data
: Data
; status
: PaymentSessionStatus
}>
This will be
Parameters
Returns
Promise
<{ data
: Data
; status
: PaymentSessionStatus
}>
Deprecated
in the near future use PaymentProcessor.authorizePayment instead
cancelPayment
cancelPayment(payment
): Promise
<Data
>
This will be
Parameters
Returns
Promise
<Data
>
Deprecated
in the near future use PaymentProcessor.cancelPayment instead
capturePayment
capturePayment(payment
): Promise
<Data
>
This will be
Parameters
Returns
Promise
<Data
>
Deprecated
in the near future use PaymentProcessor.capturePayment instead
createPayment
createPayment(context
): Promise
<PaymentSessionResponse
>
This will be
Parameters
Returns
Promise
<PaymentSessionResponse
>
Deprecated
in the near future use PaymentProcessor.initiatePayment instead
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
deletePayment(paymentSession
): Promise
<void
>
This will be
Parameters
Returns
Promise
<void
>
Promise
Promise<void>RequiredDeprecated
in the near future use PaymentProcessor.cancelPayment instead
getIdentifier
getIdentifier(): string
Returns
string
string
stringgetPaymentData
getPaymentData(paymentSession
): Promise
<Data
>
This will be
Parameters
Returns
Promise
<Data
>
Deprecated
in the near future use PaymentProcessor.retrievePayment instead
getStatus
getStatus(data
): Promise
<PaymentSessionStatus
>
This will be
Parameters
Returns
Promise
<PaymentSessionStatus
>
Deprecated
in the near future use PaymentProcessor.getPaymentStatus instead
refundPayment
refundPayment(payment
, refundAmount
): Promise
<Data
>
This will be
Parameters
refundAmount
numberRequiredReturns
Promise
<Data
>
Deprecated
in the near future use PaymentProcessor.refundPayment instead
retrievePayment
retrievePayment(paymentData
): Promise
<Data
>
This will be
Parameters
Returns
Promise
<Data
>
Deprecated
in the near future use PaymentProcessor.retrievePayment instead
retrieveSavedMethods
retrieveSavedMethods(customer
): Promise
<Data
[]>
This will be
Parameters
Returns
Promise
<Data
[]>
Deprecated
in the near future use PaymentProcessor.getSavedMethods instead
shouldRetryTransaction_
Protected
shouldRetryTransaction_(err
): boolean
Parameters
err
Record<string, unknown> | { code: string }RequiredReturns
boolean
boolean
booleanInherited from
TransactionBaseService.shouldRetryTransaction_
updatePayment
updatePayment(paymentSessionData
, context
): Promise
<Data
| PaymentSessionResponse
>
Parameters
Returns
Promise
<Data
| PaymentSessionResponse
>
updatePayment(paymentSessionData
, cart
): Promise
<Data
>
This will be
Parameters
Returns
Promise
<Data
>
Deprecated
in the near future use PaymentProcessor.updatePayment instead
updatePaymentData
updatePaymentData(paymentSessionData
, data
): Promise
<Data
>
This will be
Parameters
Returns
Promise
<Data
>
Deprecated
in the near future use PaymentProcessor.updatePayment instead
withTransaction
withTransaction(transactionManager?
): PaymentService
Parameters
transactionManager
EntityManager