Paypal Smart Payment Buttons plugin issues

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
I'll put a ticket in with my hosting provider right now. What I don't understand is that Paypal Standard has been working fine on this site. I would think I'd have the same issues with Paypal standard as I'm having with this Paypal Smart Button plugin.
4 years ago
Standard probably just redirects the browser to PayPal's site.  Smart Buttons download a ton of javascript to create the buttons, popup window, and all the scripts to handle everything.  The problem you're having is the javascript SDK is not downloading (the call initiates from your server, not the browser) so when PayPal tries to talk to your buttons they don't have what they need to work.  At least that's my best guess.
4 years ago
They won't disable TLS 1.1 since I'm in a shared server. Is there a way to force TLS 1.2 when using NOP without source code?
4 years ago
Well that's frustrating, no one needs TLS 1.1 anymore.  I found these but they seem to be for .net standard and not core

https://www.smarterasp.net/support/kb/a1974/how-to-force-asp_net-to-use-tls-1_2-while-making-the-http-request.aspx
https://kevinchalet.com/2019/04/11/forcing-an-old-net-application-to-support-tls-1-2-without-recompiling-it/
https://stackoverflow.com/questions/49399205/how-to-use-tls-1-2-in-asp-net-core-2-0

this gets closer but still doesn't help:
https://stackoverflow.com/questions/54150473/how-to-implement-tls-1-2-in-asp-net-core-2-0

Basically, core should use the strongest option available in the OS but I distinctly remember going through this a few years ago when PayPal mandated TLS 1.2, in that if PayPal detects TLS 1.1 enabled on your server that they would refuse the connection.
4 years ago
Switched hosting providers. I'm now on a VPS and have disabled TLS 1.1. Only have TLS 1.2 enabled. Still running into this issue, however, I believe I found the fix.
Under Settings > Order settings > Checkout section
I needed to check 'Order totals on payment info tab. Once I have this checked, Paypal Smart Buttons work correctly.
4 years ago
oh man, sorry for sending you down the wrong turn
4 years ago
No worries at all! This was something we had planned anyway. It just made it more of a priority. Site has quite a few more resources now. I appreciate all your help and suggestions.
4 years ago
try changing your cookie options on your startup. this solved my issue


    options.Cookie.SecurePolicy = CookieSecurePolicy.SameAsRequest;
3 years ago
Looking for some help trying to get the Smart Buttons to work on Nop 4.2

Followed all the recommendations on this post, made sure "Order totals" was checked in settings, double checked everything.  Made sure https and SSL is on, and tested on a dev and production server.  Same error on both.  This is for a live a account, not sandbox.  Confirmed PayPal account is a business account.

Getting this error:
Failed to load resource: the server responded with a status of 400 ()

In browser developer tools I can see the broken request (400) which returns:
Invalid sdk meta: eyJ1cmwiOiIvL3d3dy5wYXlwYWwuY29tL3Nkay9qcz9jbGllbnQtaWQ9QWJ ....

Followed the video tutorial exactly, re-saved all settings, restarted app, IIS app pool, etc.

Found the same issue on stack overflow article: https://stackoverflow.com/questions/58859563/paypal-checkout-integration-with-js-sdk-buttons-problem-with-invalid-sdk-meta

The solution there was to ensure https was used with https://www.paypal.com/sdk/js, but I can see Nop plugin is doing that and can confirm in dev tools.

Spent about a week now racking my brain trying to find what else to check for, absolutely nothing is working.  Any help or suggestions would be greatly appreciated.
3 years ago
I remember tracking this error down to a TLS 1.2 issue:
https://developer.paypal.com/docs/api/info-security-guidelines/#usetls12

If PayPal detects insecure TLS 1.1 or older protocols enabled on your server during the https handshake they can fail to send the js SDK to your browser.  May be worth testing your domain to rule it out:
https://www.ssllabs.com/ssltest/
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.