|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace mall\controllers;
|
|
|
|
|
|
+use bizHd\refund\classes\HdRefundClass;
|
|
|
use bizHd\wx\classes\WxOpenClass;
|
|
|
use common\components\noticeUtil;
|
|
|
use common\components\payUtil;
|
|
|
@@ -29,7 +30,7 @@ class NoticeController extends PublicController
|
|
|
}
|
|
|
|
|
|
//解密req_info
|
|
|
- $wx = WxOpenClass::getWxInfo();
|
|
|
+ $wx = WxOpenClass::getMallWxInfo();
|
|
|
$req_info = $postObj->req_info ?? '';
|
|
|
$key = $wx['wxPayKey'] ?? '';
|
|
|
$xml = openssl_decrypt(base64_decode($req_info), 'AES-256-ECB', MD5($key), OPENSSL_RAW_DATA, '');
|
|
|
@@ -55,16 +56,10 @@ class NoticeController extends PublicController
|
|
|
$transaction = $connection->beginTransaction();
|
|
|
try {
|
|
|
if ($refund_status == 'SUCCESS') {
|
|
|
- $cgRefund = HdRefundClass::getByCondition(['orderSn' => $out_refund_no], true);
|
|
|
- if (!empty($cgRefund)) {
|
|
|
- $cgRefund->status = HdRefundClass::STATUS_COMPLETE;
|
|
|
- $cgRefund->save();
|
|
|
- $saleRefundId = $cgRefund->saleRefundId ?? 0;
|
|
|
- $saleRefund = RefundOrderClass::getById($saleRefundId, true);
|
|
|
- if (!empty($saleRefund)) {
|
|
|
- $saleRefund->status = RefundOrderClass::STATUS_COMPLETE;
|
|
|
- $saleRefund->save();
|
|
|
- }
|
|
|
+ $hdRefund = HdRefundClass::getByCondition(['refundSn' => $out_refund_no], true);
|
|
|
+ if (!empty($hdRefund)) {
|
|
|
+ $hdRefund->status = HdRefundClass::STATUS_COMPLETE;
|
|
|
+ $hdRefund->save();
|
|
|
}
|
|
|
$text = "【退款成功】退款单号:{$orderSn} {$out_refund_no} 订单金额:{$new_total_fee} 退款金额:{$new_settlement_refund_fee} ";
|
|
|
} elseif ($refund_status == 'REFUNDCLOSE') {
|