交易未重定向回网站

问题描述

我通过 Hosted Payment Page 设置付款处理。我正在使用完整重定向并确保在 redirect.init 方法 (http://WEBSITE/response.PHP)

中包含完整网站

当我进行交易时,我收到以下错误

Your transaction has been successful but there was a problem connecting back to the merchant's web site. Please contact the merchant and advise them that you received this error message.

整页重定向代码

<script>
$(document).ready(function () {
   jsonFromrequestEndpoint = <?PHP echo $hppJson; ?>;
   RealexHpp.setHppUrl("https://pay.sandBox.realexpayments.com/pay");                    
   RealexHpp.redirect.init("creditSubmit","https://WEBSITE/response_globalPay.PHP",jsonFromrequestEndpoint);
   $('#creditSubmit').click();
});
</script>

解决方法

在本地环境中进行测试时,通常会遇到此错误。

如果您想在本地环境中进行测试,您需要将本地环境暴露给互联网 - 我们为此使用了 ngrok,但您可以使用任何其他服务来帮助您做到这一点。

从上面提到的服务中获取 URL 后,只需将 WEBSITE 替换为它即可。

完成此操作后,一切都应该按预期进行。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...