@Test public void getTransactionAuthorizationStatusRejectedTest() { assertEquals("Transaction is rejected", TransactionStatus.REJECTED, defaultWirecardTransactionService.getTransactionStatus(authorizationRejected)); }
@Override public TransactionStatus getTransactionStatus(Payment response) { TransactionStatus transactionStatus = TransactionStatus.ERROR; if (response != null) { TransactionState transactionState = response.getTransactionState(); if (transactionState == TransactionState.SUCCESS) { transactionStatus = TransactionStatus.ACCEPTED; } else { transactionStatus = TransactionStatus.REJECTED; } } return transactionStatus; }
DefaultWirecardTransactionService implements WirecardTransactionService { @Override public TransactionStatus getTransactionStatus(Payment response) { TransactionStatus transactionStatus = TransactionStatus.ERROR; if (response != null) { TransactionState transactionState = response.getTransactionState(); if (transactionState == TransactionState.SUCCESS) { transactionStatus = TransactionStatus.ACCEPTED; } else { transactionStatus = TransactionStatus.REJECTED; } } return transactionStatus; } }
DefaultWirecardTransactionService implements WirecardTransactionService { @Override public TransactionStatus getTransactionStatus(Payment response) { TransactionStatus transactionStatus = TransactionStatus.ERROR; if (response != null) { TransactionState transactionState = response.getTransactionState(); if (transactionState == TransactionState.SUCCESS) { transactionStatus = TransactionStatus.ACCEPTED; } else { transactionStatus = TransactionStatus.REJECTED; } } return transactionStatus; }  }
DefaultWirecardTransactionService implements WirecardTransactionService { @Override public TransactionStatus getTransactionStatus(Payment response) { TransactionStatus transactionStatus = TransactionStatus.ERROR; if (response != null) { TransactionState transactionState = response.getTransactionState(); if (transactionState == TransactionState.SUCCESS) { transactionStatus = TransactionStatus.ACCEPTED; } else { transactionStatus = TransactionStatus.REJECTED; } } return transactionStatus; }  @Override PaymentTransactionModel createTransaction(WirecardTransactionData wirecardTransactionData); void calculateCart(final AbstractOrderModel abstractOrderModel); @Override PaymentTransactionEntryModel logTransactionData(WirecardTransactionData wirecardTransactionData); @Override PaymentTransactionModel lookForCompatibleTransactions(final AbstractOrderModel abstractOrder,
                                                                 final String checkoutPaymentType); @Override boolean lookForAcceptedTransactions(AbstractOrderModel abstractOrderModel, PaymentTransactionType paymentTransactionType); @Override String getParentTransactionIdToOperate(AbstractOrderModel abstractOrderModel, PaymentTransactionType paymentTransactionType); @Override PaymentTransactionEntryModel getNewestAcceptedTransactionEntry(PaymentTransactionModel paymentTransactionModel,
                                                                          PaymentTransactionType paymentTransactionType); @Override PaymentTransactionModel getPaymentTransaction(AbstractOrderModel abstractOrder); @Override TransactionStatus getTransactionStatus(Payment response); @Required void setModelService(final ModelService modelService); @Required void setWirecardPaymentService(WirecardPaymentService wirecardPaymentService); @Required void setCommerceCheckoutService(CommerceCheckoutService commerceCheckoutService); @Required void setPaymentConverter(PaymentConverter paymentConverter); @Required void setMediaService(DefaultMediaService mediaService); }
DefaultWirecardTransactionService implements WirecardTransactionService { @Override public TransactionStatus getTransactionStatus(Payment response) { TransactionStatus transactionStatus = TransactionStatus.ERROR; if (response != null) { TransactionState transactionState = response.getTransactionState(); if (transactionState == TransactionState.SUCCESS) { transactionStatus = TransactionStatus.ACCEPTED; } else { transactionStatus = TransactionStatus.REJECTED; } } return transactionStatus; }  @Override PaymentTransactionModel createTransaction(WirecardTransactionData wirecardTransactionData); void calculateCart(final AbstractOrderModel abstractOrderModel); @Override PaymentTransactionEntryModel logTransactionData(WirecardTransactionData wirecardTransactionData); @Override PaymentTransactionModel lookForCompatibleTransactions(final AbstractOrderModel abstractOrder,
                                                                 final String checkoutPaymentType); @Override boolean lookForAcceptedTransactions(AbstractOrderModel abstractOrderModel, PaymentTransactionType paymentTransactionType); @Override String getParentTransactionIdToOperate(AbstractOrderModel abstractOrderModel, PaymentTransactionType paymentTransactionType); @Override PaymentTransactionEntryModel getNewestAcceptedTransactionEntry(PaymentTransactionModel paymentTransactionModel,
                                                                          PaymentTransactionType paymentTransactionType); @Override PaymentTransactionModel getPaymentTransaction(AbstractOrderModel abstractOrder); @Override TransactionStatus getTransactionStatus(Payment response); @Required void setModelService(final ModelService modelService); @Required void setWirecardPaymentService(WirecardPaymentService wirecardPaymentService); @Required void setCommerceCheckoutService(CommerceCheckoutService commerceCheckoutService); @Required void setPaymentConverter(PaymentConverter paymentConverter); @Required void setMediaService(DefaultMediaService mediaService);  }