chore(addon/huaweipay): mch_id -> merc_no
This commit is contained in:
@@ -24,7 +24,7 @@ class Config extends BaseModel
|
|||||||
|
|
||||||
// 加密字段
|
// 加密字段
|
||||||
private $encrypt_fields = [
|
private $encrypt_fields = [
|
||||||
// 'mch_id',
|
// 'merc_no',
|
||||||
// 'app_id',
|
// 'app_id',
|
||||||
// 'mch_auth_id',
|
// 'mch_auth_id',
|
||||||
'private_key',
|
'private_key',
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 华为支付模型
|
* 华为支付模型
|
||||||
*/
|
*/
|
||||||
@@ -49,7 +50,8 @@ class Pay extends BaseModel
|
|||||||
if (empty($config_data)) {
|
if (empty($config_data)) {
|
||||||
$config_info = (new Config())->getPayConfig($this->site_id)['data']['value'];
|
$config_info = (new Config())->getPayConfig($this->site_id)['data']['value'];
|
||||||
$this->config = $config_info;
|
$this->config = $config_info;
|
||||||
if (empty($this->config)) throw new ApiException(-1, "平台未配置华为支付");
|
if (empty($this->config))
|
||||||
|
throw new ApiException(-1, "平台未配置华为支付");
|
||||||
} else {
|
} else {
|
||||||
$this->config = $config_data;
|
$this->config = $config_data;
|
||||||
}
|
}
|
||||||
@@ -57,7 +59,7 @@ class Pay extends BaseModel
|
|||||||
// 添加站点ID
|
// 添加站点ID
|
||||||
$this->config['site_id'] = $this->site_id;
|
$this->config['site_id'] = $this->site_id;
|
||||||
|
|
||||||
// 初始化华为支付客户端
|
// 创建华为支付客户端
|
||||||
$this->hwpay_client = new HuaweiPayClient($this->config);
|
$this->hwpay_client = new HuaweiPayClient($this->config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class Pay extends BaseShop
|
|||||||
$config_model = new ConfigModel();
|
$config_model = new ConfigModel();
|
||||||
if (request()->isJson()) {
|
if (request()->isJson()) {
|
||||||
$app_id = input("app_id", "");//华为应用ID, // PETALPAY.APPID, 商户号关联的APPID
|
$app_id = input("app_id", "");//华为应用ID, // PETALPAY.APPID, 商户号关联的APPID
|
||||||
$mch_id = input("mch_id", "");//商户号, // PETALPAY.MERC_NO, 商户号
|
$merc_no = input("merc_no", "");//商户号, // PETALPAY.MERC_NO, 商户号
|
||||||
$private_key = input("private_key", "");//商户应用私钥, // PETALPAY.MERC_PRIVATE_KEY, 商户应用私钥
|
$private_key = input("private_key", "");//商户应用私钥, // PETALPAY.MERC_PRIVATE_KEY, 商户应用私钥
|
||||||
$private_key_text = input("private_key_text", "");//商户应用私钥文本, // PETALPAY.MERC_PRIVATE_KEY_TEXT, 商户应用私钥文本
|
$private_key_text = input("private_key_text", "");//商户应用私钥文本, // PETALPAY.MERC_PRIVATE_KEY_TEXT, 商户应用私钥文本
|
||||||
$mch_auth_id = input("mch_auth_id", "");//商户证书id, // PETALPAY.MERC_AUTH_ID, 商户证书id
|
$mch_auth_id = input("mch_auth_id", "");//商户证书id, // PETALPAY.MERC_AUTH_ID, 商户证书id
|
||||||
@@ -36,7 +36,7 @@ class Pay extends BaseShop
|
|||||||
|
|
||||||
$data = array (
|
$data = array (
|
||||||
"app_id" => $app_id,
|
"app_id" => $app_id,
|
||||||
"mch_id" => $mch_id,
|
"merc_no" => $merc_no,
|
||||||
"private_key" => $private_key,
|
"private_key" => $private_key,
|
||||||
"private_key_text" => $private_key_text,
|
"private_key_text" => $private_key_text,
|
||||||
"mch_auth_id" => $mch_auth_id,
|
"mch_auth_id" => $mch_auth_id,
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label" name="mch_id"><span class="required">*</span>商户号:</label>
|
<label class="layui-form-label" name="merc_no"><span class="required">*</span>商户号:</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input name="mch_id" type="text" value="{$info.mch_id ?? ''}" class="layui-input len-long" lay-verify="required">
|
<input name="merc_no" type="text" value="{$info.merc_no ?? ''}" class="layui-input len-long" lay-verify="required">
|
||||||
</div>
|
</div>
|
||||||
<div class="word-aux"><span>[MERC_NO]</span>华为支付商户号 <a href="https://developer.huawei.com/consumer/cn/doc/pay-docs/hwzf-shanghuhao-0000001725982508" target="_blank">查看指引</a></div>
|
<div class="word-aux"><span>[MERC_NO]</span>华为支付商户号 <a href="https://developer.huawei.com/consumer/cn/doc/pay-docs/hwzf-shanghuhao-0000001725982508" target="_blank">查看指引</a></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user