2
0
laowu 4 dní pred
rodič
commit
c7906c9e5c

+ 7 - 8
app/Http/Controllers/Api/NewSupefinaSpeiController.php

@@ -31,17 +31,16 @@ class NewSupefinaSpeiController implements PayMentInterFace
             return apiReturnFail($logic->getError());
         }
 
-        if (!empty($res) && isset($res['barcodeUrl'])) {
-            $data = $res['data'];
-            $content = $data['barcodeUrl'] ?? '';
-            if (empty($content) && !empty($data['receiveCode'])) {
-                $content = 'CLABE:' . $data['receiveCode'];
+        if (!empty($res) && isset($res['checkoutUrl'])) {
+            $content = $res['checkoutUrl'] ?? '';
+            if (empty($content) && !empty($res['receiveCode'])) {
+                $content = 'CLABE:' . $res['receiveCode'];
             }
             return apiReturnSuc([
                 'content' => $content,
                 'money'   => $payAmt,
-                'prdOrdNo' => $data['merchantOrderNo'] ?? '',
-                'identifier' => $data['receiveCode'] ?? '',
+                'prdOrdNo' => $res['merchantOrderNo'] ?? '',
+                'identifier' => $res['receiveCode'] ?? '',
             ]);
         }
 
@@ -52,7 +51,7 @@ class NewSupefinaSpeiController implements PayMentInterFace
         if ($this->retryTimes > 0) {
             Redis::set('PayErro_NewSupefinaSpei', 1);
             Redis::expire('PayErro_NewSupefinaSpei', 600);
-            TelegramBot::getDefault()->sendProgramNotify('SupefinaSpei ReturnFail ', $logic->getError() . ' | ' . json_encode($res));
+            TelegramBot::getDefault()->sendProgramNotify('NewSupefinaSpei ReturnFail ', $logic->getError() . ' | ' . json_encode($res));
             return apiReturnFail($logic->getError());
         }
         $this->retryTimes++;

+ 1 - 1
app/Http/logic/api/NewSupefinaSpeiLogic.php

@@ -88,7 +88,7 @@ class NewSupefinaSpeiLogic extends BaseApiLogic
 
 
         $body = [
-            'productNo' => 'CLABE',
+            'productNo' => 'CHECKOUT_COUNTER',
             'data' => Aes::encrypt(json_encode($params), base64_decode($aesKey)),
         ];
 

+ 1 - 1
config/payTest.php

@@ -36,7 +36,7 @@ return [
         'publickey'          => env('NEW_SUPEFINA_PUBLIC_KEY', ''),
         'aesKey'      => env('NEW_SUPEFINA_AESKEY', ''),
         'baseUrl'      => 'https://payapi-sandbox.supefina.ai/api/v1',
-        'payinPath'    => '/receivePay',
+        'payinPath'    => '/checkoutCounter',
         'transferPath' => '/transfer',
         'countryId'    => 'MX',
         'currency'     => 'MXN',