Skip to content

Commit e0153fc

Browse files
committed
customerId and nb payment == 1
1 parent 64a14e2 commit e0153fc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

public_html/checkout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$nonce = $_POST["payment_method_nonce"];
66
$nb = $_POST["nb_payments"];
77

8-
if ($nb_payments == 1) {
8+
if ($nb == 1) {
99
$result = $gateway->transaction()->sale([
1010
'amount' => number_format($amount, 2),
1111
'paymentMethodNonce' => $nonce,

public_html/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<script src="https://js.braintreegateway.com/web/dropin/1.14.1/js/dropin.min.js"></script>
4848
<script>
4949
var form = document.querySelector('#payment-form');
50-
var client_token = "<?php echo($gateway->ClientToken()->generate()); ?>";
50+
var client_token = "<?php echo($gateway->ClientToken([customerId => '1234'])->generate()); ?>";
5151

5252
braintree.dropin.create({
5353
authorization: client_token,

0 commit comments

Comments
 (0)