Ping sagepay 查看是否已关闭

发布于 2024-10-17 08:37:03 字数 256 浏览 8 评论 0原文

我开发自己的电子商务框架已经有一段时间了,现在正在编写结帐代码。我想使用 sagepay 来处理付款,因为我已经使用了一段时间了。但我过去曾接到过一个电话,说客户由于 sagepay 停机而无法处理付款。它没有关闭很长时间,但我想克服这个问题,我将添加一个备用付款方式,例如贝宝。由于 paypal 的佣金很高,我真的不想将这两个选项添加在一起,只有在 sagepay 宕机时才提供它。所以我的问题是,有没有办法 ping sagepay 来判断它是否已关闭?

PHP 中的 ps

i have been developing my own e-commerce framework for a while now and am now coding up the checkout. I want to use sagepay to process the payments as it is what I have used for a while. But I have haad one or to phone calls in the past saying customers where not able to process there payments due to sagepay being down. It was not down for very long but I thought to overcome this i'll add a backup payment method such as paypal. Due to paypal's high commission, I dont really want to add both options together, and only offer it when sagepay is down. So my question being, is there a way of pinging sagepay to tell whether it is down or not?

p.s. in PHP

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼眸里的那抹悲凉 2024-10-24 08:37:03

如果您有 unix/linux 底层和足够的权限,您可以简单地评估

exec('ping sagepayserver');

或者尝试通过 fsockopen() 访问服务器。

http://de.php.net/manual/en/function.fsockopen.php

If you have a unix/linux underlying and enough rights you can simply evaluate

exec('ping sagepayserver');

or you try to reach the server via fsockopen().

http://de.php.net/manual/en/function.fsockopen.php

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文