PaymentService
This will be
Deprecated
in the near future use the new PaymentProcessor interface instead
Properties
manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequired__container__
anyRequired__configModule__
Record<string, unknown>__moduleDeclaration__
Record<string, unknown>Accessors
activeManager_
Returns
EntityManager
EntityManagerRequiredMethods
getIdentifier
Returns
string
stringRequiredgetPaymentData
This will be
Parameters
Returns
This will be
Deprecated
in the near future use PaymentProcessor.retrievePayment instead
updatePaymentData
This will be
Parameters
Returns
This will be
Deprecated
in the near future use PaymentProcessor.updatePayment instead
createPayment
**createPayment**(context): Promise<[PaymentSessionResponse](/references/medusa/types/medusa.PaymentSessionResponse)>
This will be
Parameters
The type of this argument is meant to be temporary and once the previous method signature
will be removed, the type will only be PaymentContext instead of Cart & PaymentContext
Returns
This will be
Deprecated
in the near future use PaymentProcessor.initiatePayment instead
**createPayment**(cart): Promise<[Data](/references/medusa/types/medusa.Data)>
This will be
Parameters
Returns
This will be
Deprecated
in the near future use createPayment(context: Cart & PaymentContext): Promise<PaymentSessionResponse>
instead
retrievePayment
This will be
Parameters
Returns
This will be
Deprecated
in the near future use PaymentProcessor.retrievePayment instead
updatePayment
**updatePayment**(paymentSessionData, context): Promise<[PaymentSessionResponse](/references/medusa/types/medusa.PaymentSessionResponse) \| [Data](/references/medusa/types/medusa.Data)>
Parameters
Returns
**updatePayment**(paymentSessionData, cart): Promise<[Data](/references/medusa/types/medusa.Data)>
This will be
Parameters
Returns
This will be
Deprecated
in the near future use PaymentProcessor.updatePayment instead
authorizePayment
This will be
Parameters
Returns
Promise
Promise<object>RequiredThis will be
Promise
Promise<object>RequiredDeprecated
in the near future use PaymentProcessor.authorizePayment instead
capturePayment
This will be
Parameters
Returns
This will be
Deprecated
in the near future use PaymentProcessor.capturePayment instead
refundPayment
This will be
Parameters
refundAmount
numberRequiredReturns
This will be
Deprecated
in the near future use PaymentProcessor.refundPayment instead
cancelPayment
This will be
Parameters
Returns
This will be
Deprecated
in the near future use PaymentProcessor.cancelPayment instead
deletePayment
This will be
Parameters
Returns
Promise
Promise<void>RequiredDeprecated
in the near future use PaymentProcessor.cancelPayment instead
retrieveSavedMethods
This will be
Parameters
Returns
This will be
Deprecated
in the near future use PaymentProcessor.getSavedMethods instead
getStatus
This will be
Parameters
Returns
This will be
Deprecated
in the near future use PaymentProcessor.getPaymentStatus instead
withTransaction
Parameters
transactionManager
EntityManagerReturns
this
thisRequiredshouldRetryTransaction_
Parameters
err
Record<string, unknown> | objectRequiredReturns
boolean
booleanRequiredatomicPhase_
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.
Type Parameters
TResult
objectRequiredTError
objectRequiredParameters
work
(transactionManager: EntityManager) => Promise<TResult>RequiredisolationOrErrorHandler
IsolationLevel | (error: TError) => Promise<void | TResult>maybeErrorHandlerOrDontFail
(error: TError) => Promise<void | TResult>Returns
Promise
Promise<TResult>Requiredthe result of the transactional work
Promise
Promise<TResult>Required