seven 2 месяцев назад
Родитель
Сommit
c2182d8c6c
2 измененных файлов с 7 добавлено и 7 удалено
  1. 1 1
      app/Services/Payment/QianBaoService.php
  2. 6 6
      app/Services/PaymentOrderService.php

+ 1 - 1
app/Services/Payment/SanJinService.php → app/Services/Payment/QianBaoService.php

@@ -7,7 +7,7 @@ use GuzzleHttp\Exception\RequestException;
 use GuzzleHttp\Psr7\Response;
 use GuzzleHttp\Psr7\Response;
 use App\Services\BaseService;
 use App\Services\BaseService;
 
 
-class SanJinService extends BaseService
+class QianBaoService extends BaseService
 {
 {
     // SanJin payment service methods would go here
     // SanJin payment service methods would go here
     const REQUEST_URL = 'https://api.qbdf13.com/';
     const REQUEST_URL = 'https://api.qbdf13.com/';

+ 6 - 6
app/Services/PaymentOrderService.php

@@ -11,7 +11,7 @@ use Illuminate\Support\Collection;
 use Illuminate\Support\Facades\Cache;
 use Illuminate\Support\Facades\Cache;
 use Illuminate\Support\Facades\Log;
 use Illuminate\Support\Facades\Log;
 
 
-use App\Services\Payment\SanJinService;
+use App\Services\Payment\QianBaoService;
 
 
 use App\Services\WalletService; 
 use App\Services\WalletService; 
 use App\Services\BalanceLogService; 
 use App\Services\BalanceLogService; 
@@ -160,7 +160,7 @@ class PaymentOrderService extends BaseService
         $data = [];
         $data = [];
         $data['type'] = self::TYPE_PAY;
         $data['type'] = self::TYPE_PAY;
         $order_no = self::createOrderNo('sj'.$data['type'].'_', $memberId);
         $order_no = self::createOrderNo('sj'.$data['type'].'_', $memberId);
-        $ret = SanJinService::pay($amount, $order_no, $channel);
+        $ret = QianBaoService::pay($amount, $order_no, $channel);
         return $ret;
         return $ret;
     }
     }
 
 
@@ -219,7 +219,7 @@ class PaymentOrderService extends BaseService
             $data['bank_name'] = $bank_name;
             $data['bank_name'] = $bank_name;
             $data['account'] = $account;
             $data['account'] = $account;
             $data['card_no'] = $card_no;
             $data['card_no'] = $card_no;
-            $data['callback_url'] = SanJinService::getNotifyUrl();
+            $data['callback_url'] = QianBaoService::getNotifyUrl();
             $data['status'] = self::STATUS_STAY;
             $data['status'] = self::STATUS_STAY;
             $data['remark'] = '提现费率:0.2%+2';
             $data['remark'] = '提现费率:0.2%+2';
 
 
@@ -261,7 +261,7 @@ class PaymentOrderService extends BaseService
         }
         }
 
 
         // 调用三方支付接口(在事务外)
         // 调用三方支付接口(在事务外)
-        $ret = SanJinService::payout($amount, $order_no, $bank_name, $account, $card_no);
+        $ret = QianBaoService::payout($amount, $order_no, $bank_name, $account, $card_no);
         Log::error('第三方代付接口调用:' . json_encode($ret, JSON_UNESCAPED_UNICODE));
         Log::error('第三方代付接口调用:' . json_encode($ret, JSON_UNESCAPED_UNICODE));
         if ($ret['code'] == 200) {
         if ($ret['code'] == 200) {
             // 更新提现记录状态为处理中
             // 更新提现记录状态为处理中
@@ -339,7 +339,7 @@ class PaymentOrderService extends BaseService
     public static function receiveOrder($params)
     public static function receiveOrder($params)
     {
     {
         // 判断商户号是否一致
         // 判断商户号是否一致
-        if($params['merchantNum'] == SanJinService::getMerchantId()){
+        if($params['merchantNum'] == QianBaoService::getMerchantId()){
 
 
             $info = self::findOne(['order_no' => $params['orderNo']]);
             $info = self::findOne(['order_no' => $params['orderNo']]);
             if($info){
             if($info){
@@ -349,7 +349,7 @@ class PaymentOrderService extends BaseService
                 }
                 }
             
             
                 // 验证签名
                 // 验证签名
-                $sign = SanJinService::verifyNotifySign($params['state'],$params['orderNo'],$params['amount']);
+                $sign = QianBaoService::verifyNotifySign($params['state'],$params['orderNo'],$params['amount']);
                 if($params['sign'] != $sign){
                 if($params['sign'] != $sign){
                     return false;
                     return false;
                 }
                 }