Can I test paypal api#39;s from localhost(我可以从本地主机测试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/
这篇关于我可以从本地主机测试paypal api吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我可以从本地主机测试paypal api吗


- PHP foreach() 与数组中的数组? 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- PHP - if 语句中的倒序 2021-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01