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將是相同的情況下特定的交易退款或無效 –