Rename var to avoid conflicts

This commit is contained in:
Laurent Destailleur 2018-03-14 23:34:05 +01:00
parent bf4a0e46aa
commit 3c8c5102c3
2 changed files with 6 additions and 8 deletions

View File

@ -1384,7 +1384,7 @@ if (preg_match('/^dopayment/',$action))
/*
print '<script src="https://checkout.stripe.com/checkout.js"
class="stripe-button"
data-key="'.$stripe['publishable_key'].'"
data-key="'.$stripearrayofkeys['publishable_key'].'"
data-amount="'.$ttc.'"
data-currency="'.$conf->currency.'"
data-description="'.$ref.'">
@ -1469,7 +1469,7 @@ if (preg_match('/^dopayment/',$action))
?>
// Create a Stripe client
var stripe = Stripe('<?php echo $stripe['publishable_key']; ?>');
var stripe = Stripe('<?php echo $stripearrayofkeys['publishable_key']; // Defined into config.php ?>');
// Create an instance of Elements
var elements = stripe.elements();

View File

@ -38,12 +38,10 @@ if (is_numeric($entity)) define("DOLENTITY", $entity);
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/stripe/config.php';
/* included into config.php
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
require_once DOL_DOCUMENT_ROOT.'/stripe/lib/stripe.lib.php';
require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php';
*/
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
// Security check
if (empty($conf->stripe->enabled)) accessforbidden('',0,0,1);
@ -1096,7 +1094,7 @@ if (preg_match('/^dopayment/',$action))
/*
print '<script src="https://checkout.stripe.com/checkout.js"
class="stripe-button"
data-key="'.$stripe['publishable_key'].'"
data-key="'.$stripearrayofkeys['publishable_key'].'"
data-amount="'.$ttc.'"
data-currency="'.$conf->currency.'"
data-description="'.$ref.'">
@ -1182,7 +1180,7 @@ if (preg_match('/^dopayment/',$action))
?>
// Create a Stripe client
var stripe = Stripe('<?php echo $stripe['publishable_key']; ?>');
var stripe = Stripe('<?php echo $stripearrayofkeys['publishable_key']; ?>');
// Create an instance of Elements
var elements = stripe.elements();