作者 lihan
1 个管道 的构建 通过 耗费 0 秒

支付宝

... ... @@ -408,24 +408,27 @@ class AopClient {
* @return 提交表单HTML文本
*/
protected function buildRequestForm($para_temp) {
$sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='".$this->gatewayUrl."?charset=".trim($this->postCharset)."' method='POST'>";
//while (list ($key, $val) = each ($para_temp)) {
foreach ($para_temp as $key => $val) {
if (false === $this->checkEmpty($val)) {
//$val = $this->characet($val, $this->postCharset);
$val = str_replace("'","&apos;",$val);
//$val = str_replace("\"","&quot;",$val);
$sHtml.= "<input type='hidden' name='".$key."' value='".$val."'/>";
}
if(cmf_is_wechat()) {
return $this->gatewayUrl . "?charset=" . trim($this->postCharset);
}else {
$sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='" . $this->gatewayUrl . "?charset=" . trim($this->postCharset) . "' method='POST'>";
//while (list ($key, $val) = each ($para_temp)) {
foreach ($para_temp as $key => $val) {
if (false === $this->checkEmpty($val)) {
//$val = $this->characet($val, $this->postCharset);
$val = str_replace("'", "&apos;", $val);
//$val = str_replace("\"","&quot;",$val);
$sHtml .= "<input type='hidden' name='" . $key . "' value='" . $val . "'/>";
}
}
//submit按钮控件请不要含有name属性
$sHtml = $sHtml . "<input type='submit' value='ok' style='display:none;''></form>";
$sHtml = $sHtml . "<script>document.forms['alipaysubmit'].submit();</script>";
return $sHtml;
}
//submit按钮控件请不要含有name属性
$sHtml = $sHtml."<input type='submit' value='ok' style='display:none;''></form>";
$sHtml = $sHtml."<script>document.forms['alipaysubmit'].submit();</script>";
return $sHtml;
}
... ...
... ... @@ -105,7 +105,7 @@ class AlipayTradeService {
if($ispage)
{
$result = $aop->pageExecute($request,"post");
//echo $result;
echo $result;
}
else
{
... ...