Authorize.net APIを使用 して支払い処理を実行しています。
支払いを正常に実行でき、任意のユーザーのトランザクションの 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 を追跡しています。
ここで、将来別のトランザクションを実行したいと考えています。そのトランザクション ID は同じになります (最初に保存したトランザクション ID)。
では、同じ transactionId を使用して別のトランザクションを実行する方法を知っている人はいますか?
ありがとう、