Tyler Kocheff
11/02/2022, 6:09 PM#<OpenStruct name="AUTHENTICATION_FAILURE", message="Authentication failed due to invalid authentication credentials or a missing Authorization header.", links=[#<OpenStruct href="<https://developer.paypal.com/docs/api/overview/#error>", rel="information_link">]>
Traced it back to models/solidus_paypal_commerce_platform/gateway.rb in the create_order
block. I added a binding.pry
before @client.execute(request)
and the request doesn't seem to have any bearer token. If I do request.headers["Authorization"] = "Bearer (redacted bearer token)"
it works. Not sure how the gem would normally handle the authentication but if anyone has any pointers, please let me know.Tyler Kocheff
11/02/2022, 8:01 PM07e58774090add0660b175bfaf22f0925884f6b3
which seems to work after updating the gemspec to allow Ruby 3 and monkey patching to fix an error where it is trying to call URL.escape.
Still hoping to figure out what's wrong with the current version of the gem in our installation.waiting_for_dev
11/03/2022, 9:11 AM07e58774090add0660b175bfaf22f0925884f6b3
but not with c4e7fb9b3a7c48cb4f90129b725ad46995822bfb
?Tyler Kocheff
11/03/2022, 4:07 PMfee386c89cc76300fab98e0e17a31c9ceac5e4f9
waiting_for_dev
11/04/2022, 4:54 AMauthorizationString
method to authorization_string
. Is it possible that you are using the old name somewhere? Do you have something for grep -r authorizationString .
in your project root?