function _uc_authorizenet_cim_profile_charge_request in Ubercart 7.3
Same name and namespace in other branches
- 8.4 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_cim_profile_charge_request()
- 5 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_cim_profile_charge_request()
- 6.2 payment/uc_authorizenet/uc_authorizenet.module \_uc_authorizenet_cim_profile_charge_request()
Helper for building the request for a CIM profile charge.
1 call to _uc_authorizenet_cim_profile_charge_request()
- _uc_authorizenet_cim_profile_charge in payment/
uc_authorizenet/ uc_authorizenet.module - Uses a reference to charge to a CIM profile.
File
- payment/
uc_authorizenet/ uc_authorizenet.module, line 336 - Processes payments using Authorize.net. Supports AIM and ARB.
Code
function _uc_authorizenet_cim_profile_charge_request($order, $amount, $data) {
$profile = _uc_authorizenet_cim_profile_get($order, $data['ref_id']);
if ($profile['resultCode'] == 'Error') {
return $profile;
}
else {
return array(
'refId' => substr($order->order_id . '-' . REQUEST_TIME, 0, 20),
'transaction' => array(
'profileTransAuthCapture' => array(
'amount' => uc_currency_format($amount, FALSE, FALSE, '.'),
'customerProfileId' => $profile['customerProfileId'],
'customerPaymentProfileId' => $profile['customerPaymentProfileId'],
'customerShippingAddressId' => $profile['customerAddressId'],
'order' => array(
'invoiceNumber' => $order->order_id,
),
),
),
);
}
}