function uc_stripe_form_uc_cart_checkout_form_alter in Ubercart Stripe 8.2
Same name and namespace in other branches
- 8.3 uc_stripe.module \uc_stripe_form_uc_cart_checkout_form_alter()
- 6.2 uc_stripe.module \uc_stripe_form_uc_cart_checkout_form_alter()
- 6 uc_stripe.module \uc_stripe_form_uc_cart_checkout_form_alter()
- 7.3 uc_stripe.module \uc_stripe_form_uc_cart_checkout_form_alter()
- 7 uc_stripe.module \uc_stripe_form_uc_cart_checkout_form_alter()
- 7.2 uc_stripe.module \uc_stripe_form_uc_cart_checkout_form_alter()
Implements hook_form_FORMID_alter() to make sure we've loaded the stripe js. It must be loaded with the original form, as can't get loaded later by ajax, although the attach method gets called IF it's been loaded.
_state
Parameters
$form:
File
- ./
uc_stripe.module, line 45 - A stripe.js PCI-compliant payment gateway
Code
function uc_stripe_form_uc_cart_checkout_form_alter(&$form, FormState $form_state) {
$form['#attached']['library'][] = 'uc_stripe/uc_stripe';
}