You are here

function commerce_authnet_cim_delete_customer_payment_profile_request in Commerce Authorize.Net 7

Submits a deleteCustomerPaymentProfileRequest 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.

1 call to commerce_authnet_cim_delete_customer_payment_profile_request()
commerce_authnet_cim_cardonfile_delete in ./commerce_authnet.module
Card on file callback: deletes the associated customer payment profile.

File

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

Code

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

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