Saturday, August 22, 2015

Paypal Express Checkout Error

Problem :

Security header is not valid", "ErrorCode"=>"10002"

Solution:

This error is shown when you are not properly logged into the sandbox account on paypal's site.

0. Login to www.paypal.com
1. Go to https://developer.paypal.com/developer/accounts
2. Copy API credentials for a sandox user with Business-Pro account.

1. Login to sandbox.paypal.com
2. Got to your site and checkout
3. When sent to paypal, login as one of your buyer test accounts

Resources

1. Bogus gateway to test PayPal
https://github.com/sideshowcoder/active_merchant/blob/192f49762172dc41450d7a3605158d45eb55b83b/lib/active_merchant/billing/gateways/paypal_bogus.rb
2. Classic API Endpoints
https://developer.paypal.com/webapps/developer/docs/classic/api/endpoints/
3. Merchant SDK Ruby
https://github.com/paypal/merchant-sdk-ruby
4. How to create and process an order using Express Checkout
https://developer.paypal.com/docs/classic/express-checkout/ht_ec-orderAuthPayment-curl-etc/
5. Sample Webapp that generates SDK code to use
https://paypal-sdk-samples.herokuapp.com/merchant/get_express_checkout_details