我正在将eway共享支付网关添加到我的网站,我正在测试这个sanbox详细信息我已经设置了所有内容,但服务响应不允许我通过:
以下是他们的回答:
HTTP / 1.1 200 OK Cache-Control:private Content-Length:127 Content-Type:text / html; charset = utf-8服务器:Microsoft-IIS / 7.5 p3p:CP =“NOI ADM DEV PSAi COM NAV OUR STP IND DEM”Set-Cookie:ASP.NET_SessionId = qwfm2j0wpkt35tm0eunu0v2y;路径= /; HttpOnly X-AspNet-Version:4.0.30319 X-Powered-By:ASP.NET Date:Wed,31 Jul 2013 08:14:27 GMT FalseCurrency无效或不被允许;
正如您所看到的,答案的最后一行是:货币无效或不允许;
以下是eway整合的代码:
// Eway payment in PHP
$pathvalue="http://localhost/eway/test_hosted/";
if($_GET['action']=="payment")
{
$ewayurl.="?CustomerID=92539274";
$ewayurl.="&UserName=ravi.soni@ideavate.com.sand";
$ewayurl.="&Amount=".$_POST['Amount'];
$ewayurl.="&Currency=GBP";
$ewayurl.="&PageTitle=".$_POST['PageTitle'];
$ewayurl.="&PageDescription=".$_POST['PageDescription'];
$ewayurl.="&PageFooter=".$_POST['PageFooter'];
$ewayurl.="&Language=".$_POST['Language'];
$ewayurl.="&CompanyName=".$_POST['CompanyName'];
$ewayurl.="&CustomerFirstName=John";
$ewayurl.="&CustomerLastName=Doe";
$ewayurl.="&CustomerAddress=123 ABC Street";
$ewayurl.="&CustomerCity=London";
$ewayurl.="&CustomerState=Alabama";
$ewayurl.="&CustomerPostCode=W1B 3HH";
$ewayurl.="&CustomerCountry=United Kingdom";
$ewayurl.="&CustomerEmail=sample@eway.co.uk";
$ewayurl.="&CustomerPhone=0800 123 4567";
$ewayurl.="&InvoiceDescription=".$_POST['InvoiceDescription'];
$ewayurl.="&CancelURL=".$pathvalue."ewaysharedpage.php";
$ewayurl.="&ReturnUrl=".$pathvalue."ewayresponse.php";
$ewayurl.="&CompanyLogo=https://www.eway.co.uk/secure/images/eWAYLogo1.gif";
$ewayurl.="&PageBanner=https://www.eway.co.uk/Join/Secure/_images/TopBannerV6.gif";
$ewayurl.="&MerchantReference=".$_POST['RefNum'];
$ewayurl.="&MerchantInvoice=".$_POST['Invoice'];
$ewayurl.="&MerchantOption1=";
$ewayurl.="&MerchantOption2=";
$ewayurl.="&MerchantOption3=";
$ewayurl.="&ModifiableCustomerDetails=".$_POST['ModDetails'];
$spacereplace = str_replace(" ", "%20", $ewayurl);
$posturl="https://payment.ewaygateway.com/Request/$spacereplace";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $posturl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
if (CURL_PROXY_REQUIRED == 'True')
{
$proxy_tunnel_flag = (defined('CURL_PROXY_TUNNEL_FLAG') && strtoupper(CURL_PROXY_TUNNEL_FLAG) == 'FALSE') ? false : true;
curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, $proxy_tunnel_flag);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY, CURL_PROXY_SERVER_DETAILS);
}
$response = curl_exec($ch);
if($response){
print_r($response);
die('Response');
}
有人能指出我做错了吗?
谢谢
答案 0 :(得分:0)
在将请求URL更改为:
后,我解决了问题http://sandbox.uk.ewaypayments.com/
From : https://payment.ewaygateway.com/
谢谢