You are here

function hook_commerce_braintree_transaction_error_alter in Commerce Braintree 7.2

Same name and namespace in other branches
  1. 7.3 commerce_braintree.api.php \hook_commerce_braintree_transaction_error_alter()

Allows other modules to alter the transaction error before it's displayed to a user.

Parameters

$error string: The error message that's displayed to the user.

$transaction: The commerce payment transaction.

$response: The response from Braintree API.

2 invocations of hook_commerce_braintree_transaction_error_alter()
commerce_braintree_js_form_submit in ./commerce_braintree.module
Submit callback for the Braintree JS based payment methods.
_commerce_braintree_default_process_transaction in ./commerce_braintree.module
Process the actual Braintree transaction.

File

./commerce_braintree.api.php, line 18
Provides hook documentation for this module.

Code

function hook_commerce_braintree_transaction_error_alter(&$error, $transaction, $response) {
  $error = t('The billing information you entered is invalid.');
}