Skip navigation
Help

hook_uc_payment_entered

6 hooks.php hook_uc_payment_entered($order, $method, $amount, $account, $data, $comment)
7 uc_payment.api.php hook_uc_payment_entered($order, $method, $amount, $account, $data, $comment)

Takes action when a payment is entered for an order.

Parameters

$order: The order object.

$method: The name of the payment method used.

$amount: The value of the payment.

$account: The user account that entered the order. When the payment is entered during checkout, this is probably the order's user. Otherwise, it is likely a store administrator.

$data: Extra data associated with the transaction.

$comment: Any comments from the user about the transaction.

Related topics

1 invocation of hook_uc_payment_entered()

File

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

Code

function hook_uc_payment_entered($order, $method, $amount, $account, $data, $comment) {
  drupal_set_message(t('User @uid entered a @method payment of @amount for order @order_id.', 
    array(
    '@uid' => $account->uid, 
    '@method' => $method, 
    '@amount' => uc_currency_format($amount), 
    '@order_id' => $order->order_id,
  ))
  );
}