Sagepay Direct 3D安全空白页问题 [英] Sagepay Direct 3D Secure Blank Page Issue

查看:104
本文介绍了Sagepay Direct 3D安全空白页问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Sagepay Direct实施Omnipay,但确实在3D Secure位上苦苦挣扎.

I'm trying to implement Omnipay with Sagepay Direct but am really struggling with the 3D Secure bit.

将MD,PaReq和TermUrl发布到https://test.sagepay.com/mpitools/accesscontroler?action=pareq时,我只会得到一个空白屏幕.

When I post the MD, PaReq and TermUrl to https://test.sagepay.com/mpitools/accesscontroler?action=pareq I just get a blank screen.

这些先前的SO答案建议从PaReq字段中删除空格可以解决此问题,但我的数据中没有任何空格.

These previous SO answers suggest removing spaces from the PaReq field solves the issue, but I don't have any spaces in my data.

SagePay Direct 3DSecure结帐部件返回空白重定向到银行时页面

Sage Pay测试服务器将不会加载3D安全页面

从Omnipay方法$ response-> getRedirectData()返回的数据是

The data returned from the Omnipay method $response->getRedirectData() is

"PaReq" => "eJxVUk1TwjAQvfsrGO52mza0lVnCoBxERqcqOuMxpqt0pB8mrRZ/vQkUweTy3svO2+xLcNoVm8EXaZNX5WTIPH84FWe4Wmui+SOpVpPAWzJGvtMgzybDwGcjn7OLmEc8CXnAgmQ0FJjOHuhTYG8krI/HEA7UOmi1lmUjUKrPy8Wd4DwKoxFCT7EgvZiLgPn7HfpuIexlLGVBYqZkRsV2RaZ5pjKrNMJOR1W1ZaO3IgkihAPBVm/EumlqMwaQdW08U1bfmur2dZMrT1Ve+wGGNm/nhvQXIbh6hONF09YhY/27PBNyef308zKLuuXdA0u71DC5DrItj2/uJwiuAjPZkLDxxH4SsgGLx2E85hxhp6Ms3MUEc1P1GGvXYnZycCqgzV5TqQ5zHRhSV1cl2YoA4Q9jRkaJR/dKqdwObtOFbewkhOMgV9cuf9XYSJmLfoecX24DYwnbGzqC4Gqhf1XoP4BF/z7GLxIJvBw="

"MD" => "20150419746483421285"

这是我正在使用的表单的HTML

This is the HTML for the form I'm using

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

  <body>
    <form action="https://test.sagepay.com/mpitools/accesscontroler?action=pareq" method="post">
        <input name="MD" value="20150419746483421285" type="hidden">
        <input name="PaReq" value="eJxVUk1TwjAQvfsrGO52mza0lVnCoBxERqcqOuMxpqt0pB8mrRZ/vQkUweTy3svO2+xLcNoVm8EXaZNX5WTIPH84FWe4Wmui+SOpVpPAWzJGvtMgzybDwGcjn7OLmEc8CXnAgmQ0FJjOHuhTYG8krI/HEA7UOmi1lmUjUKrPy8Wd4DwKoxFCT7EgvZiLgPn7HfpuIexlLGVBYqZkRsV2RaZ5pjKrNMJOR1W1ZaO3IgkihAPBVm/EumlqMwaQdW08U1bfmur2dZMrT1Ve+wGGNm/nhvQXIbh6hONF09YhY/27PBNyef308zKLuuXdA0u71DC5DrItj2/uJwiuAjPZkLDxxH4SsgGLx2E85hxhp6Ms3MUEc1P1GGvXYnZycCqgzV5TqQ5zHRhSV1cl2YoA4Q9jRkaJR/dKqdwObtOFbewkhOMgV9cuf9XYSJmLfoecX24DYwnbGzqC4Gqhf1XoP4BF/z7GLxIJvBw=" type="hidden">
        <input name="TermUrl" value="https://www.example.com/payment/auth-return" type="hidden">
        <center><p>Please click button below to Authenticate your card</p><input value="Go" type="submit"></center>
    </form>
  </body>
</html>

您知道我为什么要空白页吗?将数据发送到Sagepay之前是否需要进行某种转换?

Do you know why I'm getting a blank page? Do I need to transform the data in some way before sending it to Sagepay?

我已经尽力想尽一切办法,但是一事无成.

I've tried everything I can think of but am getting nowhere.

推荐答案

好的,所以它现在神奇地起作用了....在Sagepay的末端可能是个问题吗?

ok, so it's magically working now....may have been a problem at Sagepay's end?

如果对其他人有用,这是我的iFrame代码...

In case it's useful for someone else, here's my iFrame code...

<iframe src="secure-3d.php?acsURL=<?=$responseUrl?>&PaReq=<?=$responseData['PaReq']?>&MD=<?=$responseData['MD']?>&TermUrl=<?=$responseData['TermUrl']?>" name="secure-3d" id="secure-3d" width="100%" height="500" frameborder="0"></iframe>

...其中"secure-3d.php"是我的自我提交表格,如下所示....

...where 'secure-3d.php' is my self-submitting form as below....

<form id="cardToken" name="cardToken" action="<?=$_GET['acsURL']?>" method="post">
  <input type="hidden" name="MD" value='<?=str_replace(' ','+',$_GET['MD'])?>' />
  <input type="hidden" name="PaReq" value='<?=str_replace(' ','+',$_GET['PaReq'])?>' />
  <input type="hidden" name="TermUrl" value='<?=str_replace(' ','+',$_GET['TermUrl'])?>' />
  <noscript>
    <center><p>Please click button below to Authenticate your card</p><input type="submit" value="Go"/></p></center>
  </noscript>
</form>
<script language="Javascript">
        var form = document.getElementById("cardToken");
        form.submit();
</script>

我只是将PaReq,MD和TermUrl数据传递到查询字符串中的表单,然后在创建隐藏字段时需要str_replace空格加号.

I just pass the PaReq, MD and TermUrl data through to the form in the querystring, then you need to str_replace spaces to pluses when creating the hidden fields.

应该这样做!

如果有人对如何使它变得更好有任何想法,请发表评论

If anyone has any ideas on how to make this better, please comment

这篇关于Sagepay Direct 3D安全空白页问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆