0

我正在将 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 OTR 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');
        }

谁能指出我做错了什么?

谢谢

4

1 回答 1

0

将请求 URL 更改为:

http://sandbox.uk.ewaypayments.com/

From : https://payment.ewaygateway.com/

谢谢

于 2013-07-31T12:12:21.583 回答