PaymentCollectionService
internal.internal.PaymentCollectionService
Properties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>isValidTotalAmount
anyRequiredmanager_
EntityManagerRequiredpaymentCollectionRepository_
Repository<PaymentCollection> & { getPaymentCollectionIdByPaymentId: Method getPaymentCollectionIdByPaymentId ; getPaymentCollectionIdBySessionId: Method getPaymentCollectionIdBySessionId }RequiredtransactionManager_
undefined | EntityManagerRequiredEvents
objectRequiredEvents.CREATED
stringRequiredEvents.DELETED
stringRequiredEvents.PAYMENT_AUTHORIZED
stringRequiredEvents.UPDATED
stringRequiredAccessors
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_
authorizePaymentSessions
authorizePaymentSessions(paymentCollectionId
, sessionIds
, context?
): Promise
<PaymentCollection
>
Authorizes the payment sessions of a payment collection.
Parameters
paymentCollectionId
stringRequiredsessionIds
string[]Requiredcontext
Record<string, unknown>Returns
Promise
<PaymentCollection
>
the payment collection and its payment session.
create
create(data
): Promise
<PaymentCollection
>
Creates a new payment collection.
Parameters
Returns
Promise
<PaymentCollection
>
the payment collection created.
delete
delete(paymentCollectionId
): Promise
<undefined
| PaymentCollection
>
Deletes a payment collection.
Parameters
paymentCollectionId
stringRequiredReturns
Promise
<undefined
| PaymentCollection
>
the payment collection removed.
markAsAuthorized
markAsAuthorized(paymentCollectionId
): Promise
<PaymentCollection
>
Marks a payment collection as authorized bypassing the payment flow.
Parameters
paymentCollectionId
stringRequiredReturns
Promise
<PaymentCollection
>
the payment session authorized.
refreshPaymentSession
refreshPaymentSession(paymentCollectionId
, sessionId
, customerId
): Promise
<PaymentSession
>
Removes and recreate a payment session of a payment collection.
Parameters
paymentCollectionId
stringRequiredsessionId
stringRequiredcustomerId
stringRequiredReturns
Promise
<PaymentSession
>
the new payment session created.
retrieve
retrieve(paymentCollectionId
, config?
): Promise
<PaymentCollection
>
Retrieves a payment collection by id.
Parameters
paymentCollectionId
stringRequiredconfig
FindConfig<PaymentCollection>Returns
Promise
<PaymentCollection
>
the payment collection.
setPaymentSession
setPaymentSession(paymentCollectionId
, sessionInput
, customerId
): Promise
<PaymentCollection
>
Manages a single payment sessions of a payment collection.
Parameters
paymentCollectionId
stringRequiredcustomerId
stringRequiredReturns
Promise
<PaymentCollection
>
the payment collection and its payment session.
setPaymentSessionsBatch
setPaymentSessionsBatch(paymentCollectionOrId
, sessionsInput
, customerId
): Promise
<PaymentCollection
>
Manages multiple payment sessions of a payment collection.
Parameters
customerId
stringRequiredReturns
Promise
<PaymentCollection
>
the payment collection and its payment sessions.
shouldRetryTransaction_
Protected
shouldRetryTransaction_(err
): boolean
Parameters
err
Record<string, unknown> | { code: string }RequiredReturns
boolean
boolean
booleanInherited from
TransactionBaseService.shouldRetryTransaction_
update
update(paymentCollectionId
, data
): Promise
<PaymentCollection
>
Updates a payment collection.
Parameters
paymentCollectionId
stringRequiredReturns
Promise
<PaymentCollection
>
the payment collection updated.
withTransaction
withTransaction(transactionManager?
): PaymentCollectionService
Parameters
transactionManager
EntityManager