feat(gateway): 新增抖音产品相关功能

- 新增抖音币的验证规则和错误提示
- 增加商户日限额和上游充值失败的错误提示
- 针对抖音币添加数量和面值的验证逻辑
This commit is contained in:
mzeros 2024-12-07 12:26:35 +08:00
parent 39a0811d4c
commit fbaa8f0208

View File

@ -68,9 +68,13 @@ class Core extends Controller
-102 => '订单号重复',
-103 => '请求错误,请求格式不正确请使用json请求',
-104 => '回调渠道订单号不匹配,请核对',
-105 => '该产品验证规则不过,请联系管理员',
-201 => '安全进价低于实际进价',
-601 => '该商户已经超过日限额,下单失败',
-602 => '充值失败,请核对上游',
-801 => 'ip: 请求错误,不在白名单',
-802 => '方法不存在',
-803 => '版本号不正确',
@ -118,6 +122,7 @@ class Core extends Controller
}
$this->input['proid'] = $this->proid;
$this->product = $pinfo['key'];
if ($this->product != 'dhcz') {
if (!str_contains($this->product, '_cash')) {
$this->input['cash'] = $pinfo['value'];
@ -158,6 +163,17 @@ class Core extends Controller
$this->input();
$input = $this->input;
if($this->product == 'dy'){
if(!isset($this->input['num'])){
$this->no(-105,'该产品需要输入数量');
}
$num_cash = $this->input['cash'] * $this->input['num']??1;
if($num_cash < 10){
$this->no(-105,'面值至少10元及以上');
}
}
$ip_white_data = $this->merchant['ip_white'];
$request_ip = $this->getRealIp();
// if()