You are here

function commerce_braintree_process_transaction in Commerce Braintree 7

Process the payment transaction with the info received.

Parameters

object $order: The loaded order that is being processed

array $payment_method: The payment method settings

string $feedback: The parameters received from Braintree regarding the payment

bool $redirect: Specifies whether to call redirect functions or not

1 call to commerce_braintree_process_transaction()
commerce_braintree_redirect_form_validate in ./commerce_braintree.commerce_braintree.inc
Implements hook_redirect_form_validate().

File

./commerce_braintree.commerce_braintree.inc, line 96
Include payment method settings callback, redirect form callbacks...

Code

function commerce_braintree_process_transaction($order, $payment_method, $feedback, $redirect = TRUE) {
  _commerce_braintree_init_credentials($payment_method);
  $result = Braintree_TransparentRedirect::confirm($feedback);
  _commerce_braintree_default_process_transaction($result, $order, $payment_method, $redirect);
}