You are here

function commerce_braintree_payment_session_load in Commerce Braintree 7.2

Same name and namespace in other branches
  1. 7.3 commerce_braintree.module \commerce_braintree_payment_session_load()
  2. 7 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_tr_process_transaction in ./commerce_braintree.module
Processes a Transparent Redirect transaction after the customer has returned.
commerce_braintree_tr_redirect_form in ./commerce_braintree.module
Payment method callback: Braintree Transparent Redirect form.

File

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

Code

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