Browse Source

测试新客

gorden 5 months ago
parent
commit
d33df7d904

+ 4 - 4
app/admin/controller/order/NewCustomerController.php

@@ -1081,10 +1081,10 @@ class NewCustomerController extends Curd
             $payStatus = 'N';
             $payAmount = 0;
             if (in_array('WXPAY', $payDetailType)) {
-                $result = Pay::wechat(config('payment.wxpay'))->find($groupId, 'pos');
-                $result = json_decode(json_encode($result), true);
-//                $result = '{"return_code":"SUCCESS","return_msg":"OK","result_code":"SUCCESS","mch_id":"1680393367","appid":"wxc6274da7198e3eb4","openid":"o3JAn6Ii_bAlxS-jbNEC4WnPhdwM","is_subscribe":"N","trade_type":"MICROPAY","trade_state":"SUCCESS","bank_type":"OTHERS","total_fee":"2","fee_type":"CNY","cash_fee":"1000","cash_fee_type":"CNY","transaction_id":"4200067718202409250802875650","out_trade_no":"OD24092518408RV7","attach":[],"time_end":"20240925184009","trade_state_desc":"支付成功","nonce_str":"OeGOkjch4eaV5qIt","sign":"6DCB3BFC594EBC018A2BEE2C3DFEA4E3"}';
-//                $result = json_decode($result, true);
+//                $result = Pay::wechat(config('payment.wxpay'))->find($groupId, 'pos');
+//                $result = json_decode(json_encode($result), true);
+                $result = '{"return_code":"SUCCESS","return_msg":"OK","result_code":"SUCCESS","mch_id":"1680393367","appid":"wxc6274da7198e3eb4","openid":"o3JAn6Ii_bAlxS-jbNEC4WnPhdwM","is_subscribe":"N","trade_type":"MICROPAY","trade_state":"SUCCESS","bank_type":"OTHERS","total_fee":"1","fee_type":"CNY","cash_fee":"1000","cash_fee_type":"CNY","transaction_id":"4200067718202409250802875650","out_trade_no":"OD24092518408RV7","attach":[],"time_end":"20240925184009","trade_state_desc":"支付成功","nonce_str":"OeGOkjch4eaV5qIt","sign":"6DCB3BFC594EBC018A2BEE2C3DFEA4E3"}';
+                $result = json_decode($result, true);
                 if (!empty($result['return_code']) && $result['return_code'] == 'SUCCESS' && !empty($result['result_code']) && $result['result_code'] == 'SUCCESS' && !empty($result['trade_state']) && $result['trade_state'] == 'SUCCESS') {
                     $payStatus = 'Y';
                     $payAmount = ($result['total_fee'] / 100);

+ 0 - 1
app/event/order/ReferrerEvent.php

@@ -33,7 +33,6 @@ class ReferrerEvent
             // 余额账户
             $memberAccount = MemberAccount::where('join_account_member_id', $params['member_id'])->where('member_account_classify', 'CASH')->first();
             // 增值到最后一条支付记录
-            $added = 0;
             $payDetail = PayDetail::whereJsonContains('join_pay_object_json->order_id', $params['orderId'])->orderBy('pay_addtimes', 'DESC')->first();
             if (!empty($configParams['account']['added']) && $configParams['account']['added'] > 0) {
                 $added = round($params['order_amount_total'] * $configParams['account']['added'], 2);