64

I'm trying to implement PayPal on my website.

I use this class: http://www.micahcarrick.com/php-paypal-ipn-integration-class.html

Right now I'm testing using the PayPal sandbox.

Here is the problem:

  1. User makes payment - ok
  2. User returns to my website succesfully - ok
  3. After a few seconds PayPal calls my website using IPN - ok
  4. My class successfully validate incoming IPN data.
  5. PayPal returns "payment_status: Pending"

I don't know why PayPal IPN calls back with the payment status of "pending"?

Does anyone know what I'm doing wrong?

John B
  • 20,062
  • 35
  • 120
  • 170
marc
  • 2,963
  • 7
  • 24
  • 25
  • Looks like it should be "pending" – Rob Olmos Nov 28 '10 at 18:05
  • It should be complete ? I'am right ? Paypal IPN should call me to inform me if operation was succescully or not. pending... pending, thats men i don't know is it succesfully, will be, when, now, tomorrow, always – marc Nov 28 '10 at 18:08
  • 5
    Hey, marc did you get the solution for this, i am facing same issue – amit patel Feb 18 '12 at 04:36
  • 3
    The main thing was there is the different currency from payment and your account and as Wes Hanney says you need in your account change "Block payments sent to me in a currency I do not hold" to "No, accept them and convert them to ..." – andys Oct 22 '14 at 17:33
  • Goto: My selling tools->Block payments(click on update), check first checkbox "Allow payments sent to me in a currency I do not hold:" and save – Muhammad Shahzad Apr 02 '18 at 06:49

14 Answers14

52

When you're logged into your test business account, manually navigate to:

https://www.sandbox.paypal.com/businessmanage/preferences/payments

You would normally be able to get there by going through your "My Business Setup" but currently it redirects to PayPal live (despite being in the sandbox).

Once you're on that page, change "Block payments sent to me in a currency I do not hold" to "No, accept them and convert them to ..."

Also, don't forget to confirm your business account using the PayPal Sandbox front-end and "Test Email" section of the API.

Feel The Noise
  • 654
  • 2
  • 11
  • 31
Wes Hanney
  • 539
  • 4
  • 3
15

My problem was that my sandbox merchant account was made as a British user (and GBP as currency). When I tried to go through orders in Danish kroner (DKK), it would tell me that the purchase was "Unclaimed" in the merchant view. As soon as one order in DKK was accepted, and I chose to create a new currency in DKK, IPN sent me all the "payment_status = completed" messages.

h2ooooooo
  • 39,111
  • 8
  • 68
  • 102
  • is this the same problem with live account? I have a german (live) account and want to get payment in US$ from international customers. – daniel Jun 02 '16 at 10:23
  • @zoidbergi I'd guess so but for all I know this answer is highly outdated. I haven't done PayPal stuff for years. :) – h2ooooooo Jun 02 '16 at 10:24
10

After dealing with this problem a little & PayPal changing the UI,

Here are the exact instructions from PayPal Merchant Technical Support:

Thank you for contacting Merchant Technical Support.

Please try to follow the instructions below to turn off the Payment Review function for your Sandbox account:

  • Go to PayPal Developer Website
  • Log in to your developer account
  • Click Applications
  • Click Sandbox accounts
  • Click on to the email address that you would like to turn off the Payment Review option and click Profile after it expand
  • Click Settings
  • And select Off for the Payment review.
  • Click Close

!!! Make sure you are doing this on your PayPal SandBox Merchant Account!

& Thats what it looks like:

enter image description here

Jadeye
  • 3,551
  • 4
  • 47
  • 63
9

You can resolve it by the following instruction.

  1. Login to your Developer Central.

  2. Click on Test Accounts tab on the left. You should have created these test accounts for testing on Sandbox.

  3. Find the column ‘Payment Review’.

  4. Find the sandbox account you are using and click on “Enabled” in the ‘Payment Review’ column.

  5. This should change to “Disabled” and now payments funded from your balance and credit card will complete instantly.

j0k
  • 22,600
  • 28
  • 79
  • 90
mouhammed
  • 924
  • 8
  • 16
  • I have a similar problem with PayPal sandbox. But it does not function even despite these options are Disabled. – porton Oct 12 '12 at 09:32
  • 2
    My problem source is described in a below answer: It does not work when the seller and order form have different currencies. A stupid PayPal bug – porton Oct 12 '12 at 09:47
  • I am still getting payment status as pending even after I followed your instructions and Enabled the account. – Ravinder Singh Nov 12 '12 at 05:42
  • Hey guys, am stuck for the past 2 days on this. tried every bit of advice here & every where else I could find....The only thing I have tried cause I can't seem to find is 'Payment review'...this what I have on the developer.paypal sandbox page:[developer.paypal.sandbox-account](http://ndroidians.com/pics/developer_PP_SandBox.png) – Jadeye Nov 20 '13 at 08:20
  • "Payment review" toggle button are already disabled initially. but still sandbox notify sends payment_status=pending – Zen Of Kursat Jul 31 '14 at 01:59
7

Two possible reasons:

1. seller account has option to accept or decline payment

In this case you need to login as seller and accept payment and you will get another IPN with payment_status=Completed

Steps:

  1. login to your developer central
  2. press "test accounts" on the left
  3. select seller account and press "Enter sandbox test site" on the bottom
  4. You should see seller dashboard with option to accept or decline any payment (you might need to relogin at this step using seller test account credentials)

2. Payment review is enabled

Solution:

  1. Login to your Developer Central.
  2. Click on Test Accounts tab on the left. You should have created these test accounts for testing on Sandbox.
  3. Find the column ‘Payment Review’.
  4. Find the sandbox account you are using and click on “Enabled” in the ‘Payment Review’ column.

This should change to “Disabled” and now payments funded from your balance and credit card will complete instantly.

j0k
  • 22,600
  • 28
  • 79
  • 90
Mangirdas Skripka
  • 1,647
  • 1
  • 15
  • 14
  • 1
    I've set "Block payments sent to me in a currency I do not hold" to "No, accept them and convert them to U.S. Dollars". Payment Review is disabled for all my test accounts. Nevertheless complete notifications do not happen when a test user pays with ILS (Israeli) currency. It work well with USD payments. What now the trouble is? – porton Oct 12 '12 at 10:02
  • 1
    I've checked both of these and it's still pending - are there any other reasons? :/ – digitalWestie May 01 '13 at 19:39
6
  1. I did change Allow payments sent to me in a currency I do not hold to Yes in all user accounts in the sandbox but it was still not working.

  2. I also tried to create the same currencies in the paypal form, and for the sandbox user accounts here Making the new currency primary. Converting money to the new currency. Still no success.

  3. Then I noticed the last sentence of Wes Hanney's answer: "confirm your business account using the PayPal Sandbox front-end". Trying this did not work either.

  4. M.G.Palmer's suggested in his answer to create a German merchant account. Did not work either.


What a hassle!

After one hour, where I was close to throw the PC out of the window, I just realized that I forgot one thing. Changing my real recipient email address in the paypal form to the sandbox merchant email address. That solved it finally for me.


PS: Maybe a stupid beginner's mistake? But might be helpful for others who run into the same situation.

Avatar
  • 14,622
  • 9
  • 119
  • 198
6

I had the same problem, and none of the suggestion here worked. Then I realized the problem was that I was trying to make a payment from a sandbox account to a live account. So for example if your registered business account is: email@example.com then all the sandbox payments should be made to email-facilitator@example.com otherwise they will end up in PENDING mode.

Emil Borconi
  • 3,326
  • 2
  • 24
  • 40
3

No solutions above worked for me, but helped me to find the solution.

If you are using de default business and buyer account, maybe this solution will work for you.

  1. Go to developer.paypal > sandbox.accounts
    https://developer.paypal.com/developer/accounts/

  2. Login and click on clone icon in your sandobx business account and your buyer account

  3. Set new names and emails and click create new account

  4. Open the profile of both accounts and make sure Payment Review is OFF

  5. Edit your target account in your code/app and place the new business account

  6. Repeat transaction using the new buyer account


This solution not just resolved my problem. Thanks to it the sandox.paypal design changed to the new design that uses real accounts.

This is important because some of data received by IPN in this case, may respond at different name.

2

Similar problem here - my (sandbox) merchant account was created as in the US, and I was trying to do EUR payments.

For me, it didn't matter which settings I changed, it only worked after creating a new merchant account based in Germany.

Martin T.
  • 3,132
  • 1
  • 30
  • 31
1

By default, your PayPal business account is limited to a few accepted currencies that are chosen based on your regional settings. Payments made with non-accepted currencies will stay in pending/open status. To support/accept those currencies, you need to add them to the list of "accepted currencies" on PayPal. To do so, follow these steps:

  1. Login in to PayPal with your Paypal business account
  2. Go to "Profile" > "Profile and Settings" > “My Money” > “Currencies”
  3. Add the currencies you want to support.

Remark: When using the sandbox accounts when testing, you need to perform this also for your facilitator sandbox account after login on this account using URL: https://www.sandbox.paypal.com/

BartM
  • 11
  • 1
0

The solution is what @Jadeye explains:

Go to PayPal Developer Website

  1. Log in to your developer account (sandbox)
  2. Click Applications
  3. Click Sandbox accounts
  4. Click on to the email address that you would like to turn off the Payment Review option and click Profile after it expand
  5. Click Settings
  6. And select Off for the Payment review.
  7. Click Close
mdromed
  • 49
  • 7
0

There is one more thing you may need to check:

Make shore that the language encoding of your PayPal account is set to UTF-8. Under some circumstances this is set to something like ‘windows-1256’ by default. To change it to UTF-8 you need to:

  • go into your profile then “my selling tools”
  • there, at the bottom click on “PayPal button language encoding”
  • On the next page you need to click on “More Options” where you can finally set the encoding

Every single Paypal account I've setup in Germany was set to language encoding "windows..." by default. Then IPN won't work with an UTF-8 encoded website, even in Woocommerce or EDD or event espresso.

0

I solved mine by deleting all sandbox account and recreated it.

Important NOTES:

Make sure the accounts are using the same currency with your code..

mboy
  • 744
  • 7
  • 17
0

In my case, the problem was copying credentials from the credential tab in paypal was giving "xxxx_api1.example.com". If you enter this in your "username", "account id" field, it won't work. You must enter the email. Look carefully, emails have @ in it. So you must've entered "xxxx@.example.com" both in your username and accountid field. I hope this works with you because it worked with me. I also disabled Payment Review from settings.