0
使用相同的transactionId执行另一个事务我使用Authorize.net API来执行付款过程。使用Authorize.net CIM和ARB
我能够执行成功的付款并能够获得任何用户交易的transactionId。
Merchant merchant = callMyMerchancy();
// Transaction process started.
Transaction transactions = merchant.createCIMTransaction(TransactionType.CREATE_CUSTOMER_PROFILE_TRANSACTION);
String customerProfileId = Class2.getCutomerId;
String paymentId = Class1.getPayamentId;
transactions.setCustomerProfileId(customerProfileId);
transactions.setCustomerPaymentProfileId(paymentId);
PaymentTransaction paymentTransaction = PaymentTransaction.createPaymentTransaction();
Order order = Order.createOrder();
order.setTotalAmount(paymentAmount);
order.setDescription("Test payment");
paymentTransaction.setOrder(myOrder);
paymentTransaction.setTransactionType(net.authorize.TransactionType.AUTH_CAPTURE);
transaction.setPaymentTransaction(paymentTransaction);
Result<Transaction> result = (Result<Transaction>) merchant.postTransaction(transactions);
if (result.isOk()) {
System.out.println(" I got transaction id as : "
+ result.getDirectResponseList().get(0).getDirectResponseMap().get(ResponseField.TRANSACTION_ID));
以这种方式我跟踪用户的transactionId。
现在我想在将来执行另一个事务,对于这个transactionId将会是相同的(我们第一次存储的事务ID)。
因此,任何人都知道如何使用相同的transactionId,并执行另一个事务?
谢谢,
此外transactionId将是相同的情况下特定的交易退款或无效 –