You are here

function _uc_authorizenet_cim_payment_profile_get in Ubercart 5

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

Get a CIM payment profile stored at auth.net.

File

payment/uc_authorizenet/uc_authorizenet.module, line 419
Process payments using Authorize.net. Supports AIM and ARB.

Code

function _uc_authorizenet_cim_payment_profile_get($order, $profile_id, $payment_profile_id) {
  $server = variable_get('uc_authnet_cim_mode', 'disabled');
  $request = array(
    'customerProfileId' => $profile_id,
  );

  // Request a profile from auth.net.
  $xml = _uc_authorizenet_xml_api_wrapper('getCustomerPaymentProfileRequest', _uc_authorizenet_array_to_xml($request));

  // Parse the response.
  $response = _uc_authorizenet_cim_parse_response(uc_authorizenet_xml_api($server, $xml));
  return $response['resultCode'] == 'Error' ? FALSE : $response;
}