0

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.

Vincent Vieira
  • 437
  • 1
  • 4
  • 14

3 Answers3

1

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.

Adrian Macneil
  • 13,017
  • 5
  • 57
  • 70
  • Yes, I was. Thanks Adrian. I suspected this by looking the Paypal docs. I'm away from this project for a week, so I'll see when I'm back. – Vincent Vieira Sep 01 '13 at 08:16
0

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.

Imanol
  • 250
  • 2
  • 7
  • Paypal API returns this error, and Omnipay handles this the right way. I saw this link and I will follow it, i think it's the solution : https://developer.paypal.com/webapps/developer/docs/classic/lifecycle/goingLive/#credentials Thanks for the help anyway, I'll wait for Paypal's approval and then see.. – Vincent Vieira Aug 30 '13 at 08:02
  • Can you take the api call you are making and paste here? – Imanol Aug 30 '13 at 08:04
  • I'm not making an API call directly. Ominpay handles all this for me. I'm just calling method of the library. – Vincent Vieira Aug 30 '13 at 08:05
0

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

emonik
  • 1,540
  • 1
  • 17
  • 24