craigchristenson / woocommerce-2checkout-api

2Checkout Payment API WooCommerce Payment Module
MIT License
57 stars 43 forks source link

Authorization failed in Sandbox #43

Open Jon007 opened 6 years ago

Jon007 commented 6 years ago

Hi, I'm still testing in the sandbox and I get authorisation failed with API Call Log like:

Call Timestamp API Call Attempted API Call Body Key / Token Match Response Body to Seller
2018-06-22 07:16:05 AM Authorization No Items Selected. No Authorization Failed

I did one successful sandbox test using Postman following the instructions at: https://www.2checkout.com/documentation/sandbox/payment-api-testing generating the key from the pastebin code and running in postman as advised.

the error could perhaps relate to:

41 2co.js can't be loaded

Jon007 commented 6 years ago

2checkout have replied confirming telephone number is a required field. This was causing failures in the testing since telephone number was not a required field in the woocommerce setup.

Since 2checkout is requiring the phone number but the shop and the shop managers do not want and therefore should not store the phone number (under data privacy rules), then the plugin should implement the solution.

2checkout: " The "phoneNumber" parameter is among the required attributes that need to be passed when creating a sale. For more information regarding the required attributes please access our Payment API documentation: https://www.2checkout.com/documentation/payment-api/create-sale

Our Sandbox environment has limited resources and the only supported currencies are USA, EUR, GBP, therefore testing with a different currency will generate failed transactions.

Also you may find our test data for Sandbox accounts: https://www.2checkout.com/documentation/sandbox/test-data "

tsangaris commented 6 years ago

@Jon007 any solution on that? I am using the outdated-official 2Checkout plugin for Woocommerce, but I get the 503 response from https://sandbox.2checkout.com/checkout/api/2co.js 503 (Service Unavailable).

Jon007 commented 6 years ago

Check you put in a phone number and that your test user is from a supported country and using supported currency... In my case it was optional phone number and a test shopper in unsupported country, both caused this problem.

tsangaris commented 6 years ago

Hi @Jon007 , thanks for the input! I just moved to live environment and enabled Demo, so my credit card is not charged. Now is working.