我试图将sagepay
与我的购物车整合。将我的购物篮发布到sage pay服务器后,它似乎不接受我的RedirectURL
。似乎我能够验证确定;但是当我尝试发送回RedirectURL
时,我会在浏览器中获得以下内容:
Error Code : 5006
Error Description : Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.
这是我从购物车到sagepay发布付款的帖子。
\sagepay request[ VPSProtocol ] => 3.00
\sagepay request[ TxType ] => PAYMENT
\sagepay request[ Vendor ] => myVendorName
\sagepay request[ VendorTxCode ] => 49
\sagepay request[ Amount ] => 9,215.00
\sagepay request[ Currency ] => GBP
\sagepay request[ Description ] => Our shopping cart
\sagepay request[ NotificationURL ] => http://www.example.com/path/to/notification-url/index.php
\sagepay request[ CustomerEMail ] => daithi.coombes@example.com
\sagepay request[ BillingFirstnames ] => Daithi
\sagepay request[ BillingSurname ] => Coombes
\sagepay request[ BillingAddress1 ] => Somewhere
\sagepay request[ BillingAddress2 ] => That place
\sagepay request[ BillingCity ] => Sheffield
\sagepay request[ BillingPostCode ] => xxxx
\sagepay request[ BillingCountry ] => GB
\sagepay request[ BillingState ] =>
\sagepay request[ BillingPhone ] => 0000
\sagepay request[ DeliveryFirstnames ] => Daithi
\sagepay request[ DeliverySurname ] => Coombes
\sagepay request[ DeliveryAddress1 ] => Somewhere
\sagepay request[ DeliveryAddress2 ] => That place
\sagepay request[ DeliveryCity ] => Sheffield
\sagepay request[ DeliveryPostCode ] => xxxx
\sagepay request[ DeliveryCountry ] => GB
\sagepay request[ DeliveryState ] =>
\sagepay request[ DeliveryPhone ] => 0000
以下是来自sagepay的notificationURL
的回复(通知VendorTxCode
与上述相同,这是实际回复):
\sagepay response[ VPSProtocol ] => 3.00
\sagepay response[ TxType ] => PAYMENT
\sagepay response[ VendorTxCode ] => 49
\sagepay response[ VPSTxId ] => {376BBFA1-5895-AB53-37CD-D932BE1F9019}
\sagepay response[ Status ] => OK
\sagepay response[ StatusDetail ] => 0000 : The Authorisation was Successful.
\sagepay response[ TxAuthNo ] => 7605576
\sagepay response[ AVSCV2 ] => SECURITY CODE MATCH ONLY
\sagepay response[ AddressResult ] => NOTMATCHED
\sagepay response[ PostCodeResult ] => NOTMATCHED
\sagepay response[ CV2Result ] => MATCHED
\sagepay response[ GiftAid ] => 0
\sagepay response[ 3DSecureStatus ] => NOTCHECKED
\sagepay response[ CardType ] => VISA
\sagepay response[ Last4Digits ] => 0006
\sagepay response[ VPSSignature ] => 02251363205725C79A58DD175E6F96DC
\sagepay response[ DeclineCode ] => 00
\sagepay response[ ExpiryDate ] => 0519
\sagepay response[ BankAuthCode ] => 999777
但当我的NotificationURL
回应以下内容时:
\ sagepay请求[状态] =>好
\ sagepay请求[RedirectURL] => http://www.example.com/path/to/redirection-url/redirect.php
用户的屏幕显示上面的错误(代码:5006描述:无法重定向到供应商的网站。供应商未能提供RedirectionURL。)从sagepay尝试几次到我的{ {1}},然后发送以下内容:
notificationURL
我带着文档绕圈子,我迷失了。任何帮助表示赞赏。
答案 0 :(得分:0)
我已经解决了。我在notificationURL中的响应编码不正确,我使用http_build_query()
输出响应。 documentation
具体说明:
这是由POST发起的POST的纯文本响应部分 服务器在上面的步骤中。编码必须是Name = Value字段 由回车换行(CRLF)分隔。
所以我的notificationURL现在打印出如下内容:
<?php
echo "Status={$_REQUEST['Status']}
RedirectURL=http://www.example.com/path/to/RedirectURL/redirect.php";
die();
答案 1 :(得分:0)
成功网址:
$request['SuccessURL']=>'http://www.example.com/path/to/notification-url/index.php';