feat : wechatPay callback
This commit is contained in:
@@ -81,9 +81,9 @@ class RefundService
|
||||
public float $refundAmount;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
* @var float|int
|
||||
*/
|
||||
protected float $isRefundMoney;
|
||||
protected float|int $isRefundMoney;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
@@ -199,9 +199,9 @@ class RefundService
|
||||
protected function checkRefundAmount(): void
|
||||
{
|
||||
// 等于支付金额 减去 已退款金额 减去 本次退款金额 小于 0 就是错误的 大于等于 0 就是正确的
|
||||
if ($this->orderInfo->actual_price - $this->isRefundMoney - $this->refundAmount < 0) throw new Exception('退款金额不能大于订单金额');
|
||||
if ($this->payInfo->pay_money - $this->isRefundMoney - $this->refundAmount < 0) throw new Exception('退款金额不能大于订单金额');
|
||||
|
||||
$this->refundAmount = 0;
|
||||
$this->refundAmount = min($this->payInfo->pay_money - $this->isRefundMoney, $this->refundAmount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user