PayPal IPN Sandbox response always INVALID

假装没事ソ 提交于 2020-01-16 10:42:33

问题


I'm trying to implement PayPals IPN on my website in asp.net using C#. I am using the sample code given by PayPal found here: https://cms.paypal.com/cms_content/GB/en_GB/files/developer/IPN_ASP_NET_C.txt

I have enabled IPN on my account with the URL of the ipn on my site. The URL used in the code as you can see in the link above is the sandox url for paypal testing.

I am using the IPN Simulator and It's giving me "IPN sent successfully response" but on my website it displays invalid every time.

I have also tried displaying the strRequest string in a Label and all it shows me is "&cmd=_notify-validate" without quotes. I thought it was meant to add that part on to the rest of the returned data from PayPal.

Here is my button:

This is the button I'm using

<script src="paypal-button.min.js?merchant=myemail" 
                data-button="buynow" 
                data-name="name" 
                data-quantity="1" 
                data-amount="00.50" 
                data-currency="GBP" 
                data-shipping="0" 
                data-tax="0" 
                data-env="sandbox"
                data-return="http://site.net/thankyou.aspx"
                ></script>

What is going wrong?

UPDATE:

So.. to recap. I have 2 sandbox accounts. One business and the other personal. I enabled ipn on the business account. On my website I have the button shown above. The ipn page has the exact same code as the sample code given for the IPN in asp.net from paypal. I got the to website, click the buy now button and make the purchase using the personal account to the sandbox business account. The payment shows as complete and shows as sent with code 200 in the ipn history for the business account but when i check the label i entered on the ipn page it shows the word invalid.

Thanks!

来源:https://stackoverflow.com/questions/18153374/paypal-ipn-sandbox-response-always-invalid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!