You are here

function _uc_authorizenet_arb_parse_response in Ubercart 7.3

Same name and namespace in other branches
  1. 8.4 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_arb_parse_response()
  2. 5 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_arb_parse_response()
  3. 6.2 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_arb_parse_response()

Parses an Authorize.Net XML API response; from sample PHP for ARB.

1 call to _uc_authorizenet_arb_parse_response()
uc_authorizenet_arb_update in payment/uc_authorizenet/uc_authorizenet.module
Updates an ARB subscription; for simplicity's sake, payment schedule information cannot be updated at this time.

File

payment/uc_authorizenet/uc_authorizenet.module, line 927
Processes payments using Authorize.net. Supports AIM and ARB.

Code

function _uc_authorizenet_arb_parse_response($content) {

  // Find the elements in the XML and build the return array.
  $data = array(
    'refId' => _uc_authorizenet_substr_between($content, 'refId'),
    'resultCode' => _uc_authorizenet_substr_between($content, 'resultCode'),
    'code' => _uc_authorizenet_substr_between($content, 'code'),
    'text' => _uc_authorizenet_substr_between($content, 'text'),
    'subscriptionId' => _uc_authorizenet_substr_between($content, 'subscriptionId'),
  );
  return $data;
}