巴克莱 ePDQ 和 PHP - 付款被拒绝?
我正在使用巴克莱的 CPI ePDQ 系统从我的网站收取付款。
我已阅读文档,并且在 cURL
示例中使用了相同的代码,因此我将付款发送到付款页面。
我遇到的问题分为两部分。
1. Payments are always declined
2. I have configured the post url as http://example.com/payment-response.php with an echoing out $_POST - which returns nothing
我做错了什么吗?我看到有人提到使用 .htpasswd 但我不确定。
似乎没有任何原因导致付款/卡被拒绝。
这是我的 cURL 请求:
$url = 'https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdqEncTool.e';
$params = "clientid=xxxxxx&password=xxxxxxxxx&oid=".$orderId."&chargetype=Auth&total=".$total."¤cycode=826";
$user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; $ch = curl_init();
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // this line makes it work under https
$result=curl_exec($ch);
<FORM action="https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e" method="POST">
<?php print "$result"; ?>
<INPUT type="hidden" name="returnurl" value="http://example.com/payment-response.php">
<INPUT type="hidden" name="merchantdisplayname" value="TEST">
<INPUT TYPE="submit" VALUE="purchase">
</FORM>
payment-response.php
- 在 var_dumping $_POST
时返回一个空白数组。
还有其他方法可以从 ePDQ 获取发布数据吗?
谢谢
I am using the Barclay's CPI ePDQ system to take payments from my website.
I have read the docs and I have used the same code for the cURL
example and I thus I send the payment to the payment page.
The problem I have though is in 2 parts.
1. Payments are always declined
2. I have configured the post url as http://example.com/payment-response.php with an echoing out $_POST - which returns nothing
Is there anything I'm doing wrong? I have seen some mention of using .htpasswd but I'm not sure.
There doesn't seem to be any reason why the payment/card was declined.
Here is my cURL request:
$url = 'https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdqEncTool.e';
$params = "clientid=xxxxxx&password=xxxxxxxxx&oid=".$orderId."&chargetype=Auth&total=".$total."¤cycode=826";
$user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; $ch = curl_init();
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // this line makes it work under https
$result=curl_exec($ch);
<FORM action="https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e" method="POST">
<?php print "$result"; ?>
<INPUT type="hidden" name="returnurl" value="http://example.com/payment-response.php">
<INPUT type="hidden" name="merchantdisplayname" value="TEST">
<INPUT TYPE="submit" VALUE="purchase">
</FORM>
payment-response.php
- returns a blank array when var_dumping the $_POST
.
Is there any other way of getting the post data back from ePDQ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,看来您需要先激活帐户。巴克莱银行默认不会激活该帐户,因此您必须填写表格告诉他们。
花了整个早上试图弄清楚这一点。
给他们打电话可能更容易,因为他们可以看到对其系统的所有请求以及您的请求产生的所有错误
Ok, so it seems that you need to activate the account first. Barclay's do not activate the account by default, so you have to fill in a form to tell them.
Spent all morning trying to figure that out.
Probably easier to ring them up since they can see all the requests to their system and all the errors your requests produce
我必须遵循的一些步骤:
1)下载扩展:Barclaycard ePDQ CPI 支付模块
magentocommerce.com/magento-connect/config/extension/2050/barclaycard-epdq-cpi-
payment-module#releases 如果您无法使用 Magento Connect 1.0 的密钥,请从 freegento.com/ddl-magento-extension.php 下载。
2) 将所有应用程序复制到您的 magento 安装后(如果您有自己的模板),请确保将 epdq 文件夹从以下位置移动:
设计/前端/默认/模板/epdq
到:
design/frontend/your-package/default/template/epdq
如果您输入以下内容,您可以检查它是否位于正确的位置:
your-domain.com/epdq/cpi/redirect/
3) 使用附加文件更改 app/code/community/Barclaycard/Epdq/Model/Cpi.php
(我只是用 Markus 和 validBen 更改它)
4)转到巴克莱页面添加您的网址:
secure2.mde.epdq.co.uk/cgi-bin/CcxBarclaysEpdqAdminTool.e
您必须使用商家或客户 ID 以及从巴克莱获得的凭据。
在允许的 URL 处添加:
your-domain.com/epdq/cpi/redirect/
发布网址
your-domain.com/epdq/cpi/postUrl/
不要忘记最后一个“/”不在文档中。
添加您喜欢的任何密码,
是的继续选项以及您的密码和邮件
5) 转到模块的方法付款配置,并添加您在表单中添加的相同详细信息。
6)根据你的信念做一些委派的事情。
我喝了一杯啤酒,在喝之前给了帕查玛玛一些慷慨的滴,然后我用我从巴克利得到的信用卡详细信息之一测试付款。
好运
祝Eduardo
!如何配置 ePDQ]1
Some of the steps i had to follow:
1) download the extension: Barclaycard ePDQ CPI payment module
magentocommerce.com/magento-connect/config/extension/2050/barclaycard-epdq-cpi-payment-module#releases
if you cant then download from freegento.com/ddl-magento-extension.php with the key for Magento Connect 1.0.
2) after you copy all app to your magento instalation in case you have your own template be sure you move the folder epdq from:
design/frontend/default/template/epdq
to:
design/frontend/your-package/default/template/epdq
you can check it is in the right place if you type:
your-domain.com/epdq/cpi/redirect/
3) change the app/code/community/Barclaycard/Epdq/Model/Cpi.php with the attached file
(i just change it with the Markus and validBen)
4) go to the barclays page to add your url:
secure2.mde.epdq.co.uk/cgi-bin/CcxBarclaysEpdqAdminTool.e
You have to use the merchant or client ID and the credentials you got from barclays.
At the allowed URL add:
your-domain.com/epdq/cpi/redirect/
Post URL
your-domain.com/epdq/cpi/postUrl/
Dont foreget the last “/” is not in the documentation.
add any pass-phrase you like
the continue Options in yes and your paswords and mail
5) go to the method payment configuration for the module and add the same details you added in the form.
6) do some kine of persignation according to your belives.
I take a beer and give some generose drops to the pachamama before i drink it then i test the payment with one of the credit card details i got from barkleys.
Good luck
Eduardo
!how to configure ePDQ]1