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
EntityManagerEntityManagerRequiredInherited 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>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>
PromisePromise<void>RequiredDeprecated
in the near future use PaymentProcessor.cancelPayment instead
getIdentifier
getIdentifier(): string
Returns
string
stringstringgetPaymentData
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
refundAmountnumberRequiredReturns
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
errRecord<string, unknown> | { code: string }RequiredReturns
boolean
booleanbooleanInherited 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
transactionManagerEntityManager