Upgrading Authorize.net to Akamai -
authorize.net upgrading access internet connections serve our data centers. instead of allowing direct connections, internet traffic routed through akamai, third-party cloud network service routes , delivers internet traffic.
the new akamai transaction urls available are:
https://api2.authorize.net/xml/v1/request.api
how go upgrading current system use these?
require_once 'anet_php_sdk/authorizenet.php'; define("authorizenet_api_login_id", $authlogin); define("authorizenet_transaction_key", $authkey); //set true test account, set false 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 getting 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();
version 1.8.5 of authorize.net sdks support new akamai endpoints. can obtain them here: https://github.com/authorizenet
Comments
Post a Comment