How to find a transaction allowed / not settled in Authorize.net?

How can I determine if a transaction made by the user is allowed or not set in authorize.net. I am using AIM. I want to go through coding. When the transaction is completed, and I can not find the status of the transaction. But I want to get whether it goes for a regulated or unresolved transaction. Thanks in advance.

+4
source share
5 answers

You cannot get this information using coding, since no Authorize.Net API offers allow this. This can only be done through the control panel. When you process a transaction and approve it, you can assume that the transaction is not settled. Transactions are allowed once a day, usually at midnight Pacific Time. After that, you can assume that the transaction will be resolved.

+4
source

As of 03-16-2011, authorize.net has issued two new calls to the Transaction Details API, getUnsettledTransactionList and getBatchStatistics.

getUnsettledTransactionList returns up to 1000 outstanding transactions per call, returning the most recent transactions. The information returned in the response will be the same as in the getTransactionList call.

getBatchStatistics returns batch statistics for one batch, for example, calculation status and time, number of charges, number of drops, etc.

For more information, see the XML Guide and the SOAP Guide.

At the time of writing, the PHP SDK is in version 1.1.6 and does not have this feature built into the TD api, however, if you look at the documentation above and also this example page , you will see that getting a list of outstanding transactions is actually possible .

from this page

+6
source

I followed this link http://developer.authorize.net/api/transaction_details/ and get this code from there,

<?php require_once "anet_php_sdk/AuthorizeNet.php"; define("AUTHORIZENET_API_LOGIN_ID", "YOURLOGIN"); define("AUTHORIZENET_TRANSACTION_KEY", "YOURKEY"); // Get Settled Batch List $request = new AuthorizeNetTD; $response = $request->getSettledBatchList(); echo count($response->xml->batchList->batch) . " batches\n"; foreach ($response->xml->batchList->batch as $batch) { echo "Batch ID: " . $batch->batchId . "\n"; } // Get Transaction Details $transactionId = "12345"; $response = $request->getTransactionDetails($transactionId); echo $response->xml->transaction->transactionStatus; 

but I get this error message.

User authentication failed due to invalid authentication values.

+1
source
0
source

As suggested in @cwd's answer, the most reliable way to find out if a transaction is allowed is to call getUnsettledTransactionList or getBatchStatistics , but you can also just check that your transaction disconnect time is set.

Log into your Authorize.net account, click "Account"> "Transaction Shutdown Time"

My account is set up at 4:00 PM PDT , so you can simply compare transaction time with disconnect time. Sort of:

 $createdTime = new DateTime($charge['createdTime']); // starting point for settle time $settleTime = new DateTime($createdTime->format('Ym-d') . ' 16:00:00'); $now = new DateTime(); // if card was charged after settle time for // that day, move settle time to the next day if ($createdTime > $settleTime) { $settleTime->add(new DateInterval('P1D')); } if ($now > $settleTime) $settled = true; 
0
source

Source: https://habr.com/ru/post/1314823/


All Articles