fix(app): 修复支付回调和订单推送的相关问题
- 修改 PayNotifyLogic 中异常捕获,使用 Throwable 代替 Exception - 优化 OrderXprinterPushSend 中的订单信息获取和处理
This commit is contained in:
parent
5727572e0d
commit
1f82805875
@ -11,6 +11,7 @@ use app\common\enum\user\UserShipEnum;
|
|||||||
use app\common\enum\YesNoEnum;
|
use app\common\enum\YesNoEnum;
|
||||||
use app\common\logic\user_product_storage\UserProductStorageLogic;
|
use app\common\logic\user_product_storage\UserProductStorageLogic;
|
||||||
use app\common\model\Config;
|
use app\common\model\Config;
|
||||||
|
use app\common\model\dict\DictData;
|
||||||
use app\common\model\dict\DictType;
|
use app\common\model\dict\DictType;
|
||||||
use app\common\model\finance\CapitalFlow;
|
use app\common\model\finance\CapitalFlow;
|
||||||
use app\common\model\finance\PayNotifyLog;
|
use app\common\model\finance\PayNotifyLog;
|
||||||
@ -53,7 +54,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
self::$action($orderSn, $extra, $type);
|
self::$action($orderSn, $extra, $type);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Throwable $e) {
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
d($e);
|
d($e);
|
||||||
Log::error('支付回调处理失败' . $e->getMessage() . ',lien:' . $e->getLine() . ',file:' . $e->getFile());
|
Log::error('支付回调处理失败' . $e->getMessage() . ',lien:' . $e->getLine() . ',file:' . $e->getFile());
|
||||||
|
@ -29,6 +29,7 @@ class OrderXprinterPushSend implements Consumer
|
|||||||
$order = $data['order'];
|
$order = $data['order'];
|
||||||
$total_price = $order['total_price'];
|
$total_price = $order['total_price'];
|
||||||
$pay_price = $order['pay_price'];
|
$pay_price = $order['pay_price'];
|
||||||
|
$store_id = $order['store_id'];
|
||||||
$deduction_price = $order['deduction_price'];
|
$deduction_price = $order['deduction_price'];
|
||||||
$pay_time = date('Y-m-d H:i:s', $order['pay_time']);
|
$pay_time = date('Y-m-d H:i:s', $order['pay_time']);
|
||||||
$pay_type = PayEnum::getPaySceneDesc($order['pay_type']);
|
$pay_type = PayEnum::getPaySceneDesc($order['pay_type']);
|
||||||
@ -62,7 +63,7 @@ class OrderXprinterPushSend implements Consumer
|
|||||||
'pay_type_name' => $pay_type,
|
'pay_type_name' => $pay_type,
|
||||||
'product_arr' => $product_arr
|
'product_arr' => $product_arr
|
||||||
];
|
];
|
||||||
$value=DictData::where('name','xprinter_'.$order['store_id'])->value('value');
|
$value=DictData::where('name','xprinter_'.$store_id)->value('value');
|
||||||
if($value){
|
if($value){
|
||||||
$res = ($api->printFontAlign($value, $order));
|
$res = ($api->printFontAlign($value, $order));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user