Exemplo n.º 1
0
 @Override
 public void updatePaymentAndTransactionOnCompletion(
     final UUID accountId,
     final UUID paymentId,
     final TransactionType transactionType,
     final String currentPaymentStateName,
     final String lastSuccessPaymentStateName,
     final UUID transactionId,
     final TransactionStatus paymentStatus,
     final BigDecimal processedAmount,
     final Currency processedCurrency,
     final String gatewayErrorCode,
     final String gatewayErrorMsg,
     final InternalCallContext context) {
   synchronized (this) {
     final PaymentModelDao payment = payments.get(paymentId);
     if (payment != null) {
       payment.setStateName(currentPaymentStateName);
     }
     final PaymentTransactionModelDao transaction = transactions.get(transactionId);
     if (transaction != null) {
       transaction.setTransactionStatus(paymentStatus);
       transaction.setProcessedAmount(processedAmount);
       transaction.setProcessedCurrency(processedCurrency);
       transaction.setGatewayErrorCode(gatewayErrorCode);
       transaction.setGatewayErrorMsg(gatewayErrorMsg);
     }
   }
 }