I’ve just confirmed. Both CreateOrder
and CreatePayment
requests use the same access token. They both use :currency => "CAD"
. Here is the created order id: SCrjAx2XCzqeaL4MmPE1S0NDJ7OZY
. All the currencies in the OrderCreate
response are CAD
.
They go in the same transaction, so after CreateOrder
I do CreatePayment
request, using the just the same seller_client
object (i.e. seller_client.create_order(payload1)
, then seller_client.create_payment(payload2)
) which contains all the authentication data, and it returns the mentioned error
{:code=>“BAD_REQUEST”, :detail=>“This application is not allowed to accept currency CAD.”, :category=>“INVALID_REQUEST_ERROR”}
then I decided to try to actually replace the access_token
with the wrong one just before the CreatePayment
request and i got a different error
{:code=>“UNAUTHORIZED”, :detail=>“The
Authorization
http header of your request was incorrect or expired. The header value is expected to be of the for
mat "Bearer TOKEN" (without quotation marks), where TOKEN is a valid access token (e.g. "Bearer ABC123def456GHI789jkl0"). For more information, see https
://developer.squareup.com/docs/build-basics/using-rest-api#set-the-headers .”, :category=>“AUTHENTICATION_ERROR”}
so, i’m pretty sure there is no problem with the token