|
@@ -36,15 +36,12 @@ class CgRefundService extends BaseService
|
|
|
util::fail('第三方支付订单号没有找到');
|
|
util::fail('第三方支付订单号没有找到');
|
|
|
}
|
|
}
|
|
|
$refundOrderSn = orderSn::getCgRefundSn();
|
|
$refundOrderSn = orderSn::getCgRefundSn();
|
|
|
- //$post['orderSn'] = $refundOrderSn;
|
|
|
|
|
$post['cgId'] = $cg->id;
|
|
$post['cgId'] = $cg->id;
|
|
|
$refundPrice = $post['price'] ?? 0;
|
|
$refundPrice = $post['price'] ?? 0;
|
|
|
if (is_numeric($refundPrice) == false || $refundPrice < 0) {
|
|
if (is_numeric($refundPrice) == false || $refundPrice < 0) {
|
|
|
util::fail('退款金额有问题。');
|
|
util::fail('退款金额有问题。');
|
|
|
}
|
|
}
|
|
|
$post['refundPrice'] = $refundPrice;
|
|
$post['refundPrice'] = $refundPrice;
|
|
|
- //创建退款单
|
|
|
|
|
- //$cgRefund = CgRefundClass::add($post, true);
|
|
|
|
|
|
|
|
|
|
$shopId = $cg->shopId ?? 0;
|
|
$shopId = $cg->shopId ?? 0;
|
|
|
$shop = ShopClass::getLockById($shopId);
|
|
$shop = ShopClass::getLockById($shopId);
|
|
@@ -117,10 +114,7 @@ class CgRefundService extends BaseService
|
|
|
require_once($wx . '/example/WxPay.Config.php');
|
|
require_once($wx . '/example/WxPay.Config.php');
|
|
|
|
|
|
|
|
$totalFee = $cg->realPrice * 100;
|
|
$totalFee = $cg->realPrice * 100;
|
|
|
- $refundFee = $refundOrder['refundPrice'] ?? 0;
|
|
|
|
|
- if (is_numeric($refundFee) == false || $refundFee <= 0) {
|
|
|
|
|
- util::fail('退款金额有问题!');
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $refundFee = $cgRefund * 100;
|
|
|
|
|
|
|
|
$merchantExt = WxOpenClass::getWxInfo();
|
|
$merchantExt = WxOpenClass::getWxInfo();
|
|
|
$mid = $merchantExt['wxPayMerchantId'] ?? '';
|
|
$mid = $merchantExt['wxPayMerchantId'] ?? '';
|