function commerce_authnet_cim_transaction_element_name in Commerce Authorize.Net 7
Returns the CIM transaction request type that correponds to a the Drupal Commerce constant.
Parameters
$txn_type: A Drupal Commerce transaction type constant.
1 call to commerce_authnet_cim_transaction_element_name()
- commerce_authnet_cim_cardonfile_charge in ./
commerce_authnet.module - Card on file callback: background charge payment
File
- ./
commerce_authnet.module, line 2069 - Implements Authorize.Net payment services for use in Drupal Commerce.
Code
function commerce_authnet_cim_transaction_element_name($txn_type) {
switch ($txn_type) {
case COMMERCE_CREDIT_AUTH_ONLY:
return 'profileTransAuthOnly';
case COMMERCE_CREDIT_AUTH_CAPTURE:
return 'profileTransAuthCapture';
case COMMERCE_CREDIT_CAPTURE_ONLY:
return 'profileTransCaptureOnly';
case COMMERCE_CREDIT_PRIOR_AUTH_CAPTURE:
return 'profileTransPriorAuthCapture';
case COMMERCE_CREDIT_CREDIT:
return 'profileTransRefund';
case COMMERCE_CREDIT_VOID:
return 'profileTransVoid';
default:
return '';
}
}