You are here

function commerce_authnet_cim_get_customer_payment_profile_request in Commerce Authorize.Net 7

Submits a getCustomerPaymentProfileRequest XML CIM API request to Authorize.Net.

Parameters

$payment_method: The payment method instance array containing the API credentials for a CIM enabled Authorize.Net account.

$cim_customer_profile_id: A numerical CIM Customer Profile ID.

$cim_payment_profile_id: A numerical CIM Customer Payment Profile ID.

Return value

A SimpleXMLElement containing the API response.

2 calls to commerce_authnet_cim_get_customer_payment_profile_request()
commerce_authnet_cim_cardonfile_update in ./commerce_authnet.module
Card on file callback: updates the associated customer payment profile.
commerce_authnet_form_commerce_cardonfile_update_form_alter in ./commerce_authnet.module
Implements hook_form_FORM_ID_alter().

File

./commerce_authnet.module, line 1703
Implements Authorize.Net payment services for use in Drupal Commerce.

Code

function commerce_authnet_cim_get_customer_payment_profile_request($payment_method, $cim_customer_profile_id, $cim_payment_profile_id) {

  // Build the get payment profile request data.
  $api_request_data = array(
    'customerProfileId' => $cim_customer_profile_id,
    'customerPaymentProfileId' => $cim_payment_profile_id,
  );
  return commerce_authnet_cim_request($payment_method, 'getCustomerPaymentProfileRequest', $api_request_data);
}