Php 为sagepay设置ReturnURL

Php 为sagepay设置ReturnURL,php,curl,opayo,Php,Curl,Opayo,我需要将sagepay inframe方法集成到我的项目中。我可以抓取sagepay表格到我自己的页面。虽然我不知道在哪里设置返回url。所以有一个显示错误,比如 HTTP Status Code:500, HTTP Status Message:The request was unsuccessful due to an unexpected condition encountered by the server Error Code:5006, Error Description:Unabl

我需要将sagepay inframe方法集成到我的项目中。我可以抓取sagepay表格到我自己的页面。虽然我不知道在哪里设置返回url。所以有一个显示错误,比如

HTTP Status Code:500,
HTTP Status Message:The request was unsuccessful due to an unexpected condition encountered by the server
Error Code:5006,
Error Description:Unable to redirect to Vendor's web site. The Vendor failed to provide a RedirectionURL.
这是我的密码。在此代码中,我可以在哪里设置returnurl

if($_POST['submit']=="submit")
{
//Test authorize url
//$url="https://live.sagepay.com/gateway/service/authorise.vsp";

//Test purchase url
$url = 'https://test.sagepay.com/gateway/service/vspserver-register.vsp';
//Live
//$url = 'https://live.sagepay.com/gateway/service/vspserver-register.vsp';
$params = array();
    $params['VPSProtocol'] = '2.23';
    $params['TxType'] = 'PAYMENT';
    $params['Vendor'] = 'vendorname';
    $params['VendorTxCode'] = 'Txn-ab34qcd1';
    $params['Currency'] = 'GBP';
    $params['Amount'] = 50;
    $params['description'] = 'hello test';
    $params['NotificationURL'] = 'http://exapmle.co.uk/payment-return.php';
    $params['BillingSurname'] = 'Bobby';
    $params['BillingFirstnames'] = 'Bobbysfsf';
    $params['BillingAddress1'] = '14 Tottenham Court Road';
    $params['BillingCity'] = 'London';
    $params['BillingPostCode'] = 'W1T 1JY';
    $params['BillingCountry'] = 'GB';
    $params['billingPhone'] = '555 123-4567';
    $params['DeliverySurname'] = '123 Shipping St';
    $params['DeliveryFirstnames'] = 'Shipsville';
    $params['DeliveryAddress1'] = 'London';
    $params['DeliveryCity'] = 'London';
    $params['DeliveryPostCode'] = '54321';
    $params['DeliveryCountry'] = 'GB';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);  
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $curlTimeout);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = explode(chr(10), curl_exec($ch));
echo "<pre>";
print_r($response);
echo "</pre>";

echo $posturl = $response[5];

$posturlex=explode("L=",$posturl);
print_r($posturlex);
$nexturl = $posturlex[1];  
}
?>

<html>
    <head>
    </head>
    <body>
        <iframe src="<?=$nexturl?>" id="sageFrame" style="width:100%;height:500px;border:none"></iframe>
    </body>
</html>

当通过NotificationURL确认Sage Pay响应时,将提供重定向URL

Sage Pay Server希望Status=是响应中的第一个字符。如果在此之前您有任何HTML、注释或标题代码,请将其删除,否则Sage Pay Server会将响应视为错误并使交易失败


您是否将以下内容发送到您的通知URL中,并将其发送给Sage Pays post?您是否已经做到了这一点?Status=,RedirectURL=,StatusDetail=

现在我的答案很流畅..测试环境工作正常..现在我的问题是live环境…在将客户信息发送到sagepay后,该页面中只显示支付信息,没有卡选择选项。如果您可以查看此图像。我如何解决问题…?如果您的测试帐户上的商户号为Ecom和MOTO邮购电话订单,但您的LIVE帐户上的MID仅为MOTO,则您将收到一个错误,确认您的网站上没有可用的卡类型。如果想要处理电子商务交易,请联系Sage Pay Support 0845 111 4455,将电子商务商户号添加到供应商帐户。嗨@kalyan&Sage Pay Support我不太理解通知URL的概念。它是一个包含另一组代码的页面,并且设置了重定向规则吗?