function _commerce_braintree_commerce_payment_checkout_custom_validation in Commerce Braintree 7
Same name and namespace in other branches
- 7.3 commerce_braintree.module \_commerce_braintree_commerce_payment_checkout_custom_validation()
- 7.2 commerce_braintree.module \_commerce_braintree_commerce_payment_checkout_custom_validation()
Callback. Custom checkout payement validation.
_state
Parameters
$form:
$checkout_pane:
$order:
Return value
bool
1 string reference to '_commerce_braintree_commerce_payment_checkout_custom_validation'
File
- ./
commerce_braintree.module, line 235 - Implementations of the Braintree payment gateway (http://braintreepayments.com) for drupal commerce.
Code
function _commerce_braintree_commerce_payment_checkout_custom_validation($form, &$form_state, $checkout_pane, $order) {
if (isset($form_state['values']['commerce_payment']['payment_details']['cardonfile'])) {
commerce_braintree_payment_session_save($order->order_id, $form_state['values']['commerce_payment']['payment_details']['cardonfile']);
return TRUE;
}
// Do nothing, but still return TRUE.
return TRUE;
}