use foreign transaction rate for amex cards
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
jQuery(document).ready(function($) {
|
||||
var settings = Drupal.settings.booking_stripe;
|
||||
var $stripeForm = $("#" + settings.form_selector);
|
||||
var $settings = Drupal.settings.booking_stripe;
|
||||
var $stripeForm = $("#" + $settings.form_selector);
|
||||
var handler = StripeCheckout.configure({
|
||||
key: settings.pubkey,
|
||||
image: settings.image,
|
||||
locale: 'auto',
|
||||
token: function(token) {
|
||||
try {
|
||||
// Use the token to create the charge with a server-side script.
|
||||
// You can access the token ID with `token.id`
|
||||
//store the returned token into hidden form elements
|
||||
$(':input[name="token_id"]', $stripeForm).val(token.id);
|
||||
$(':input[name="token_email"]', $stripeForm).val(token.email);
|
||||
$(':input[name="token_client_ip"]', $stripeForm).val(token.client_ip);
|
||||
$(':input[name="card_brand"]', $stripeForm).val(token.card.brand);
|
||||
$(':input[name="card_cvc_check"]', $stripeForm).val(token.card.cvc_check);
|
||||
$(':input[name="card_address_zip_check"]', $stripeForm).val(token.card.address_zip_check);
|
||||
$stripeForm.get(0).submit();
|
||||
}
|
||||
catch(err) {
|
||||
@@ -24,8 +27,8 @@ jQuery(document).ready(function($) {
|
||||
//currentForm = $(this).closest('form');
|
||||
//if (currentForm === undefined)
|
||||
// return;
|
||||
var settings = Drupal.settings.booking_stripe;
|
||||
var $stripeForm = $("#" + settings.form_selector);
|
||||
var $settings = Drupal.settings.booking_stripe;
|
||||
var $stripeForm = $("#" + $settings.form_selector);
|
||||
//$description = $(':input[name="description"]', $stripeForm).val();
|
||||
//console.log([$description]);
|
||||
//description: currentForm.find('input[name="description"]').val(),
|
||||
|
Reference in New Issue
Block a user