Merge branch 'master' of 192.168.195.14:server/manghe

This commit is contained in:
youda 2025-06-07 22:27:15 +08:00
commit bc1a91dfb4

View File

@ -30,7 +30,19 @@ class AppPlatform extends BasePlatform
*/
public function get_config(): array
{
return ['isWebPay' => false];
// 获取订单编号
$version = Request::param('version', '1.0.0');
$versionNumber = (int) preg_replace('/[^0-9]/', '', $version);
$config = [
'isWebPay' => false,
'isCheck' => false,
'version' => '1.0.0',
];
$configVersion = (int) preg_replace('/[^0-9]/', '', $config['version']);
if ($versionNumber >= $configVersion) {
$config['isCheck'] = true;
}
return $config;
}
/**
* Summary of pay
@ -40,8 +52,7 @@ class AppPlatform extends BasePlatform
*/
public function pay(array $data): array
{
// echo "H5支付{$amount}分,订单号:{$orderId}\n";
// 实际项目中这里调用支付SDK
try {
$data += ['user' => null, 'price' => 0, 'title' => '', 'attach' => 'order_wxs', 'pre' => 'MH_'];