Perform another transaction with same transactionId using Authorize.net CIM & ARB

275 views Asked by At

I am using Authorize.net API to perform payment process.

I am able to perform successful payment and able to get transactionId of any user's transaction.

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));

In this way I am keeping track of transactionId for users.

Now I want to perform another transaction in future, for which transactionId will be same(transaction id which we have stored at first time).

So anybody knows how to use same transactionId, and perform another transaction?

Thanks,

1

There are 1 answers

1
John Conde On

You can't do this. The transaction ID is a unique ID that identifies that one transaction for record keeping purposes. It is not a key that allows more transactions to be done with that CI profile. That's what the CIM profile ID is for.