Reputation: 791
How can I get the list of ARB transaction logs, using Zend Framework?
actually i have gone through the transaction detail api of Authorize.net but there is no scope for ARB. so can any one suggest me which will be better alternative solution for this problem.
Thanks in advance.
Upvotes: 1
Views: 662
Reputation: 219894
There is no way to go back and get detailed information about past subscriptions. The best you can do is log the status of current ones as they make scheduled payments. Authorize.Net offers a service similar to Paypal's IPN called Silent Post which sends transaction information about all transactions run for an account. This includes ARB subscriptions.
Here's a basic script for handling Silent Post submissions with PHP and only handling ARB subscription payments:
<?php
// Get the subscription ID if it is available.
// Otherwise $subscription_id will be set to zero.
$subscription_id = (int) $_POST['x_subscription_id'];
// Check to see if we got a valid subscription ID.
// If so, do something with it.
if ($subscription_id !== 0)
{
// Get the response code. 1 is success, 2 is decline, 3 is error
$response_code = (int) $_POST['x_response_code'];
// Get the reason code. 8 is expired card.
$reason_code = (int) $_POST['x_response_reason_code'];
if ($response_code == 1)
{
// Approved!
// Some useful fields might include:
// $authorization_code = $_POST['x_auth_code'];
// $avs_verify_result = $_POST['x_avs_code'];
// $transaction_id = $_POST['x_trans_id'];
// $customer_id = $_POST['x_cust_id'];
}
else if ($response_code == 2)
{
// Declined
}
else if ($response_code == 3 && $reason_code == 8)
{
// An expired card
}
else
{
// Other error
}
}
?>
Disclaimer: I wrote both blog articles
Upvotes: 1