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

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.

Related

PayPal API - sandbox on live server payment->create returns false

I have integrated PayPal on my website. I'm using paypal sandbox for processing payments and that works fine on my local machine. But when I uploaded it on my live server it didn't work.
I'm using sandbox mode on live server too and when someone clicks on 'Pay' button he gets an error message. Instead of that he should be redirected to PayPal checkout page.
This line of code returns false for some reason, and I'm passing API credentials (ApiContext class with client id and secret)
$pay = $this->payment->create(parent::getAuth());
I don't understand what went wrong, I don't get an exception or any other error message, so I can't figure it out what's going on. Everything seems all right (payer, item, details, amount classes etc), the only different thing between the site on my local machine and this one on the live server is that I have created new paypal app for my live website and I passed right api credentials for that app.
Some other info:
I'm using my person paypal account in developer paypal to create paypal app and my real account isn't business account but I don't know if that matters for sandbox testing, because it works in localhost.
You can check my website HERE
Note: I created this site just to improve my developer skills! I or anyone else will not
use this for production.

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 upgrade from Sandbox to Production, not found error

My application was working fine with paypal sanbox account but when I put my production API credentials and make application to accept real payments it is giving me:
"This webpage is not available" error on this url:
"https://www.live.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-95X1447957597540A".
I am making express checkout and credit card payments using paypal.
And I have my personal paypal account and developer account. And I am currently testing with my personal account API credentials for production purpose.
Does it require to create a new Classic App to go live?
And if yes than can I and my client both create same app?
Thanks.
You don't use live.paypal.com. The live server is just www.paypal.com.

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

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

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

Categories