222
This commit is contained in:
parent
11507fa19c
commit
3ef929a4b3
|
|
@ -30,7 +30,19 @@ class AppPlatform extends BasePlatform
|
||||||
*/
|
*/
|
||||||
public function get_config(): array
|
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
|
* Summary of pay
|
||||||
|
|
@ -40,8 +52,7 @@ class AppPlatform extends BasePlatform
|
||||||
*/
|
*/
|
||||||
public function pay(array $data): array
|
public function pay(array $data): array
|
||||||
{
|
{
|
||||||
// echo "H5支付:{$amount}分,订单号:{$orderId}\n";
|
|
||||||
// 实际项目中这里调用支付SDK
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$data += ['user' => null, 'price' => 0, 'title' => '', 'attach' => 'order_wxs', 'pre' => 'MH_'];
|
$data += ['user' => null, 'price' => 0, 'title' => '', 'attach' => 'order_wxs', 'pre' => 'MH_'];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user