Magento – Configuring PayPal Express Checkout Settings – Sandbox Mode

magento-enterprisepaypal

I have created an account on PayPal sandbox and configured the API/Integration Settings to use the appropriate username, password and signature with a Magento 1.12 EE instance on my local server. This worked fine and now, I tried removing (emptying) the credentials and updating them again with the same values and now, on the frontend I am receiving the following error.

PayPal gateway has rejected request. Security header is not valid
(#10002: Security error).

As per some of the forum posts, I have cleared cache, logged out and logged backed in to Magento and I have tried the same credentials and I am receiving the above error.

Any help regarding this would be helpful.

For your reference,

  • Sandbox mode is set to Yes
  • API uses proxy is set to No

Best Answer

In my experience, 10002 is a pretty broad error, meaning that any number of things could be wrong from certificate invalidation to incorrect API credentials; I've seen this most often in conjuction with setting up Website Payments Pro. If that's the case and you're using WPP, you'll need to contact Paypal Developer Support to have them enable WPP for your sandbox account. Yes, that's a pain in the rear.

However, if you're not using WPP and you're exclusively trying to set up Express - try the following:

In Paypal, navigate to PROFILE > MY SELLING PREFERENCES > API ACCESS

Find the option that says “Accept payments from your online shops before setting up APIs” - set this to ALLOW.

For more information on Paypal error codes, check out the following guide:

https://developer.paypal.com/webapps/developer/docs/classic/api/errorcodes/