收银页面支付方式判断

This commit is contained in:
evoxwht 2023-04-13 12:06:56 +08:00
parent 3096190cc3
commit dca81d9edb
2 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ class OrderPaySuccessListener implements ListenerInterface
}
// 写入资金流水
if ($orderInfo['pay_type'] == 'weixin' || $orderInfo['pay_type'] == 'alipay' || $orderInfo['pay_type'] == PayServices::ALLIN_PAY) {
if (in_array($orderInfo['pay_type'], ['weixin', 'alipay', 'allinpay'])) {
/** @var UserServices $userServices */
$userServices = app()->make(UserServices::class);
$userInfo = $userServices->get($orderInfo['uid']);

View File

@ -268,7 +268,7 @@ class StoreOrderRefundServices extends BaseServices
$userInfo = $userServices->get($splitOrderInfo['uid']);
$splitOrderInfo['nickname'] = $userInfo['nickname'];
$splitOrderInfo['phone'] = $userInfo['phone'];
if ($splitOrderInfo['pay_type'] == 'alipay' || $splitOrderInfo['pay_type'] == 'weixin' || $splitOrderInfo['pay_type'] == 'offline') {
if (in_array($orderInfo['pay_type'], ['weixin', 'alipay', 'allinpay', 'offline'])) {
$capitalFlowServices->setFlow($splitOrderInfo, 'refund');
}
@ -596,7 +596,7 @@ class StoreOrderRefundServices extends BaseServices
$userInfo = $userServices->get($order['uid']);
$order['nickname'] = $userInfo['nickname'];
$order['phone'] = $userInfo['phone'];
if ($order['pay_type'] == 'alipay' || $order['pay_type'] == 'weixin' || $order['pay_type'] == 'offline') {
if (in_array($orderInfo['pay_type'], ['weixin', 'alipay', 'allinpay', 'offline'])) {
$capitalFlowServices->setFlow($order, 'refund');
}