退单判断是否拆单
This commit is contained in:
parent
cf118c81ff
commit
ff53552f49
@ -5,6 +5,7 @@ namespace app\api\controller;
|
|||||||
use app\common\enum\PayEnum;
|
use app\common\enum\PayEnum;
|
||||||
use app\common\logic\PayNotifyLogic;
|
use app\common\logic\PayNotifyLogic;
|
||||||
use app\common\model\retail\Cashierclass;
|
use app\common\model\retail\Cashierclass;
|
||||||
|
use app\common\model\store_order\StoreOrder;
|
||||||
use app\common\service\pay\PayService;
|
use app\common\service\pay\PayService;
|
||||||
use support\Cache;
|
use support\Cache;
|
||||||
use support\Log;
|
use support\Log;
|
||||||
@ -49,6 +50,11 @@ class PayController extends BaseApiController
|
|||||||
$ciphertext = $result->resource['ciphertext'];
|
$ciphertext = $result->resource['ciphertext'];
|
||||||
if ($ciphertext['refund_status'] === 'SUCCESS') {
|
if ($ciphertext['refund_status'] === 'SUCCESS') {
|
||||||
//处理订单 -1判断是退的一单还是拆分的订单
|
//处理订单 -1判断是退的一单还是拆分的订单
|
||||||
|
$out_trade_no = $ciphertext['out_trade_no'].'-1';
|
||||||
|
$check = StoreOrder::where('order_id',$out_trade_no)->count();
|
||||||
|
if($check){
|
||||||
|
$ciphertext['out_trade_no'] =$out_trade_no;
|
||||||
|
}
|
||||||
PayNotifyLogic::handle('refund', $ciphertext['out_trade_no'], $ciphertext);
|
PayNotifyLogic::handle('refund', $ciphertext['out_trade_no'], $ciphertext);
|
||||||
$app->wechat->success();
|
$app->wechat->success();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user