private void verifyRefund(final Payment refund, final String paymentExternalKey, final String paymentTransactionExternalKey, final String refundTransactionExternalKey, final BigDecimal requestedAmount, final BigDecimal refundAmount, final TransactionStatus transactionStatus) { Assert.assertEquals(refund.getExternalKey(), paymentExternalKey); Assert.assertEquals(refund.getTransactions().size(), 2); Assert.assertEquals(refund.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); Assert.assertEquals(refund.getTransactions().get(0).getProcessedAmount().compareTo(requestedAmount), 0); Assert.assertEquals(refund.getTransactions().get(0).getCurrency(), account.getCurrency()); Assert.assertEquals(refund.getTransactions().get(0).getExternalKey(), paymentTransactionExternalKey); Assert.assertEquals(refund.getTransactions().get(0).getTransactionStatus(), TransactionStatus.SUCCESS); Assert.assertEquals(refund.getTransactions().get(1).getAmount().compareTo(requestedAmount), 0); Assert.assertEquals(refund.getTransactions().get(1).getProcessedAmount().compareTo(refundAmount), 0); Assert.assertEquals(refund.getTransactions().get(1).getCurrency(), account.getCurrency()); Assert.assertEquals(refund.getTransactions().get(1).getExternalKey(), refundTransactionExternalKey); Assert.assertEquals(refund.getTransactions().get(1).getTransactionStatus(), transactionStatus); }
@Test(groups = "slow") public void testSanityAcrossTransactionTypes() throws PaymentApiException { final BigDecimal requestedAmount = BigDecimal.TEN; final String paymentExternalKey = "ahhhhhhhh"; final String transactionExternalKey = "okkkkkkk"; final Payment pendingPayment = createPayment(TransactionType.AUTHORIZE, null, paymentExternalKey, transactionExternalKey, requestedAmount, PaymentPluginStatus.PENDING); assertNotNull(pendingPayment); Assert.assertEquals(pendingPayment.getExternalKey(), paymentExternalKey); Assert.assertEquals(pendingPayment.getTransactions().size(), 1); Assert.assertEquals(pendingPayment.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); Assert.assertEquals(pendingPayment.getTransactions().get(0).getProcessedAmount().compareTo(requestedAmount), 0); Assert.assertEquals(pendingPayment.getTransactions().get(0).getCurrency(), account.getCurrency()); Assert.assertEquals(pendingPayment.getTransactions().get(0).getExternalKey(), transactionExternalKey); Assert.assertEquals(pendingPayment.getTransactions().get(0).getTransactionStatus(), TransactionStatus.PENDING); try { createPayment(TransactionType.PURCHASE, null, paymentExternalKey, transactionExternalKey, requestedAmount, PaymentPluginStatus.PENDING); Assert.fail("PURCHASE transaction with same key should have failed"); } catch (final PaymentApiException expected) { Assert.assertEquals(expected.getCode(), ErrorCode.PAYMENT_INVALID_PARAMETER.getCode()); } }
@Test(groups = "slow") public void testNotifyPendingTransactionOfStateChanged() throws PaymentApiException { final BigDecimal authAmount = BigDecimal.TEN; final String paymentExternalKey = "rouge"; final String transactionExternalKey = "vert"; final Payment initialPayment = createPayment(TransactionType.AUTHORIZE, null, paymentExternalKey, transactionExternalKey, authAmount, PaymentPluginStatus.PENDING); final Payment payment = paymentApi.notifyPendingTransactionOfStateChanged(account, initialPayment.getTransactions().get(0).getId(), true, callContext); assertEquals(payment.getExternalKey(), paymentExternalKey); assertEquals(payment.getPaymentMethodId(), account.getPaymentMethodId()); assertEquals(payment.getAccountId(), account.getId()); assertEquals(payment.getAuthAmount().compareTo(authAmount), 0); assertEquals(payment.getCapturedAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payment.getPurchasedAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payment.getRefundedAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payment.getCurrency(), Currency.USD); assertEquals(payment.getTransactions().size(), 1); assertEquals(payment.getTransactions().get(0).getExternalKey(), transactionExternalKey); assertEquals(payment.getTransactions().get(0).getPaymentId(), payment.getId()); assertEquals(payment.getTransactions().get(0).getAmount().compareTo(authAmount), 0); assertEquals(payment.getTransactions().get(0).getCurrency(), Currency.USD); assertEquals(payment.getTransactions().get(0).getProcessedAmount().compareTo(authAmount), 0); assertEquals(payment.getTransactions().get(0).getProcessedCurrency(), Currency.USD); assertEquals(payment.getTransactions().get(0).getTransactionStatus(), TransactionStatus.SUCCESS); assertEquals(payment.getTransactions().get(0).getTransactionType(), TransactionType.AUTHORIZE); assertNull(payment.getTransactions().get(0).getGatewayErrorMsg()); assertNull(payment.getTransactions().get(0).getGatewayErrorCode()); }
Assert.assertEquals(pendingPayment.getTransactions().size(), 1); Assert.assertEquals(pendingPayment.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); Assert.assertEquals(pendingPayment.getTransactions().get(0).getProcessedAmount().compareTo(requestedAmount), 0); Assert.assertEquals(pendingPayment.getTransactions().get(0).getCurrency(), account.getCurrency()); Assert.assertEquals(pendingPayment.getTransactions().get(0).getExternalKey(), paymentTransactionExternalKey); Assert.assertEquals(pendingPayment2.getTransactions().size(), 1); Assert.assertEquals(pendingPayment2.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); Assert.assertEquals(pendingPayment2.getTransactions().get(0).getProcessedAmount().compareTo(pendingAmount == null ? requestedAmount : pendingAmount), 0); Assert.assertEquals(pendingPayment2.getTransactions().get(0).getCurrency(), account.getCurrency()); Assert.assertEquals(pendingPayment2.getTransactions().get(0).getExternalKey(), paymentTransactionExternalKey); Assert.assertEquals(completedPayment.getTransactions().size(), 1); Assert.assertEquals(completedPayment.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); Assert.assertEquals(completedPayment.getTransactions().get(0).getProcessedAmount().compareTo(pendingAmount == null ? requestedAmount : pendingAmount), 0); Assert.assertEquals(completedPayment.getTransactions().get(0).getCurrency(), account.getCurrency()); Assert.assertEquals(completedPayment.getTransactions().get(0).getExternalKey(), paymentTransactionExternalKey);
@Test(groups = "slow") public void testCreateSuccessPurchase() throws PaymentApiException { final BigDecimal requestedAmount = BigDecimal.TEN; final String paymentExternalKey = "bwwrr"; final String transactionExternalKey = "krapaut"; final Payment payment = paymentApi.createPurchase(account, account.getPaymentMethodId(), null, requestedAmount, Currency.AED, null, paymentExternalKey, transactionExternalKey, ImmutableList.<PluginProperty>of(), callContext); assertEquals(payment.getExternalKey(), paymentExternalKey); assertEquals(payment.getPaymentMethodId(), account.getPaymentMethodId()); assertEquals(payment.getAccountId(), account.getId()); assertEquals(payment.getAuthAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payment.getCapturedAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payment.getPurchasedAmount().compareTo(requestedAmount), 0); assertEquals(payment.getRefundedAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payment.getCurrency(), Currency.AED); assertEquals(payment.getTransactions().size(), 1); assertEquals(payment.getTransactions().get(0).getExternalKey(), transactionExternalKey); assertEquals(payment.getTransactions().get(0).getPaymentId(), payment.getId()); assertEquals(payment.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); assertEquals(payment.getTransactions().get(0).getCurrency(), Currency.AED); assertEquals(payment.getTransactions().get(0).getProcessedAmount().compareTo(requestedAmount), 0); assertEquals(payment.getTransactions().get(0).getProcessedCurrency(), Currency.AED); assertEquals(payment.getTransactions().get(0).getTransactionStatus(), TransactionStatus.SUCCESS); assertEquals(payment.getTransactions().get(0).getTransactionType(), TransactionType.PURCHASE); assertNotNull(payment.getTransactions().get(0).getGatewayErrorMsg()); assertNotNull(payment.getTransactions().get(0).getGatewayErrorCode()); }
private void verifyPaymentViaGetPath(final Payment payment) throws PaymentApiException { // We can't use Assert.assertEquals because the updateDate may have been updated by the Janitor final Payment refreshedPayment = paymentApi.getPayment(payment.getId(), true, false, ImmutableList.<PluginProperty>of(), callContext); Assert.assertEquals(refreshedPayment.getAccountId(), payment.getAccountId()); Assert.assertEquals(refreshedPayment.getTransactions().size(), payment.getTransactions().size()); Assert.assertEquals(refreshedPayment.getExternalKey(), payment.getExternalKey()); Assert.assertEquals(refreshedPayment.getPaymentMethodId(), payment.getPaymentMethodId()); Assert.assertEquals(refreshedPayment.getAccountId(), payment.getAccountId()); Assert.assertEquals(refreshedPayment.getAuthAmount().compareTo(payment.getAuthAmount()), 0); Assert.assertEquals(refreshedPayment.getCapturedAmount().compareTo(payment.getCapturedAmount()), 0); Assert.assertEquals(refreshedPayment.getPurchasedAmount().compareTo(payment.getPurchasedAmount()), 0); Assert.assertEquals(refreshedPayment.getRefundedAmount().compareTo(payment.getRefundedAmount()), 0); Assert.assertEquals(refreshedPayment.getCurrency(), payment.getCurrency()); for (int i = 0; i < refreshedPayment.getTransactions().size(); i++) { final PaymentTransaction refreshedPaymentTransaction = refreshedPayment.getTransactions().get(i); final PaymentTransaction paymentTransaction = payment.getTransactions().get(i); Assert.assertEquals(refreshedPaymentTransaction.getAmount().compareTo(paymentTransaction.getAmount()), 0); Assert.assertEquals(refreshedPaymentTransaction.getProcessedAmount().compareTo(paymentTransaction.getProcessedAmount()), 0); Assert.assertEquals(refreshedPaymentTransaction.getCurrency(), paymentTransaction.getCurrency()); Assert.assertEquals(refreshedPaymentTransaction.getExternalKey(), paymentTransaction.getExternalKey()); Assert.assertEquals(refreshedPaymentTransaction.getTransactionStatus(), paymentTransaction.getTransactionStatus()); } }
Assert.assertEquals(payment1.getPurchasedAmount().compareTo(BigDecimal.TEN), 0); Assert.assertEquals(payment1.getTransactions().size(), 1); Assert.assertEquals(payment1.getTransactions().get(0).getProcessedAmount().compareTo(BigDecimal.TEN), 0); Assert.assertEquals(invoice2.getBalance().compareTo(new BigDecimal("239.95")), 0); Assert.assertEquals(invoiceUserApi.getAccountBalance(account.getId(), callContext).compareTo(invoice2.getBalance()), 0); Assert.assertEquals(payment1.getTransactions().size(), 2); Assert.assertEquals(payment1.getTransactions().get(0).getAmount().compareTo(new BigDecimal("249.95")), 0); Assert.assertEquals(payment1.getTransactions().get(0).getProcessedAmount().compareTo(BigDecimal.TEN), 0); Assert.assertEquals(payment1.getTransactions().get(1).getAmount().compareTo(BigDecimal.TEN), 0); Assert.assertEquals(payment1.getTransactions().get(1).getProcessedAmount().compareTo(BigDecimal.TEN), 0); invoice2 = invoiceUserApi.getInvoice(invoice2.getId(), callContext); Assert.assertEquals(invoice2.getBalance().compareTo(new BigDecimal("249.95")), 0); Assert.assertEquals(payment1.getTransactions().size(), 3); Assert.assertEquals(payment1.getTransactions().get(0).getAmount().compareTo(new BigDecimal("249.95")), 0); Assert.assertEquals(payment1.getTransactions().get(0).getProcessedAmount().compareTo(BigDecimal.TEN), 0); Assert.assertEquals(payment1.getTransactions().get(1).getAmount().compareTo(BigDecimal.TEN), 0); Assert.assertEquals(payment1.getTransactions().get(1).getProcessedAmount().compareTo(BigDecimal.TEN), 0); Assert.assertNull(payment1.getTransactions().get(2).getAmount()); Assert.assertEquals(payment1.getTransactions().get(2).getProcessedAmount().compareTo(BigDecimal.ZERO), 0); invoice2 = invoiceUserApi.getInvoice(invoice2.getId(), callContext); Assert.assertEquals(invoice2.getBalance().compareTo(new BigDecimal("239.95")), 0);
assertEquals(payments.get(0).getTransactions().get(0).getAmount().compareTo(new BigDecimal("249.95")), 0); assertEquals(payments.get(0).getTransactions().get(0).getCurrency(), Currency.USD); assertEquals(payments.get(0).getTransactions().get(0).getProcessedAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payments.get(0).getTransactions().get(0).getProcessedCurrency(), Currency.USD); assertEquals(payments2.get(0).getTransactions().get(1).getAmount().compareTo(new BigDecimal("249.95")), 0); assertEquals(payments2.get(0).getTransactions().get(1).getCurrency(), Currency.USD); assertEquals(payments2.get(0).getTransactions().get(1).getProcessedAmount().compareTo(new BigDecimal("249.95")), 0); assertEquals(payments2.get(0).getTransactions().get(1).getProcessedCurrency(), Currency.USD);
Assert.assertEquals(payment1.getTransactions().get(0).getProcessedAmount().compareTo(BigDecimal.TEN), 0); Assert.assertEquals(invoice2.getBalance().compareTo(new BigDecimal("239.95")), 0); Assert.assertEquals(invoiceUserApi.getAccountBalance(account.getId(), callContext).compareTo(invoice2.getBalance()), 0); Assert.assertEquals(payment2.getTransactions().get(0).getProcessedAmount().compareTo(new BigDecimal("249.95")), 0); invoice2 = invoiceUserApi.getInvoice(invoice2.getId(), callContext); Assert.assertEquals(invoice2.getBalance().compareTo(new BigDecimal("239.95")), 0); paymentChecker.checkPayment(account.getId(), 3, callContext, new ExpectedPaymentCheck(new LocalDate(2012, 6, 30), new BigDecimal("239.95"), TransactionStatus.SUCCESS, invoice2.getId(), Currency.USD)); Assert.assertEquals(payment3.getPurchasedAmount().compareTo(new BigDecimal("239.95")), 0); Assert.assertEquals(payment3.getTransactions().get(0).getProcessedAmount().compareTo(new BigDecimal("239.95")), 0); invoice2 = invoiceUserApi.getInvoice(invoice2.getId(), callContext); invoice3 = invoiceUserApi.getInvoice(invoice3.getId(), callContext);
assertEquals(payments.get(0).getTransactions().get(0).getAmount().compareTo(new BigDecimal("249.95")), 0); assertEquals(payments.get(0).getTransactions().get(0).getCurrency(), Currency.USD); assertEquals(payments.get(0).getTransactions().get(0).getProcessedAmount().compareTo(new BigDecimal("249.95")), 0); assertEquals(payments.get(0).getTransactions().get(0).getProcessedCurrency(), Currency.USD); assertEquals(payments.get(0).getTransactions().get(0).getTransactionStatus(), TransactionStatus.PENDING); assertEquals(payments2.get(0).getTransactions().get(0).getAmount().compareTo(new BigDecimal("249.95")), 0); assertEquals(payments2.get(0).getTransactions().get(0).getCurrency(), Currency.USD); assertEquals(payments2.get(0).getTransactions().get(0).getProcessedAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payments2.get(0).getTransactions().get(0).getProcessedCurrency(), Currency.USD); assertEquals(payments2.get(0).getTransactions().get(0).getTransactionStatus(), TransactionStatus.PAYMENT_FAILURE);
assertEquals(payment.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); assertEquals(payment.getTransactions().get(0).getCurrency(), Currency.AED); assertEquals(payment.getTransactions().get(0).getProcessedAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payment.getTransactions().get(0).getProcessedCurrency(), Currency.AED);
assertEquals(payment.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); assertEquals(payment.getTransactions().get(0).getCurrency(), Currency.AED); assertEquals(payment.getTransactions().get(0).getProcessedAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payment.getTransactions().get(0).getProcessedCurrency(), Currency.AED);
Assert.assertEquals(payment1.getTransactions().size(), 1); Assert.assertEquals(payment1.getPurchasedAmount().compareTo(BigDecimal.TEN), 0); Assert.assertEquals(payment1.getTransactions().get(0).getProcessedAmount().compareTo(BigDecimal.TEN), 0); invoice2 = invoiceUserApi.getInvoice(invoice2.getId(), callContext); Assert.assertEquals(invoice2.getBalance().compareTo(new BigDecimal("239.95")), 0); Assert.assertEquals(payment2.getTransactions().size(), 1); Assert.assertEquals(payment2.getPurchasedAmount().compareTo(new BigDecimal("239.95")), 0); Assert.assertEquals(payment2.getTransactions().get(0).getProcessedAmount().compareTo(new BigDecimal("239.95")), 0); invoice2 = invoiceUserApi.getInvoice(invoice2.getId(), callContext); Assert.assertEquals(invoice2.getBalance().compareTo(BigDecimal.ZERO), 0);
assertEquals(payment4.getTransactions().get(3).getAmount().compareTo(payment3.getCapturedAmount()), 0); assertEquals(payment4.getTransactions().get(3).getCurrency(), Currency.USD); assertEquals(payment4.getTransactions().get(3).getProcessedAmount().compareTo(payment3.getCapturedAmount()), 0); assertEquals(payment4.getTransactions().get(3).getProcessedCurrency(), Currency.USD); assertEquals(payment4.getTransactions().get(3).getTransactionStatus(), TransactionStatus.SUCCESS);
@Test(groups = "slow") public void testGetPaymentInfoWithAndWithoutPluginInfo() throws PaymentApiException, PaymentPluginApiException { final BigDecimal requestedAmount = BigDecimal.TEN; final String paymentExternalKey = "externalKey"; final String transactionExternalKey = "transactionKey"; final Payment payment = paymentApi.createPurchase(account, account.getPaymentMethodId(), null, requestedAmount, Currency.AED, null, paymentExternalKey, transactionExternalKey, ImmutableList.<PluginProperty>of(), callContext); final Payment paymentPluginInfoFalse = paymentApi.getPayment(payment.getId(), false, false, ImmutableList.<PluginProperty>of(), callContext); final Payment paymentPluginInfoTrue = paymentApi.getPayment(payment.getId(), true, false, ImmutableList.<PluginProperty>of(), callContext); Assert.assertEquals(paymentPluginInfoFalse.getAccountId(), paymentPluginInfoTrue.getAccountId()); Assert.assertEquals(paymentPluginInfoFalse.getTransactions().size(), paymentPluginInfoTrue.getTransactions().size()); Assert.assertEquals(paymentPluginInfoFalse.getExternalKey(), paymentPluginInfoTrue.getExternalKey()); Assert.assertEquals(paymentPluginInfoFalse.getPaymentMethodId(), paymentPluginInfoTrue.getPaymentMethodId()); Assert.assertEquals(paymentPluginInfoFalse.getAccountId(), paymentPluginInfoTrue.getAccountId()); Assert.assertEquals(paymentPluginInfoFalse.getAuthAmount().compareTo(paymentPluginInfoTrue.getAuthAmount()), 0); Assert.assertEquals(paymentPluginInfoFalse.getCapturedAmount().compareTo(paymentPluginInfoTrue.getCapturedAmount()), 0); Assert.assertEquals(paymentPluginInfoFalse.getPurchasedAmount().compareTo(paymentPluginInfoTrue.getPurchasedAmount()), 0); Assert.assertEquals(paymentPluginInfoFalse.getRefundedAmount().compareTo(paymentPluginInfoTrue.getRefundedAmount()), 0); Assert.assertEquals(paymentPluginInfoFalse.getCurrency(), paymentPluginInfoTrue.getCurrency()); for (int i = 0; i < paymentPluginInfoFalse.getTransactions().size(); i++) { final PaymentTransaction noPluginInfoPaymentTransaction = paymentPluginInfoFalse.getTransactions().get(i); final PaymentTransaction paymentTransaction = paymentPluginInfoTrue.getTransactions().get(i); Assert.assertEquals(noPluginInfoPaymentTransaction.getAmount().compareTo(paymentTransaction.getAmount()), 0); Assert.assertEquals(noPluginInfoPaymentTransaction.getProcessedAmount().compareTo(paymentTransaction.getProcessedAmount()), 0); Assert.assertEquals(noPluginInfoPaymentTransaction.getCurrency(), paymentTransaction.getCurrency()); Assert.assertEquals(noPluginInfoPaymentTransaction.getExternalKey(), paymentTransaction.getExternalKey()); Assert.assertEquals(noPluginInfoPaymentTransaction.getTransactionStatus(), paymentTransaction.getTransactionStatus()); Assert.assertEquals(noPluginInfoPaymentTransaction.getPaymentInfoPlugin(), paymentTransaction.getPaymentInfoPlugin()); } }
assertEquals(payment.getTransactions().get(0).getAmount().compareTo(authAmount), 0); assertEquals(payment.getTransactions().get(0).getCurrency(), Currency.AED); assertEquals(payment.getTransactions().get(0).getProcessedAmount().compareTo(authAmount), 0); assertEquals(payment.getTransactions().get(0).getProcessedCurrency(), Currency.AED); assertNull(payment2.getTransactions().get(1).getAmount()); assertNull(payment2.getTransactions().get(1).getCurrency()); assertNull(payment2.getTransactions().get(1).getProcessedAmount()); assertNull(payment2.getTransactions().get(1).getProcessedCurrency());
assertEquals(payment.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); assertEquals(payment.getTransactions().get(0).getCurrency(), Currency.USD); assertEquals(payment.getTransactions().get(0).getProcessedAmount().compareTo(BigDecimal.ZERO), 0); assertEquals(payment.getTransactions().get(0).getProcessedCurrency(), Currency.USD);
assertEquals(payment.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); assertEquals(payment.getTransactions().get(0).getCurrency(), currency); assertEquals(payment.getTransactions().get(0).getProcessedAmount().compareTo(requestedAmount), 0); assertEquals(payment.getTransactions().get(0).getProcessedCurrency(), currency); assertEquals(payment.getTransactions().get(0).getTransactionStatus(), TransactionStatus.SUCCESS);
assertEquals(payment.getTransactions().get(0).getAmount().compareTo(requestedAmount), 0); assertEquals(payment.getTransactions().get(0).getCurrency(), Currency.USD); assertEquals(payment.getTransactions().get(0).getProcessedAmount().compareTo(requestedAmount), 0); assertEquals(payment.getTransactions().get(0).getProcessedCurrency(), Currency.USD);
public PaymentTransactionJson(final PaymentTransaction transaction, final String paymentExternalKey, @Nullable final List<AuditLog> transactionLogs) { this(transaction.getId(), transaction.getExternalKey(), transaction.getPaymentId(), paymentExternalKey, transaction.getTransactionType(), transaction.getAmount(), transaction.getCurrency() != null ? transaction.getCurrency() : null, transaction.getEffectiveDate(), transaction.getProcessedAmount(), transaction.getProcessedCurrency() != null ? transaction.getProcessedCurrency() : null, transaction.getTransactionStatus() != null ? transaction.getTransactionStatus().toString() : null, transaction.getGatewayErrorCode(), transaction.getGatewayErrorMsg(), transaction.getPaymentInfoPlugin() == null ? null : transaction.getPaymentInfoPlugin().getFirstPaymentReferenceId(), transaction.getPaymentInfoPlugin() == null ? null : transaction.getPaymentInfoPlugin().getSecondPaymentReferenceId(), transaction.getPaymentInfoPlugin() == null ? null : toPluginPropertyJson(transaction.getPaymentInfoPlugin().getProperties()), toAuditLogJson(transactionLogs)); }