|
|
@@ -342,7 +342,7 @@ class CallBackHandler
|
|
|
Yii::info('顺丰授权状态回调(sign=' . ($sign ?? '') . '): ' . json_encode($data, JSON_UNESCAPED_UNICODE), 'shunfeng-callback');
|
|
|
|
|
|
$mainId = isset($data['out_shop_id']) ? (int)$data['out_shop_id'] : 0;
|
|
|
- $shopId = isset($data['shop_id']) ? (string)$data['shop_id'] : '';
|
|
|
+ $shopId = isset($data['shop_id']) ? $data['shop_id'] : '';
|
|
|
|
|
|
if ($shopId === '') {
|
|
|
Yii::error('顺丰授权状态回调参数缺失: ' . json_encode($data, JSON_UNESCAPED_UNICODE), 'shunfeng-callback');
|
|
|
@@ -392,9 +392,9 @@ class CallBackHandler
|
|
|
$sign = Yii::$app->request->get('sign');
|
|
|
Yii::info('顺丰取消授权状态回调(sign=' . ($sign ?? '') . '): ' . json_encode($data, JSON_UNESCAPED_UNICODE), 'shunfeng-callback');
|
|
|
|
|
|
- $mainId = isset($data['out_shop_id']) ? (int)$data['out_shop_id'] : 0;
|
|
|
- if ($mainId <= 0) {
|
|
|
- Yii::error('顺丰取消授权回调缺少 out_shop_id: ' . json_encode($data, JSON_UNESCAPED_UNICODE), 'shunfeng-callback');
|
|
|
+ $shopId = isset($data['shop_id']) ? $data['shop_id'] : '';
|
|
|
+ if ($shopId === '') {
|
|
|
+ Yii::error('顺丰授权状态回调参数缺失: ' . json_encode($data, JSON_UNESCAPED_UNICODE), 'shunfeng-callback');
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -407,14 +407,9 @@ class CallBackHandler
|
|
|
}
|
|
|
|
|
|
$condition = [
|
|
|
- 'mainId' => $mainId,
|
|
|
'platform' => 'shunfeng',
|
|
|
+ 'shopId' => $shopId
|
|
|
];
|
|
|
-
|
|
|
- if (!empty($data['shop_id'])) {
|
|
|
- $condition['shopId'] = (string)$data['shop_id'];
|
|
|
- }
|
|
|
-
|
|
|
$deleted = DeliveryAuthTokenClass::deleteByCondition($condition);
|
|
|
if ($deleted === 0) {
|
|
|
Yii::warning('顺丰取消授权回调未删除任何记录: ' . json_encode($data, JSON_UNESCAPED_UNICODE), 'shunfeng-callback');
|