function commerce_stripe_cardonfile_create in Commerce Stripe 7
Same name and namespace in other branches
- 7.3 commerce_stripe.module \commerce_stripe_cardonfile_create()
- 7.2 commerce_stripe.module \commerce_stripe_cardonfile_create()
Card on file callback: create
1 call to commerce_stripe_cardonfile_create()
1 string reference to 'commerce_stripe_cardonfile_create'
File
- ./
commerce_stripe.module, line 1016 - 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, &$form_state, $payment_method, $card_data) {
$card = _commerce_stripe_create_card($form_state['values']['stripe_token'], $card_data->uid, $payment_method);
if (!$card) {
return;
}
_commerce_stripe_save_cardonfile($card, $card_data->uid, $payment_method, $form_state['values']['credit_card']['cardonfile_instance_default']);
}