Authorize.Net将升级对Internet连接的访问 为我们的数据中心服务。而不是允许直接连接, 所有互联网流量都将通过第三方Akamai进行传输 路由和提供互联网流量的云网络服务。
现在可用的新Akamai交易网址是:
https://api2.authorize.net/xml/v1/request.api
我如何升级当前系统以使用它们?
require_once 'anet_php_sdk/AuthorizeNet.php';
define("AUTHORIZENET_API_LOGIN_ID", $authLogin);
define("AUTHORIZENET_TRANSACTION_KEY", $authKey);
//Set to true for test account, set to false for real account
define("AUTHORIZENET_SANDBOX", false);
$sale = new AuthorizeNetAIM;
$sale->amount = $rate;
$sale->card_num = $ccnumber;
$sale->exp_date = $ccexpire;
$sale->card_code = $cccvv;
$response = $sale->authorizeOnly();
//If approved, use this for getting the transaction ID.
if ($response->approved) {
$transaction_id = $response->transaction_id;
require_once 'anet_php_sdk/AuthorizeNet.php';
define("AUTHORIZENET_API_LOGIN_ID", $authLogin);
define("AUTHORIZENET_TRANSACTION_KEY", $authKey);
$subscription = new AuthorizeNet_Subscription;
$subscription->name = "Monitoring";
$subscription->intervalLength = "1";
$subscription->intervalUnit = "months";
$subscription->startDate = $subStartDate;
$subscription->totalOccurrences = "9999";
$subscription->amount = $rate;
$subscription->creditCardCardNumber = $ccnumber;
$subscription->creditCardExpirationDate= $ccexpire;
$subscription->creditCardCardCode = $cccvv;
$subscription->billToFirstName = $firstname;
$subscription->billToLastName = $lastname;
$request = new AuthorizeNetARB;
$response = $request->createSubscription($subscription);
$subscription_id = $response->getSubscriptionId();
答案 0 :(得分:4)
Authorize.Net SDK的1.8.5版现在支持新的Akamai端点。您可以在此处获取它们:https://Github.com/authorizenet