1
This commit is contained in:
parent
9475c815b2
commit
19cf43e8b6
@ -40,6 +40,7 @@ class PaymentLogic extends BaseLogic
|
|||||||
PayNotifyLogic::handle($from, $order['order_id']);
|
PayNotifyLogic::handle($from, $order['order_id']);
|
||||||
return ['pay_way' => PayEnum::BALANCE_PAY];
|
return ['pay_way' => PayEnum::BALANCE_PAY];
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
switch ($payWay) {
|
switch ($payWay) {
|
||||||
case PayEnum::WECHAT_PAY:
|
case PayEnum::WECHAT_PAY:
|
||||||
$auth = UserAuth::where(['user_id' => $order['uid'], 'terminal' => $terminal])->findOrEmpty();
|
$auth = UserAuth::where(['user_id' => $order['uid'], 'terminal' => $terminal])->findOrEmpty();
|
||||||
@ -56,19 +57,20 @@ class PaymentLogic extends BaseLogic
|
|||||||
'attach' => $from
|
'attach' => $from
|
||||||
];
|
];
|
||||||
$wechat = new PayService(1);
|
$wechat = new PayService(1);
|
||||||
try {
|
|
||||||
// 尝试执行可能会抛出异常的代码
|
// 尝试执行可能会抛出异常的代码
|
||||||
$result = $wechat->wechat->mini($order)->toArray();
|
$result = $wechat->wechat->mini($order)->toArray();
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
\support\Log::info($e->getMessage());
|
|
||||||
throw new \Exception($e->getMessage());
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
self::$error = '订单异常';
|
self::$error = '订单异常';
|
||||||
$result = false;
|
$result = false;
|
||||||
}
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
\support\Log::info($e->getMessage());
|
||||||
|
throw new \Exception($e->getMessage());
|
||||||
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user