Giter Site home page Giter Site logo

Bad Request (400) when opening PayPal Payment Popup (eg clicking Pay with PayPal during checkout) about solidus_paypal_commerce_platform HOT 2 CLOSED

MFRWDesign avatar MFRWDesign commented on June 9, 2024
Bad Request (400) when opening PayPal Payment Popup (eg clicking Pay with PayPal during checkout)

from solidus_paypal_commerce_platform.

Comments (2)

seand7565 avatar seand7565 commented on June 9, 2024

Hey Thomas! Some initial thoughts here:
As you mentioned, this is probably the result of ill-formatted data somewhere. Initially, I thought this could be an issue with the data being sent (which is formatted here) - because PayPal is very picky that all numbers add up - but in that case, the PayPal dialogue should quit, a JS alert should pop up for the customer, and an error message should be logged to the server log.
Screen Shot 2020-10-14 at 3 49 14 PM

But in this case, that doesn't appear to be the case. This is the request that it should be performing, but seems like something is breaking before then. My guess is it'll be something with the paypal_order not building correctly. I'm not sure how customized your installation is, is there any reason you can think of that would make the paypal_order not build correctly?

from solidus_paypal_commerce_platform.

MFRWDesign avatar MFRWDesign commented on June 9, 2024

Looks like we finally figured this one out, or more or less. Since the bug only happens when BASIC AUTH is enabled, which we have enabled for our staging server, it seems pretty clear that's the cause. Turning it off produced another error, but as it turned out, that was related to our test credentials.

Once we had Basic AUTH off and switched in the live credentials. It worked just fine. For now, maybe we should just add a note about it in the README since everyone's setup is likely to be a bit different.

Beyond that, I think we might be able to fix this by conditionally adding the Basic Auth credentials directly to the request URL (if the BASIC_AUTH env was set). eg something simple like:
https://#{ENV['BASIC_AUTH'].present? ? ENV['BASIC_AUTH'] + "@" : ""}staging-server-on-heroku.com/solidus_paypal_commerce_platform/paypal_orders/R684159333?payment_method_id=3&order_token=gtZcM_4Ksdb4aGFZjCah7Q

from solidus_paypal_commerce_platform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.