You are here

function _uc_authorizenet_format_amount in Ubercart 6.2

Formats an amount for submission to Authorize.net.

Parameters

$amount: The raw amount being submitted.

Return value

mixed The amount formatted and rounded for use with Authorize.net.

2 calls to _uc_authorizenet_format_amount()
_uc_authorizenet_charge in payment/uc_authorizenet/uc_authorizenet.module
Handles authorizations and captures through AIM at Authorize.Net
_uc_authorizenet_cim_profile_charge_request in payment/uc_authorizenet/uc_authorizenet.module
Helper for building the request for a CIM profile charge.

File

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

Code

function _uc_authorizenet_format_amount($amount) {
  $context = array(
    'revision' => 'formatted-original',
    'type' => 'amount',
  );
  $options = array(
    'sign' => FALSE,
    'thou' => FALSE,
    'dec' => '.',
  );
  return uc_price($amount, $context, $options);
}