我可以从本地主机测试paypal api吗
更新 1:
根据本教程关于使用贝宝的使用 PHP 的即时付款通知,除非打开某些路由器端口,否则 PayPal 无法访问本地托管的网站.这是因为该网站是关于 IPN
的,还是所有 PayPal API 都是如此?
According to this tutorial on Using PayPal's Instant Payment Notification with PHP, PayPal cannot access locally hosted websites unless certain router ports are opened. Is this because the website is about IPN
or is this true for all PayPal APIs?
原始问题:
在我的笔记本电脑上,我有一个 LAMP
环境设置,当我在上线之前使用 http://localhost
创建网站时.
On my laptop, I have a LAMP
environment setup, when I use the http://localhost
to create website before going live.
对于新项目,我需要使用 PayPal API.如果我将笔记本电脑连接到互联网,我是否可以使用本地主机来测试 PayPal API?或者我是否必须将我的网站上传到其他地方的 LAMP 主机?
For a new project, I need to use the PayPal APIs. Will I be able to use the localhost to test the PayPal APIs if I connect my laptop to the internet? Or will I have to upload my website to a LAMP host elsewhere?
您可能在想,多么愚蠢的问题,试试看是否有效.我已经尝试过了,但它不起作用,我想在进入下一步之前排除这个问题.
You're probably thinking, what a stupid question, just try it to see if it works. I have tried it and it's not working and I wanted to rule out this question before going onto the next step.
推荐答案
它应该可以工作.去年我用 paypal 进行了支付集成,它在 localhost 上运行没有问题.
It should work. I have made a payment integration with paypal last year, and it worked on localhost without problems.
您是否使用贝宝沙盒进行开发?https://developer.paypal.com/
Are you using the paypal sandbox for development? https://developer.paypal.com/
相关文章