Question

I'm using Omnipay with CodeIgniter to allow customers to checkout on Paypal. I was using test mode during the development on the website, but now the site is done and ready to be put in production.

But I don't know how to setup Omnipay to use live payments and not Sandbox mode. I tried setting the testMode to false. -> Security header invalid.

I tried creating REST Api credentials -> You can't make this api call.

I know that's probably not the right way to do this, but at least I explored options.

So please, what's the most suitable configuration to do live Payments on PaypalExpress with Omnipay ?

Thanks in advance.

Was it helpful?

Solution

You need to set testMode to false, or just leave it out entirely (false is the default).

Security header invalid

This means that you are trying to use test credentials with the production environment (which it sounds like you were).

You don't want to create REST credentials, you need to create API credentials for the standard PayPal NVP API.

PayPal Express requires an API Username, Password, and Signature. These are different from your PayPal account details. You can obtain your API details by logging in to your (live) PayPal account, and clicking Profile > My Selling Tools > API Access > Request/View API Credentials > Request API Signature.

OTHER TIPS

depending on what type of payments are you using you need to say paypal to activate your account for this types of transactions (this is not necessary in sandbox.
Anyway, is these error returned by omnipay or by paypal api? Copy and paste de full error here for more help.
There are a lot of differences between sandbox and real mode, sandbox usually say ok to any transaction. We had a lot of problems integrating paypal api because of bad practices in sandbox.

In order to try your code in the PayPal sandbox test environment, use the following credentials :

API username : sdk-three_api1.sdk.com
API password : QFZCWN5HZM8VBG7Q
API signature : A‑IzJhZZjhg29XQ2qnhapuwxIDzyAZQ92FRP5dqBzVesOkzbdUONzmOU

P.S: Don't forget to set testMode to true

source : PayPal NVP API Overview

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top