wx pay
parent
8bcf184134
commit
92f3f5d4b4
|
|
@ -89,7 +89,7 @@
|
|||
|
||||
{{if isset($element['message'])}} data-validation-message="{{$element.message}}"{{/if}}
|
||||
|
||||
{{if isset($element['placeholder'])}} data-placeholder="{{$element.placeholder}}"{{else /}}可选择...{{/if}}
|
||||
{{if !empty($element['placeholder'])}} data-placeholder="{{$element.placeholder}}"{{/if}}
|
||||
|
||||
{{if isset($element['is_multiple']) and $element['is_multiple'] eq 1}}
|
||||
multiple
|
||||
|
|
@ -100,9 +100,9 @@
|
|||
{{if isset($element['is_required']) and $element['is_required'] eq 1}}required{{/if}}
|
||||
>
|
||||
{{if !isset($element['is_multiple']) or $element['is_multiple'] neq 1}}
|
||||
<option value="">
|
||||
{{if isset($element['placeholder'])}}{{$element.placeholder}}{{else /}}可选择...{{/if}}
|
||||
</option>
|
||||
{{if !empty($element['placeholder'])}}
|
||||
<option value="">{{$element.placeholder}}</option>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{foreach $element.element_data as $element_data_key=>$element_data}}
|
||||
<option
|
||||
|
|
|
|||
|
|
@ -100,6 +100,17 @@ class Weixin
|
|||
'is_required' => 0,
|
||||
'message' => '请填写密钥',
|
||||
],
|
||||
[
|
||||
'element' => 'select',
|
||||
'title' => '异步通知协议',
|
||||
'message' => '请选择协议类型',
|
||||
'name' => 'agreement',
|
||||
'is_multiple' => 0,
|
||||
'element_data' => [
|
||||
['value'=>1, 'name'=>'默认当前http协议'],
|
||||
['value'=>2, 'name'=>'强制https转http协议'],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return [
|
||||
|
|
@ -313,13 +324,16 @@ class Weixin
|
|||
// appid
|
||||
$appid = (APPLICATION == 'app') ? $this->config['mini_appid'] : $this->config['appid'];
|
||||
|
||||
// 异步地址处理
|
||||
$notify_url = (__MY_HTTP__ == 'https' && isset($this->config['agreement']) && $this->config['agreement'] == 1) ? 'http'.mb_substr($params['notify_url'], 5, null, 'utf-8') : $params['notify_url'];
|
||||
|
||||
// 请求参数
|
||||
$data = [
|
||||
'appid' => $appid,
|
||||
'mch_id' => $this->config['mch_id'],
|
||||
'body' => $params['site_name'].'-'.$params['name'],
|
||||
'nonce_str' => md5(time().rand().$params['order_no']),
|
||||
'notify_url' => (__MY_HTTP__ == 'https') ? 'http'.mb_substr($params['notify_url'], 5, null, 'utf-8') : $params['notify_url'],
|
||||
'notify_url' => $notify_url,
|
||||
'openid' => ($trade_type == 'JSAPI') ? $openid : '',
|
||||
'out_trade_no' => $params['order_no'].GetNumberCode(6),
|
||||
'spbill_create_ip' => GetClientIP(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue