You are here

function commerce_braintree_js_get_nonce in Commerce Braintree 7.2

Same name and namespace in other branches
  1. 7.3 commerce_braintree.module \commerce_braintree_js_get_nonce()

Gets the payment_method_nonce from the post variables if it exists.

4 calls to commerce_braintree_js_get_nonce()
commerce_braintree_dropin_cardonfile_form_submit in modules/commerce_braintree_dropin/commerce_braintree_dropin.module
Submit handler for commerce_cardonfile form callbacks.
commerce_braintree_js_cardonfile_form_submit in ./commerce_braintree.module
Submit handler for commerce_cardonfile form callbacks.
commerce_braintree_js_form_submit in ./commerce_braintree.module
Submit callback for the Braintree JS based payment methods.
commerce_braintree_js_form_validate in ./commerce_braintree.module
Validation callback for the Braintree JS based payment methods.

File

./commerce_braintree.module, line 1060
Integrates Braintree Transparent Redirect with Drupal Commerce.

Code

function commerce_braintree_js_get_nonce() {
  return !empty($_POST['payment_method_nonce']) ? check_plain($_POST['payment_method_nonce']) : NULL;
}