/** * 建立请求,以模拟远程HTTP的POST请求方式构造并获取连连支付的处理结果,带文件上传功能 * @param $para_temp 请求参数数组 * @param $file_para_name 文件类型的参数名 * @param $file_name 文件完整绝对路径 * @return 连连支付返回处理结果 */ function buildRequestHttpInFile($para_temp, $file_para_name, $file_name) { $para = $this->buildRequestPara($para_temp); $para[$file_para_name] = "@" . $file_name; $sResult = llpayCore::getHttpResponsePOST($this->llpay_gateway_new, $this->llpay_config['cacert'], $para, trim(strtolower($this->llpay_config['input_charset']))); return $sResult; }
public function paySubmit() { //构造要请求的参数数组,无需改动 $parameter = array("oid_partner" => trim($this->llpayConfig['oid_partner']), "app_request" => trim($this->llpayConfig['app_request']), "sign_type" => trim($this->llpayConfig['sign_type']), "valid_order" => trim($this->llpayConfig['valid_order']), "user_id" => $this->user_id, "busi_partner" => $this->busi_partner, "no_order" => $this->no_order, "dt_order" => llpayCore::local_date('YmdHis', time()), "name_goods" => $this->name_goods, "info_order" => $this->info_order, "money_order" => $this->money_order, "notify_url" => $this->notify_url, "url_return" => $this->return_url, "card_no" => $this->card_no, "acct_name" => $this->acct_name, "id_no" => $this->id_no, "valid_order" => is_numeric($this->llpayConfig['valid_order']) && 30 <= $this->llpayConfig['valid_order'] ? $this->llpayConfig['valid_order'] : 10080); if ($this->no_agree) { $parameter["no_agree"] = $this->no_agree; } $risk = array(); foreach ($parameter as $key => $val) { $risk[] = $key . '=' . $val; } $risk = array('frms_ware_category' => $this->frms_ware_category, 'user_info_mercht_userno' => $this->user_id, 'user_info_dt_register' => $this->user_info_dt_register, 'user_info_full_name' => $this->acct_name, 'user_info_id_no' => $this->id_no, 'user_info_identify_type' => $this->user_info_identify_type, 'user_info_identify_state' => $this->user_info_identify_state); $parameter['risk_item'] = llpayCore::decodeUnicode(json_encode($risk)); $html_text = $this->llpay->buildRequestForm($parameter, "post", "确认"); if ($this->ajax) { return $html_text; } die($html_text); }