Paypal express checkout going live using NVP - "Security header is not valid" - php

I integrated the Paypal express checkout into our eCommerce system (NVP version 76.0, PHP 5.2) that has a bespoke checkout process.
While in development mode (using the sandbox details) everything works but the moment I switch the signature information (username, password, api_signature and the paypal url) to the live Paypal account information it stopped working. It always responds with a error code: 10002 and message: Security header is not valid
If I switch back to sandbox details it starts to work again.
Here is the error example:
TIMESTAMP: 2011-12-06T19:09:31Z
CORRELATIONID: cb966ebeb254d
ACK: Failure
VERSION: 76.0
BUILD: 2271164
L_ERRORCODE0: 10002
L_SHORTMESSAGE0: Security error
L_LONGMESSAGE0: Security header is not valid
L_SEVERITYCODE0: Error
I found some posts on stack overflow of people having the same problem but there solution didn't work #Paypal and I did some digging around (on google) and found that a lot of people experience this problem but there is no definitive solution or a thread that would outline what you need to change when you go live because just changing the details mentioned above (and in the paypal express checkout documentation) doesn't seem to work.
Did anyone find a solution to this problem or maybe I just missed something?

OK so I found the answer:
I contacted Paypal support and even after outlining the issue they still didnt provide a solution but at least there response gave me an idea of what is actually wrong.
When you put the system live you not only have to change the:
API_USERNAME
API_PASSWORD
API_SIGNATURE
PAYPAL_URL
with the live details (from Sandbox > Live) but you have to change:
API_ENDPOINT
which they do not provide in there documentation.
What I found was that when you switch to live (depending what version of the paypal SDK you have) you have to change the endpoint to the one found in this list API Endpoints
The one I had to use was:
Environment: Live
Authentication: API Signature
Calling: Name-Value Pair
Endpoint: https://api-3t.paypal.com/nvp

Related

Paypal PDT Error 4002

I am integrating Paypal into a website via Worldpay's APM payment API.
I have enabled PDT on my paypal sandbox and am using Paypal's PHP example code from their github repo to retrieve the data, however every call I do to verify the transaction via PDT returns FAIL Error: 4002.
This appears to be a generic error message and the solutions on the paypal developer website has not helped me to resolve the problem.
I also found a question from this site (in 2015) which suggested uppercase-ing the tx code. This has not helped either.
Does anyone have experience verifying with PDT while using Worldpay who has resolved this issue?
In this case it appears that Worldpay's simulator is not compatible with the Paypal sandbox, therefore no payments are going to Paypal.

How to correctly integrate PayPal's API with paypal payments pro?

I just finished building a donation form on a client's website, which processes payments through PayPal's classic api. It works fine in Sandbox mode, but I'm getting a 10501 - This transaction cannot be processed due to an invalid merchant configuration. error.
I know that this error is caused by PayPal payments pro not being enabled on the account the API is trying to access. That is were I'm somewhat confused. The account I'm connecting this donation form to is subscribed to Paypal Payments Pro.
When I first encountered the 10501 error, I thought that PayPal may require myself to log in and enable the Payments Pro service. I found a "get started" button under the payments pro section of the site, but when I click it, I'm taken to a page which only provides a link to the API documentation.
I've never worked with PayPal's API before or launched a live paypal application. I'm hoping someone can point me in the right direction.
NOTES
Just to make it clear, the PHP donation form DOES work in PayPal's sandbox mode
I have acquired the correct API keys from the live account and I know for a fact that I did not mix up the live credentials with the sandbox.
this donation form is on a website, not an mobile app (do I still need to register it as a paypal app?)
Thanks
A lot of times what happens is that PayPal enables the Virtual Terminal for you, but not the DoDirectPayment API. I would just give them a call and let them know you have Pro, but your DDP calls are resulting in this error, and they can probably get it enabled for you.
It's also possible that your version of Pro requires you to use the PayFlow API instead of DoDirectPayment. That's something they can tell you when you call them.

Paypal We are unable to complete your request at this time. Please try again later. We apologize for the inconvenience

I am attempting PayPal's express checkout this week for an online system I am building. I am running a LAMP server hosted on Koding.com(A virtual machine service) and they have no "web admin" panel. When I attempted the sandbox integration using the appropriate API URLs and API Username, Password, and Signature, it worked fine. No problems. However, when I decided to go live, using the appropriate URLs and API Username, Password, and Signature, I get the following error on the PayPal page:
We are unable to complete your request at this time. Please try again later. We apologize for the inconvenience.
To answer common questions, I have:
Switched API Urls to paypal.com vs sandbox.paypal.com
Tried deleting old API info and replacing it with new Username, Password, and Signature
Contacted PayPal support, and created a ticket.
Switched between selling "Physical" and "Digital" goods, to no avail
My account is a PayPal "business" account.
Any help would be appreciated!
Found the answer. When going live with PayPal, you have to go into the PayPal developer portal and create a new application and get it approved because you're working with real money. Silly me.

PayPal Express Checkout Instant Update CallbackURL not being called in live setup

I'm working on integrating PayPal Express Checkout into an existing web application using Zen Cart .
Everything, including the Instant Update Callback, works fine in a setup that uses Sandbox settings. The Callback works fine both on HTTP and HTTPS in the Sandbox. But as soon as I switch to Live credentials, the PayPal UI stops hitting the CallbackURL and falls back to using the (fall back) shipping costs sent in SetExpressCheckout.
I'm using the latest version of the PayPal PHP SDK . The only settings that are changed to switch the setup from Sandbox to Live are:
UserName
Password
Signature
mode (from sandbox to live)
Any help on this issue will be greatly appreciated. The SSL is certified by mainstream SSL issuing company.
Do you have a business account? Are you verified?
I'm just throwing guesses as I just worked on part of API that requires verified bussiness account.
Did you check out the call output? It'd be better if you posted source code.

Disable sandbox mode for Paypal Express

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.
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.
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

Categories