header:location在屏幕上返回true语句而不是重定向

时间:2015-08-11 02:20:24

标签: php

我有一个在线表单,它使用POST方法为第三方支付系统创建网址。

我可以成功生成URL,但不是重定向浏览器,而是在屏幕上打印一条语句: 真https://au.ewaygateway.com/PaymentPage.aspx?value=Cy2oFdkOUSyL5Iu8Ui1fPzBDdaFxyr1D9VCun21aAuexxxxxx

<?php
$email = trim(strip_tags($_POST['ceml']));
$amt = trim(strip_tags($_POST['amt']));
$inv = trim(strip_tags($_POST['ord']));
header('location:https://au.ewaygateway.com/Request/?CustomerID=88888888&UserName=email@email.com&Amount='.$_POST["amt"].'&Currency=AUD&CustomerEmail='.$_POST["email"].'&ReturnUrl=http://www.domain.com.au/thank/&CancelUrl=http://www.domain.com.au&MerchantInvoice='.$_POST["inv"].''); 
exit;
?>

1 个答案:

答案 0 :(得分:0)

我在本地服务器上尝试过,它正确地重定向到ewgateaway并返回FalseMissing必填字段:金额;金额无效,因为未设置变量;来自ewgateaway网站,因为变量没有设置。代码正在按预期工作。