Changeset 2576337
- Timestamp:
- 08/02/2021 09:52:30 AM (4 years ago)
- Location:
- best2pay-payment-method-visamastercard
- Files:
-
- 3 edited
-
best2pay-payment_method.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
-
trunk/best2pay-payment_method.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
best2pay-payment-method-visamastercard/best2pay-payment_method.php
r2534234 r2576337 1 1 <?php 2 2 /* 3 This program is free software; you can redistribute it and/or modify4 it under the terms of the GNU General Public License, version 2, as5 published by the Free Software Foundation.6 7 This program is distributed in the hope that it will be useful,8 but WITHOUT ANY WARRANTY; without even the implied warranty of9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the10 GNU General Public License for more details.11 12 You should have received a copy of the GNU General Public License13 along with this program; if not, write to the Free Software14 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA3 This program is free software; you can redistribute it and/or modify 4 it under the terms of the GNU General Public License, version 2, as 5 published by the Free Software Foundation. 6 7 This program is distributed in the hope that it will be useful, 8 but WITHOUT ANY WARRANTY; without even the implied warranty of 9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 GNU General Public License for more details. 11 12 You should have received a copy of the GNU General Public License 13 along with this program; if not, write to the Free Software 14 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 15 */ 16 16 /** … … 18 18 * Plugin URI: http://best2pay.net/ 19 19 * Description: Receive payments via Visa/Mastercard easily with Best2Pay bank cards processing 20 * Version: 1.1. 120 * Version: 1.1.2 21 21 * Author: Best2Pay 22 22 * Tested up to: 5.7.1 … … 218 218 219 219 if (intval($b2p_order_id) == 0) { 220 $request_body = $args['body']; 221 $request_body['email'] = ($request_body['email']) ? 'isset' : 'isnotset'; 222 $request_body['signature'] = ($request_body['signature']) ? 'isset' : 'isnotset'; 223 $this->logIt('Не удалось зарегистрировать заказ', array('b2p_order_id' => $b2p_order_id, 'request_body' => $request_body)); 220 224 return false; 221 225 } … … 396 400 } 397 401 402 403 /** 404 * @param string $message 405 * @param array $details 406 */ 407 public function logIt (string $message, array $details = []) { 408 $log = fopen($this->getLogFileName(), 'a+') or die("logging trouble"); 409 $date = date("d.m.y H:i:s"); 410 $msg = "\n" . $date . "\t" . $message; 411 if ($details) { 412 $msg .= "\n" . print_r($details, true); 413 } 414 fwrite($log, $msg); 415 fclose($log); 416 } 417 418 public function getLogFileName () { 419 $signature = base64_encode($this->sector . $this->password . $_SERVER['HTTP_HOST']); 420 $signature = str_ireplace('=', '', $signature); 421 return 'b2p_log_' . $signature . '.txt'; 422 } 423 398 424 } // class 399 425 -
best2pay-payment-method-visamastercard/readme.txt
r2534234 r2576337 5 5 Requires at least: 4.7 6 6 Requires PHP: 7.0 7 Stable tag: 1.1. 17 Stable tag: 1.1.2 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
best2pay-payment-method-visamastercard/trunk/best2pay-payment_method.php
r2534234 r2576337 18 18 * Plugin URI: http://best2pay.net/ 19 19 * Description: Receive payments via Visa/Mastercard easily with Best2Pay bank cards processing 20 * Version: 1.1. 120 * Version: 1.1.2 21 21 * Author: Best2Pay 22 22 * Tested up to: 5.7.1 … … 218 218 219 219 if (intval($b2p_order_id) == 0) { 220 $request_body = $args['body']; 221 $request_body['email'] = ($request_body['email']) ? 'isset' : 'isnotset'; 222 $request_body['signature'] = ($request_body['signature']) ? 'isset' : 'isnotset'; 223 $this->logIt('Не удалось зарегистрировать заказ', array('b2p_order_id' => $b2p_order_id, 'request_body' => $request_body)); 220 224 return false; 221 225 } … … 396 400 } 397 401 402 403 /** 404 * @param string $message 405 * @param array $details 406 */ 407 public function logIt (string $message, array $details = []) { 408 $log = fopen($this->getLogFileName(), 'a+') or die("logging trouble"); 409 $date = date("d.m.y H:i:s"); 410 $msg = "\n" . $date . "\t" . $message; 411 if ($details) { 412 $msg .= "\n" . print_r($details, true); 413 } 414 fwrite($log, $msg); 415 fclose($log); 416 } 417 418 public function getLogFileName () { 419 $signature = base64_encode($this->sector . $this->password . $_SERVER['HTTP_HOST']); 420 $signature = str_ireplace('=', '', $signature); 421 return 'b2p_log_' . $signature . '.txt'; 422 } 423 398 424 } // class 399 425
Note: See TracChangeset
for help on using the changeset viewer.