2
0

NewSupefinaSpeiLogic.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. <?php
  2. namespace App\Http\logic\api;
  3. use App\dao\Estatisticas\RechargeWithDraw;
  4. use App\dao\Pay\PayController;
  5. use App\Http\helper\CreateOrder;
  6. use App\Http\helper\NumConfig;
  7. use App\Jobs\Order;
  8. use App\Models\PrivateMail;
  9. use App\Models\RecordUserDataStatistics;
  10. use App\Services\Aes;
  11. use App\Services\OrderServices;
  12. use App\Services\PayConfig;
  13. use App\Services\StoredProcedure;
  14. use App\Services\SupefinaSpei;
  15. use App\Services\CreateLog;
  16. use App\Util;
  17. use GuzzleHttp\Client;
  18. use Illuminate\Support\Facades\DB;
  19. use Illuminate\Support\Facades\Redis;
  20. /**
  21. * Supefina SPEI
  22. *
  23. */
  24. class NewSupefinaSpeiLogic extends BaseApiLogic
  25. {
  26. const AGENT = 108;
  27. public $result;
  28. public function pay_order($userId, $pay_amount, $userPhone, $userEmail, $userName, $GiftsID, $buyIP, $AdId, $eventType, $pay_method = '')
  29. {
  30. $PayVerify = new PayController();
  31. $pay_amount = $PayVerify->verify($userId, $GiftsID, $pay_amount);
  32. if ($PayVerify->verify($userId, $GiftsID, $pay_amount) === false) {
  33. $this->error = $PayVerify->getError();
  34. return false;
  35. }
  36. if ($pay_amount < 0) {
  37. $this->error = 'Payment error_4';
  38. return false;
  39. }
  40. $service = new SupefinaSpei('NewSupefinaSpei');
  41. $config = $service->config;
  42. $merId = $config['merId'] ?? '';
  43. $baseUrl = $config['baseUrl'] ?? '';
  44. $payinPath = $config['payinPath'] ?? '/api/supefina/transactions/collection';
  45. $callbackUrl = $config['callbackUrl'] ?? '';
  46. $countryId = $config['countryId'] ?? 'MX';
  47. $currency = $config['currency'] ?? 'MXN';
  48. $aesKey = $config['aesKey'] ?? '';
  49. $privateKey = $config['privateKey'] ?? '';
  50. $productNo = $config['productNo'] ?? '';
  51. if ($merId === '' || $baseUrl === '' || empty($privateKey) || $callbackUrl === '') {
  52. $this->error = 'Payment config error';
  53. return false;
  54. }
  55. $order_sn = CreateOrder::order_sn($userId);
  56. $logic = new OrderLogic();
  57. $amount = (int)round($pay_amount * NumConfig::NUM_VALUE);
  58. $logic->orderCreate($order_sn, $amount, 'NewSupefinaSpei', $userId, $pay_method, $GiftsID, $AdId, $eventType);
  59. $orderAmount = (string)(int)$pay_amount;
  60. if ($pay_amount != (int)$pay_amount) {
  61. $orderAmount = number_format($pay_amount, 2, '.', '');
  62. }
  63. $params = [
  64. 'merchantOrderNo' => $order_sn,
  65. 'amount' => $orderAmount,
  66. 'country' => $countryId,
  67. 'currency' => $currency,
  68. 'notifyUrl' => $callbackUrl,
  69. ];
  70. $headers = [
  71. 'version' => '1.0.0',
  72. 'merchantNo' => $merId,
  73. 'requestId' => mt_rand(100000, 999999) . time(),
  74. 'requestTime' => time() * 1000,
  75. ];
  76. $body = [
  77. 'productNo' => $productNo,
  78. 'data' => Aes::encrypt(json_encode($params), base64_decode($aesKey)),
  79. ];
  80. $sign = $this->sign($headers, $body, $privateKey);
  81. $headers['sign'] = $sign;
  82. $request_extra = \GuzzleHttp\json_encode(array_merge($headers, $params));
  83. CreateLog::pay_request($userPhone, $request_extra, $order_sn, $userEmail, $userId, $userName);
  84. $url = rtrim($baseUrl, '/') . $payinPath;
  85. Util::WriteLog('NewSupefinaSpei', 'payin request: ' . $url . ' | ' . $request_extra);
  86. try {
  87. $client = new Client();
  88. $result = $client->post($url, [
  89. 'headers' => $headers,
  90. 'json' => $body,
  91. ])->getBody()->getContents();
  92. } catch (\Throwable $e) {
  93. Util::WriteLog('NewSupefinaSpei_error', 'payin request exception: ' . $e->getMessage());
  94. $this->error = 'Payment processing error';
  95. return false;
  96. }
  97. Util::WriteLog('NewSupefinaSpei', 'payin response: ' . $result);
  98. try {
  99. $data = \GuzzleHttp\json_decode($result, true);
  100. } catch (\Throwable $e) {
  101. Util::WriteLog('NewSupefinaSpei_error', [$result, $e->getMessage()]);
  102. $this->error = 'Payment processing error';
  103. return false;
  104. }
  105. if (!isset($data['success']) || $data['success'] !== true) {
  106. $this->error = $data['message'] ?? 'Payment request failed';
  107. return false;
  108. }
  109. $decryptData = Aes::decrypt($data['data'], base64_decode($aesKey));
  110. Util::WriteLog('NewSupefinaSpei', 'payin response1: ' . $decryptData);
  111. $this->result = json_decode($decryptData, true);
  112. return $this->result;
  113. }
  114. /**
  115. * 代收回调:仅代收存在“实际金额与订单金额不一致”,以 realityAmount 入账
  116. *
  117. * @param array<string,mixed> $post
  118. */
  119. public function notify($post)
  120. {
  121. $order_sn = $post['merchantOrderNo'];
  122. if ($order_sn === '') {
  123. Util::WriteLog('NewSupefinaSpei_error', 'payin notify missing merchantOrderNo');
  124. return 'fail';
  125. }
  126. try {
  127. $order = DB::connection('write')->table('agent.dbo.order')->where('order_sn', $order_sn)->first();
  128. if (!$order) {
  129. Util::WriteLog('NewSupefinaSpei', 'payin order not found: ' . $order_sn);
  130. return '{"success":true}';
  131. }
  132. if (!empty($order->pay_at) || !empty($order->finished_at)) {
  133. if ($order->payment_sn != $post['platformOrderNo']) {
  134. $logic = new OrderLogic();
  135. $amount = 100;
  136. $order_sn = $order_sn . '#' . time();
  137. $logic->orderCreate($order_sn, $amount, 'NewSupefinaSpei', $order->user_id);
  138. $order = DB::connection('write')->table('agent.dbo.order')->where('order_sn', $order_sn)
  139. ->first();
  140. } else {
  141. return '{"success":true}';
  142. }
  143. }
  144. $status = (string)($post['transStatus'] ?? '');
  145. if (in_array($status, ['FAILED', 'CLOSED', 'CANCELED'])) {
  146. $body = ['pay_status' => 2, 'updated_at' => date('Y-m-d H:i:s')];
  147. DB::connection('write')->table('agent.dbo.order')->where('order_sn', $order_sn)->update($body);
  148. return '{"success":true}';
  149. }
  150. if (in_array($status, ['REFUNDING', 'PARTIAL_REFUND', 'REFUNDED'])) {
  151. Util::WriteLog('NewSupefinaSpei', 'payin notify status refund: ' . $order_sn);
  152. return '{"success":true}';
  153. }
  154. if ($status !== 'SUCCESS') {
  155. Util::WriteLog('NewSupefinaSpei', 'payin notify status not success: ' . $order_sn);
  156. return '{"success":true}';
  157. }
  158. $GiftsID = $order->GiftsID ?: '';
  159. $userID = $order->user_id ?: '';
  160. $AdId = $order->AdId ?: '';
  161. $eventType = $order->eventType ?: '';
  162. $realityAmount = isset($post['amount']) ? (float)$post['amount'] : (float)($post['amount'] ?? 0);
  163. if ($realityAmount <= 0) {
  164. Util::WriteLog('NewSupefinaSpei_error', 'payin notify invalid realityAmount: ' . json_encode($post));
  165. return 'fail';
  166. }
  167. $payAmt = round($realityAmount, 2);
  168. $amountInScore = (int)round($payAmt * NumConfig::NUM_VALUE);
  169. $body = [
  170. 'payment_sn' => $post['platformOrderNo'] ?? '',
  171. 'pay_status' => 1,
  172. 'pay_at' => date('Y-m-d H:i:s'),
  173. 'finished_at' => date('Y-m-d H:i:s'),
  174. 'amount' => $amountInScore,
  175. 'updated_at' => date('Y-m-d H:i:s'),
  176. ];
  177. $body['payment_fee'] = $post['fee'] ?? 0;
  178. $service = new OrderServices();
  179. if ((int)$order->amount != $amountInScore) {
  180. $body['GiftsID'] = 0;
  181. $body['amount'] = $amountInScore;
  182. $Recharge = $payAmt;
  183. $give = 0;
  184. $favorable_price = $Recharge + $give;
  185. $czReason = 1;
  186. $cjReason = 45;
  187. } else {
  188. [$give, $favorable_price, $Recharge, $czReason, $cjReason] = $service->getPayInfo($GiftsID, $userID, $payAmt);
  189. }
  190. [$Score] = $service->addRecord($userID, $payAmt, $favorable_price, $order_sn, $GiftsID, $Recharge, $czReason, $give, $cjReason, $AdId, $eventType,
  191. $body['payment_fee'] ?? 0);
  192. Order::dispatch([$userID, $payAmt, $Score, $favorable_price, $GiftsID, $order_sn]);
  193. DB::connection('write')->table('agent.dbo.order')->where('order_sn', $order_sn)->update($body);
  194. Util::WriteLog('NewSupefinaSpei', 'payin success, order_sn=' . $order_sn . ', realityAmount=' . $realityAmount);
  195. return '{"success":true}';
  196. } catch (\Throwable $exception) {
  197. Util::WriteLog('NewSupefinaSpei_error', $exception->getMessage() . "\n" . $exception->getTraceAsString());
  198. throw $exception;
  199. }
  200. }
  201. public function payment($RecordID, $amount, $accountName, $phone, $email, $OrderId, $PixNum, $PixType, $IFSCNumber, $BranchBank, $BankNO)
  202. {
  203. // 查询提现订单
  204. $query = DB::connection('write')
  205. ->table('QPAccountsDB.dbo.OrderWithDraw')
  206. ->where('RecordID', $RecordID)
  207. ->first();
  208. if (!$query) {
  209. Util::WriteLog('NewSupefinaSpei', 'withdraw order not found: ' . $RecordID);
  210. return 'fail';
  211. }
  212. $config = (new PayConfig())->getConfig('NewSupefinaSpei');
  213. // 账户号:优先 PixNum,其次 BankNO
  214. $account = $PixNum ?: $BankNO;
  215. if (!$account) {
  216. Util::WriteLog('NewSupefinaSpei_error', 'missing account for withdraw: ' . $OrderId);
  217. return 'fail';
  218. }
  219. // 银行编号:优先 BankNO(如果看作 bankId),否则使用配置默认
  220. $bankId = $BranchBank;
  221. if ($bankId === '') {
  222. Util::WriteLog('NewSupefinaSpei_error', 'missing bankId for withdraw: ' . $OrderId);
  223. return 'fail';
  224. }
  225. // 提现金额是以分存储,转成两位小数金额
  226. $orderAmount = number_format($amount / 100, 2, '.', '');
  227. $bankList = config('games.mex_bank_list');
  228. try {
  229. $now = time() * 1000;
  230. $data = [
  231. 'transTime' => $now,
  232. 'merchantOrderNo' => $OrderId,
  233. 'amount' => (string)$orderAmount,
  234. 'country' => $config['country'] ?? 'MX',
  235. 'currency' => $config['currency'] ?? 'MXN',
  236. 'payeeInfo' => [
  237. 'accountInfo' => [
  238. 'accountNo' => $account,
  239. 'accountType' => mb_strlen($account) == 16 ? '20' : '10',
  240. ],
  241. 'bankInfo' => [
  242. 'bankCode' => $bankId,
  243. 'bankName' => $bankList[$bankId] ?? 'bank',
  244. ],
  245. 'payeeName' => $accountName ?: 'slot777',
  246. ],
  247. 'notifyUrl' => $config['cashCallbackUrl'],
  248. ];
  249. $url = $config['baseUrl'] . $config['transferPath'];
  250. $result = $this->sendRequest($url, 'TRANSFER', $data);
  251. if ($result === false) {
  252. return 'fail';
  253. }
  254. } catch (\Throwable $e) {
  255. Util::WriteLog('NewSupefinaSpei_error', 'payout request exception: ' . $e->getMessage());
  256. return '';
  257. }
  258. try {
  259. $responseData = \GuzzleHttp\json_decode($result, true);
  260. } catch (\Throwable $e) {
  261. Util::WriteLog('NewSupefinaSpei_error', [$result, $e->getMessage()]);
  262. $this->error = 'Payment processing error';
  263. return false;
  264. }
  265. if (!isset($responseData['success']) || $responseData['success'] !== true) {
  266. $this->error = $responseData['message'] ?? 'request failed';
  267. // 同步下单失败:如果订单在处理中(State=5),退回资金并标记失败
  268. if ((int)$query->State === 5) {
  269. $msg = $data['msg'] ?? 'NewSupefinaSpei payout failed';
  270. $WithDraw = $query->WithDraw + $query->ServiceFee;
  271. $bonus = '30000,' . $WithDraw;
  272. PrivateMail::failMail($query->UserID, $OrderId, $WithDraw, $msg, $bonus);
  273. $withdraw_data = [
  274. 'State' => 6,
  275. 'agent' => self::AGENT,
  276. 'finishDate' => now(),
  277. 'remark' => json_encode($data),
  278. ];
  279. DB::connection('write')
  280. ->table('QPAccountsDB.dbo.OrderWithDraw')
  281. ->where('OrderId', $query->OrderId)
  282. ->update($withdraw_data);
  283. $RecordData = ['after_state' => 6, 'update_at' => now()];
  284. DB::connection('write')
  285. ->table('QPAccountsDB.dbo.AccountsRecord')
  286. ->where('type', 1)
  287. ->where('RecordID', $RecordID)
  288. ->update($RecordData);
  289. }
  290. return 'fail';
  291. }
  292. $decryptData = Aes::decrypt($responseData['data'], base64_decode($config['aesKey']));
  293. Util::WriteLog('NewSupefinaSpei', 'transfer decrypt response: ' . $decryptData);
  294. $this->result = json_decode($decryptData, true);
  295. return $this->result;
  296. }
  297. public function cashNotify($post)
  298. {
  299. $OrderId = $post['merchantOrderNo'];
  300. if ($OrderId === '') {
  301. Util::WriteLog('NewSupefinaSpei_error', 'payout notify missing merchantOrderNo');
  302. return 'fail';
  303. }
  304. $query = DB::connection('write')
  305. ->table('QPAccountsDB.dbo.OrderWithDraw')
  306. ->where('OrderId', $OrderId)
  307. ->first();
  308. if (!$query) {
  309. Util::WriteLog('NewSupefinaSpei_error', 'withdraw order not found in notify: '.$OrderId);
  310. return '{"success":true}';
  311. }
  312. // 只处理 State=5 或 7 的订单,避免重复
  313. if (!in_array((int)$query->State, [5, 7], true)) {
  314. Util::WriteLog('NewSupefinaSpei', 'withdraw already handled: '.$OrderId);
  315. return '{"success":true}';
  316. }
  317. $status = $post['transStatus'] ?? '';
  318. $orderStatus = 0;
  319. if (in_array($status, ['SUCCESS'], true)) {
  320. $orderStatus = 1; // 成功
  321. } elseif (in_array($status, ['FAILED', 'CANCELED', 'REFUNDED'])) {
  322. $orderStatus = 2; // 失败
  323. }
  324. if ($orderStatus === 0) {
  325. Util::WriteLog('NewSupefinaSpei', 'payout processing: '.$OrderId.' status='.$status);
  326. return '{"success":true}';
  327. }
  328. $agentID = DB::connection('write')
  329. ->table('agent.dbo.admin_configs')
  330. ->where('config_value', self::AGENT)
  331. ->where('type', 'cash')
  332. ->value('id') ?? '';
  333. $now = now();
  334. $UserID = $query->UserID;
  335. $TakeMoney = $query->WithDraw + $query->ServiceFee;
  336. // Supefina 回调里带有 amount/fee 和 realityAmount/realityFee
  337. // 提醒:这里仍以我们订单金额为准做账,仅将真实金额用于日志,可根据需要扩展到统计侧。
  338. $realityAmount = isset($post['amount']) ? (float)$post['amount'] : null;
  339. $realityFee = isset($post['fee']) ? (float)$post['fee'] : null;
  340. Util::WriteLog('NewSupefinaSpei', 'payout reality: amount='.$realityAmount.', fee='.$realityFee.', orderId='.$OrderId);
  341. $withdraw_data = [];
  342. switch ($orderStatus) {
  343. case 1: // 提现成功
  344. $withdraw_data = [
  345. 'State' => 2,
  346. 'agent' => $agentID,
  347. 'finishDate' => $now,
  348. 'withdraw_fee' => $realityFee * NumConfig::NUM_VALUE,
  349. ];
  350. // 增加提现记录
  351. $first = DB::connection('write')
  352. ->table('QPAccountsDB.dbo.UserTabData')
  353. ->where('UserID', $UserID)
  354. ->first();
  355. if ($first) {
  356. DB::connection('write')
  357. ->table('QPAccountsDB.dbo.UserTabData')
  358. ->where('UserID', $UserID)
  359. ->increment('TakeMoney', $TakeMoney);
  360. } else {
  361. DB::connection('write')
  362. ->table('QPAccountsDB.dbo.UserTabData')
  363. ->insert(['TakeMoney' => $TakeMoney, 'UserID' => $UserID]);
  364. try {
  365. PrivateMail::praiseSendMail($UserID);
  366. } catch (\Throwable $e) {
  367. // 忽略邮件发送失败
  368. }
  369. }
  370. // 免审记录
  371. $withdrawal_position_log = DB::connection('write')
  372. ->table('agent.dbo.withdrawal_position_log')
  373. ->where('order_sn', $OrderId)
  374. ->first();
  375. if ($withdrawal_position_log) {
  376. DB::connection('write')
  377. ->table('agent.dbo.withdrawal_position_log')
  378. ->where('order_sn', $OrderId)
  379. ->update(['take_effect' => 2, 'update_at' => date('Y-m-d H:i:s')]);
  380. }
  381. try {
  382. StoredProcedure::addPlatformData($UserID, 4, $TakeMoney);
  383. } catch (\Throwable $exception) {
  384. Util::WriteLog('StoredProcedure', $exception->getMessage());
  385. }
  386. $ServiceFee = $query->ServiceFee;
  387. RecordUserDataStatistics::updateOrAdd($UserID, $TakeMoney, 0, $ServiceFee);
  388. $fee = DB::table('QPAccountsDB.dbo.OrderWithDraw')->where('OrderId', $OrderId)
  389. ->value('withdraw_fee');
  390. (new RechargeWithDraw())->withDraw($UserID, $TakeMoney, $realityFee * NumConfig::NUM_VALUE, $ServiceFee);
  391. $redis = Redis::connection();
  392. $redis->incr('draw_'.date('Ymd').$UserID);
  393. break;
  394. case 2: // 提现失败
  395. $msg = $post['msg'] ?? 'Withdraw rejected';
  396. $bonus = '30000,'.$TakeMoney;
  397. PrivateMail::failMail($query->UserID, $OrderId, $TakeMoney, $msg, $bonus);
  398. Util::WriteLog('SupefinaSpeiEmail', [$query->UserID, $OrderId, $TakeMoney, $msg, $bonus]);
  399. $withdraw_data = [
  400. 'State' => 6,
  401. 'agent' => $agentID,
  402. 'remark' => $msg,
  403. ];
  404. break;
  405. }
  406. $RecordData = [
  407. 'before_state' => $query->State,
  408. 'after_state' => $withdraw_data['State'] ?? 0,
  409. 'RecordID' => $query->RecordID,
  410. 'update_at' => date('Y-m-d H:i:s'),
  411. ];
  412. DB::connection('write')
  413. ->table('QPAccountsDB.dbo.AccountsRecord')
  414. ->updateOrInsert(
  415. ['RecordID' => $query->RecordID, 'type' => 1],
  416. $RecordData
  417. );
  418. DB::connection('write')
  419. ->table('QPAccountsDB.dbo.OrderWithDraw')
  420. ->where('OrderId', $OrderId)
  421. ->update($withdraw_data);
  422. if (isset($withdraw_data['State']) && (int)$withdraw_data['State'] === 2) {
  423. StoredProcedure::user_label($UserID, 2, $TakeMoney);
  424. }
  425. return '{"success":true}';
  426. }
  427. public function getSignString($headers, $data)
  428. {
  429. $params = array_merge($headers, $data);
  430. $filtered = [];
  431. foreach ($params as $k => $v) {
  432. if (strtolower($k) === 'sign') {
  433. continue;
  434. }
  435. if ($v === null) {
  436. continue;
  437. }
  438. $filtered[$k] = $v;
  439. }
  440. ksort($filtered);
  441. $parts = [];
  442. foreach ($filtered as $k => $v) {
  443. $parts[] = $k . '=' . $v;
  444. }
  445. $signString = implode('&', $parts);
  446. return $signString;
  447. }
  448. public function sign($headers, $data, $key)
  449. {
  450. $signString = $this->getSignString($headers, $data);
  451. $res = openssl_pkey_get_private("-----BEGIN PRIVATE KEY-----\n" . $key . "\n-----END PRIVATE KEY-----");
  452. openssl_sign(
  453. $signString,
  454. $signature,
  455. $res,
  456. OPENSSL_ALGO_SHA256 // RSA2 核心
  457. );
  458. return base64_encode($signature);
  459. }
  460. public function verifySign($data, $sign, $key)
  461. {
  462. $res = openssl_pkey_get_public("-----BEGIN PUBLIC KEY-----\n" . $key . "\n-----END PUBLIC KEY-----");
  463. $result = openssl_verify(
  464. $data,
  465. base64_decode($sign),
  466. $res,
  467. OPENSSL_ALGO_SHA256
  468. );
  469. return $result === 1;
  470. }
  471. private function sendRequest($url, $productNo, $data)
  472. {
  473. $config = (new PayConfig())->getConfig('NewSupefinaSpei');
  474. $headers = [
  475. 'version' => '1.0.0',
  476. 'merchantNo' => $config['merId'] ?? '',
  477. 'requestId' => mt_rand(100000, 999999) . time(),
  478. 'requestTime' => time() * 1000,
  479. ];
  480. $body = [
  481. 'productNo' => $productNo,
  482. 'data' => Aes::encrypt(json_encode($data), base64_decode($config['aesKey'])),
  483. ];
  484. $sign = $this->sign($headers, $body, $config['privateKey']);
  485. $headers['sign'] = $sign;
  486. try {
  487. $client = new Client();
  488. Util::WriteLog('NewSupefinaSpei', $productNo . ' request: ' . $url . ' | ' . json_encode($data) . '|' . json_encode($headers));
  489. $result = $client->post($url, [
  490. 'headers' => $headers,
  491. 'json' => $body,
  492. ])->getBody()->getContents();
  493. Util::WriteLog('NewSupefinaSpei', $productNo . ' response: ' . $result);
  494. return $result;
  495. } catch (\Throwable $e) {
  496. Util::WriteLog('NewSupefinaSpei_error', $productNo . ' request exception: ' . $e->getMessage());
  497. $this->error = 'Payment processing error';
  498. return false;
  499. }
  500. }
  501. }