You are here

function commerce_braintree_payment_session_load in Commerce Braintree 7

Same name and namespace in other branches
  1. 7.3 commerce_braintree.module \commerce_braintree_payment_session_load()
  2. 7.2 commerce_braintree.module \commerce_braintree_payment_session_load()

Get the "card on file" choice (reuse a card, which card or new card) in a session variable.

Parameters

$order_id:

$choice:

2 calls to commerce_braintree_payment_session_load()
commerce_braintree_cof_process_transaction in ./commerce_braintree.commerce_braintree_cof.inc
Process the payment transaction with the info received.
commerce_braintree_cof_redirect_form in ./commerce_braintree.commerce_braintree_cof.inc
Payment method callback: redirect form.

File

./commerce_braintree.module, line 261
Implementations of the Braintree payment gateway (http://braintreepayments.com) for drupal commerce.

Code

function commerce_braintree_payment_session_load($order_id) {
  return isset($_SESSION['order_' . $order_id]) ? $_SESSION['order_' . $order_id] : NULL;
}