You are here

function commerce_stripe_cardonfile_create_form_submit in Commerce Stripe 7.2

Same name and namespace in other branches
  1. 7.3 commerce_stripe.module \commerce_stripe_cardonfile_create_form_submit()
  2. 7 commerce_stripe.module \commerce_stripe_cardonfile_create_form_submit()

File

./commerce_stripe.module, line 487
This module provides Stripe (http://stripe.com/) payment gateway integration to Commerce. Commerce Stripe offers a PCI-compliant way to process payments straight from you Commerce shop.

Code

function commerce_stripe_cardonfile_create_form_submit($form, &$form_state) {
  $card_data = $form_state['card_data'];
  $payment_method = commerce_payment_method_instance_load($card_data->instance_id);
  commerce_stripe_cardonfile_create($form, $form_state, $payment_method, $card_data);
  $form_state['redirect'] = 'user/' . $card_data->uid . '/cards';
}