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

支付宝

... ... @@ -408,27 +408,24 @@ class AopClient {
* @return 提交表单HTML文本
*/
protected function buildRequestForm($para_temp) {
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;
$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;
}
... ...