|
|
@@ -41,11 +41,16 @@ class HdRefundService extends BaseService
|
|
|
$order->tkPrice = $currentTkPrice;
|
|
|
$order->refund = OrderClass::REFUND_YES;
|
|
|
$currentActPrice = bcsub($order->actPrice, $refundPrice, 2);
|
|
|
+ $currentMainPay = bcsub($order->mainPay, $refundPrice, 2);
|
|
|
if ($currentActPrice < 0) {
|
|
|
util::fail('退款金额有问题!');
|
|
|
}
|
|
|
+ if ($currentMainPay < 0) {
|
|
|
+ util::fail('退款金额有问题哦');
|
|
|
+ }
|
|
|
$order->actPrice = $currentActPrice;
|
|
|
$order->realPrice = $currentActPrice;
|
|
|
+ $order->mainPay = $currentMainPay;
|
|
|
$order->save();
|
|
|
|
|
|
$transaction_id = $order->thirdNo ?? '';
|