我正在使用巴克萊的CPI ePDQ系統從我的網站付款。巴克萊ePDQ和PHP - 拒付付款?
我已閱讀文檔,並使用了cURL
示例中的相同代碼,因此我將付款發送到付款頁面。
雖然我有的問題是2部分。
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的一些提及,但我不確定。
付款/信用卡被拒絕似乎沒有任何理由。
這裏是我的捲曲要求:
$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獲取發佈數據?
感謝
巴克萊銀行的響應,如果其設置張貼到需要身份驗證的網址才能正常運行,你有沒有設置? (有一個單獨的配置URL,他們應該給你這個,我的是下https://cpiadmin.epdq.co.uk/) –
也是他們的示例代碼中有一個PHP +的fsockopen例如 –
我有網址和我有在表單中配置了所有的細節,例如'Pass-phrase:*','Allowed URL:'和'Post URL:'等等。所以我需要在認證下有'payment-response.php'? – user896428