paypal - Braintree integration
shanthini
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
May-05-2018
08:21 AM
I just started Braintree integration for one of our client. I am now checking with sandbox.
- I am using the sample script as below
<?php require_once './lib/Braintree.php'; // Instantiate a Braintree Gateway either like this: $gateway = new Braintree_Gateway([ 'environment' => 'sandbox', 'merchantId' => 'xxxxxxxxxxxxxxxx', 'publicKey' => 'xxxxxxxxxxxx', 'privateKey' => 'xxxxxxxxxxxxxxxxxxxxxxxx' ]); $result = $gateway->transaction()->sale([ 'amount' => '1000.00', 'paymentMethodNonce' => 'nonceFromTheClient', 'options' => [ 'submitForSettlement' => true ] ]); if ($result->success) { print_r("success!: " . $result->transaction->id); } else if ($result->transaction) { print_r("Error processing transaction:"); print_r("\n code: " . $result->transaction->processorResponseCode); print_r("\n text: " . $result->transaction->processorResponseText); } else { print_r("Validation errors: \n"); print_r($result->errors->deepAll()); } ?>
2. But while executing this script this shows below error.
91565 - Unknown or expired paymentMethodNonce
3. Could you please suggest whether I need to generate ‘nonceFromTheClient' and need to include
If yes, how
Thanks
Labels:
- Labels:
-
Reference Transactions
1 REPLY 1
MTS_Justin
Moderator
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May-18-2018
07:39 AM
Hello,
There was another user with the same issue in this thread where a solution was provided
Was my post helpful? If so, please give me a kudos!
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Using Paypal Smart Buttons for checkout sometimes fails with Debit/ Credit Cards Form in Braintree Client-side Integration (JS, iOS, Android SDKs)
- Sandbox account not generating IPNs in Sandbox Environment
- Need help to integrate PayPal Checkout (PPCP) with OpenCart? in PayPal Upgrade Community
- How can I integrate PayPal to enable direct tipping features between users on a content platform? in REST APIs
- Need help to integrate PayPal Checkout with Ecwid in PayPal Upgrade Community