PaymentCollectionService
constructor
Parameters
__namedParameters
InjectedDependenciesRequiredProperties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequiredEvents
objectRequiredEvents.CREATED
stringRequiredDefault: "payment-collection.created"
Events.DELETED
stringRequiredDefault: "payment-collection.deleted"
Events.PAYMENT_AUTHORIZED
stringRequiredDefault: "payment-collection.payment_authorized"
Events.UPDATED
stringRequiredDefault: "payment-collection.updated"
Accessors
activeManager_
Returns
EntityManager
EntityManagerRequiredMethods
atomicPhase_
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>RequiredauthorizePaymentSessions
Authorizes the payment sessions of a payment collection.
Parameters
paymentCollectionId
stringRequiredsessionIds
string[]Requiredcontext
Record<string, unknown>RequiredDefault: {}
Returns
create
Creates a new payment collection.
Parameters
data
CreatePaymentCollectionInputRequiredReturns
delete
Deletes a payment collection.
Parameters
paymentCollectionId
stringRequiredReturns
isValidTotalAmount
Parameters
total
numberRequiredsessionsInput
PaymentCollectionsSessionsBatchInput[]RequiredReturns
boolean
booleanmarkAsAuthorized
Marks a payment collection as authorized bypassing the payment flow.
Parameters
paymentCollectionId
stringRequiredReturns
refreshPaymentSession
Removes and recreate a payment session of a payment collection.
Parameters
paymentCollectionId
stringRequiredsessionId
stringRequiredcustomerId
stringRequiredReturns
retrieve
Retrieves a payment collection by id.
Parameters
paymentCollectionId
stringRequiredDefault: {}
Returns
setPaymentSession
Manages a single payment sessions of a payment collection.
Parameters
paymentCollectionId
stringRequiredsessionInput
PaymentCollectionsSessionsInputRequiredcustomerId
stringRequiredReturns
setPaymentSessionsBatch
Manages multiple payment sessions of a payment collection.
Parameters
sessionsInput
PaymentCollectionsSessionsBatchInput[]RequiredcustomerId
stringRequiredReturns
shouldRetryTransaction_
Parameters
err
Record<string, unknown> | objectRequiredReturns
boolean
booleanupdate
Updates a payment collection.
Parameters
paymentCollectionId
stringRequiredReturns
withTransaction
Parameters
transactionManager
EntityManagerReturns
PaymentCollectionService
objectRequired