feat : wechatPay callback
This commit is contained in:
@@ -151,7 +151,7 @@ class RefundService
|
||||
|
||||
if (!$this->payInfo) throw new Exception('订单信息不存在');
|
||||
|
||||
if ($this->payInfo->status != PayCode::FINISH_PAY) throw new Exception('订单支付状态不是成功');
|
||||
// if ($this->payInfo->status != PayCode::FINISH_PAY) throw new Exception('订单支付状态不是成功');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -171,9 +171,9 @@ class RefundService
|
||||
*/
|
||||
protected function checkOrder(): void
|
||||
{
|
||||
if (empty($orderInfo)) throw new Exception('订单信息不存在:'.json_encode(['order_id' => $this->orderId,'order_type' => $this->type]));
|
||||
if (empty($this->orderInfo)) throw new Exception('订单信息不存在:'.json_encode(['order_id' => $this->orderId,'order_type' => $this->type]));
|
||||
|
||||
if (!in_array($orderInfo->status,OrderCode::CAN_REFUND_STATUS)) throw new Exception('订单状态不能退款:'.json_encode($this->orderInfo->toArray()));
|
||||
if (!in_array($this->orderInfo->status,OrderCode::CAN_REFUND_STATUS)) throw new Exception('订单状态不能退款:'.json_encode($this->orderInfo->toArray()));
|
||||
|
||||
//余额订单必须退款全部金额
|
||||
if ($this->type == OrderCode::ORDER_TYPE_BALANCE && $this->refundAmount != $this->orderInfo->actual_price) throw new Exception('余额订单必须退款全部金额:'.json_encode($this->orderInfo->toArray()));
|
||||
|
||||
Reference in New Issue
Block a user