public class DefaultAlternativePaymentOrderStatusService extends java.lang.Object implements AlternativePaymentOrderStatusService
AlternativePaymentOrderStatusService
interface.
Defines default implementation logic for alternative payment status like: check, count and update.
Constructor and Description |
---|
DefaultAlternativePaymentOrderStatusService() |
Modifier and Type | Method and Description |
---|---|
IsvPaymentTransactionModel |
getAlternativePaymentTransaction(AbstractOrderModel order)
Returns alternative payment transaction for provided order (the payment provider is ALTERNATIVE_PAYMENT or PAY_PAL).
|
IsvPaymentTransactionEntryModel |
getAlternativePaymentTransactionEntry(IsvPaymentTransactionModel transaction)
Returns latest alternative payment transaction entry for provided transaction.
|
int |
getExistingCheckStatusAttempts(IsvPaymentTransactionModel transaction)
Returns the counter that reflects how many times alternative payment status
was checked on transaction.
|
void |
setAlternativePaymentCheckStatusService(AlternativePaymentCheckStatusService alternativePaymentCheckStatusService) |
void |
setModelService(ModelService modelService) |
void |
setPaymentConfigurationService(PaymentConfigurationService paymentConfigurationService) |
void |
setPaymentTransactionService(PaymentTransactionService paymentTransactionService) |
CheckStatusDecision |
shouldRunCheckStatus(IsvPaymentTransactionModel transaction)
Determines if there is a need to run or skip the check status request
|
void |
updateOrderByPaymentStatus(AbstractOrderModel order,
IsvAlternativePaymentStatus alternativePaymentStatus)
Updates order status to provided value.
|
public DefaultAlternativePaymentOrderStatusService()
public CheckStatusDecision shouldRunCheckStatus(IsvPaymentTransactionModel transaction)
AlternativePaymentOrderStatusService
shouldRunCheckStatus
in interface AlternativePaymentOrderStatusService
transaction
- transaction to checkpublic void updateOrderByPaymentStatus(AbstractOrderModel order, IsvAlternativePaymentStatus alternativePaymentStatus)
AlternativePaymentOrderStatusService
updateOrderByPaymentStatus
in interface AlternativePaymentOrderStatusService
order
- order to updatealternativePaymentStatus
- status to setpublic IsvPaymentTransactionModel getAlternativePaymentTransaction(AbstractOrderModel order)
AlternativePaymentOrderStatusService
getAlternativePaymentTransaction
in interface AlternativePaymentOrderStatusService
order
- to look for transactionpublic IsvPaymentTransactionEntryModel getAlternativePaymentTransactionEntry(IsvPaymentTransactionModel transaction)
AlternativePaymentOrderStatusService
getAlternativePaymentTransactionEntry
in interface AlternativePaymentOrderStatusService
transaction
- to look for transaction entrypublic int getExistingCheckStatusAttempts(IsvPaymentTransactionModel transaction)
AlternativePaymentOrderStatusService
getExistingCheckStatusAttempts
in interface AlternativePaymentOrderStatusService
transaction
- alternative payment transactionpublic void setPaymentTransactionService(PaymentTransactionService paymentTransactionService)
public void setPaymentConfigurationService(PaymentConfigurationService paymentConfigurationService)
public void setAlternativePaymentCheckStatusService(AlternativePaymentCheckStatusService alternativePaymentCheckStatusService)
public void setModelService(ModelService modelService)