diff --git a/app/Controller/Recharge/RechargeController.php b/app/Controller/Recharge/RechargeController.php index 87032b2..366ebfe 100644 --- a/app/Controller/Recharge/RechargeController.php +++ b/app/Controller/Recharge/RechargeController.php @@ -126,7 +126,7 @@ class RechargeController extends AbstractController $bizData = $this->paymentService->protocolPayConfirm($this->buildConfirmPayParams($token, $protocol, $smsCode, $app)); return $this->success([ 'outMemberId' => $prePayLog->out_member_id, - 'bizData' => ['outTradeNo' => $bizData['outTradeNo']] + 'bizData' => ['outOrderNo' => $prePayLog->out_order_no] ]); } diff --git a/app/Service/PaymentService.php b/app/Service/PaymentService.php index b7c3868..601c937 100644 --- a/app/Service/PaymentService.php +++ b/app/Service/PaymentService.php @@ -387,7 +387,7 @@ class PaymentService extends AbstractService } $order = Order::where('app_id', $app->app_id)->where('out_order_no', $data['outOrderNo'])->first(); - if ($order) { + if (!$order) { throw new BusinessException('订单不存在'); } diff --git a/public/payment.html b/public/payment.html index 6aca0f3..05d7703 100644 --- a/public/payment.html +++ b/public/payment.html @@ -167,7 +167,7 @@ } this.payConfirmVisible = false; this.$message.success('支付成功'); - this.$alert('请记住您的订单号:' + result.data.bizData.outTradeNo , '支付成功', { + this.$alert('请记住您的订单号:' + result.data.bizData.outOrderNo , '支付成功', { confirmButtonText: '确定', callback: action => { }