Zend Framework を使用して、ARB トランザクション ログのリストを取得するにはどうすればよいですか?
実際、私は Authorize.net のトランザクション詳細 API を調べましたが、ARB のスコープはありません。ですから、この問題のより良い代替ソリューションとなるものを誰でも提案できます。
前もって感謝します。
Zend Framework を使用して、ARB トランザクション ログのリストを取得するにはどうすればよいですか?
実際、私は Authorize.net のトランザクション詳細 API を調べましたが、ARB のスコープはありません。ですから、この問題のより良い代替ソリューションとなるものを誰でも提案できます。
前もって感謝します。
遡って過去のサブスクリプションに関する詳細情報を取得する方法はありません。あなたができる最善の方法は、予定された支払いを行っている現在のステータスをログに記録することです. Authorize.Net は、アカウントに対して実行されるすべてのトランザクションに関するトランザクション情報を送信するSilent Postと呼ばれる Paypal の IPN に似たサービスを提供します。これには、ARB サブスクリプションが含まれます。
PHPでサイレント ポストの送信を処理し、ARB サブスクリプションの支払いのみを処理するための基本的なスクリプトを次に示します。
<?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
}
}
?>
免責事項:私は両方のブログ記事を書きました