开发者

Paypal IPN always return "payment_status: Pending" on sandbox?

I'm trying to implement PayPal on my website.开发者_如何学Python

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?


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.


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.


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:

Paypal IPN always return "payment_status: Pending" on sandbox?


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.


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.


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.


  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.


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.


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.


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/


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


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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜