Skip navigation
Help

hook_uc_payment_gateway_charge

7 uc_payment.api.php hook_uc_payment_gateway_charge($order_id, $amount, $data)

Credit card charge callback.

Called when a credit card should be processed. Credit card details supplied by the user are available in $order->payment_details[].

Parameters

$order_id: The order ID that the payment relates to.

$amount: The amount that should be charged.

$data: An array of data related to the charge. By default, includes a 'txn_type' key which defines the transaction type, usually UC_CREDIT_AUTH_ONLY or UC_CREDIT_AUTH_CAPTURE.

Return value

Returns an associative array with the following members:

  • "success": TRUE if the transaction succeeded, FALSE otherwise.
  • "message": a human-readable message describing the result of the transaction.
  • "log_payment": TRUE if the transaction should be regarded as a successful payment.

See also

hook_uc_payment_gateway()

uc_authorizenet_charge()

test_gateway_charge()

Related topics

File

ubercart/payment/uc_payment/uc_payment.api.php, line 96
Hooks provided by the Payment module.

Code

function hook_uc_payment_gateway_charge($order_id, $amount, $data) { }