From 495960da4e8a0a13b66dac9ff14a45b4004094b8 Mon Sep 17 00:00:00 2001 From: ClicShopping Date: Fri, 25 Feb 2022 09:24:34 +0100 Subject: [PATCH 1/9] version 3.316 --- includes/ClicShopping/version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/ClicShopping/version.json b/includes/ClicShopping/version.json index 192f71588..ac94930b8 100755 --- a/includes/ClicShopping/version.json +++ b/includes/ClicShopping/version.json @@ -1,5 +1,5 @@ { - "version": "3.315", + "version": "3.316", "description": "This release is compatible with php 8.x, it introduces some fix.", "date": "2022" } \ No newline at end of file From fc38e2d0a3edef55d65b25c81d1355d96ba774be Mon Sep 17 00:00:00 2001 From: ClicShopping Date: Sat, 26 Feb 2022 10:55:15 +0100 Subject: [PATCH 2/9] Automatic install detection for the first installation --- CHANGELOG.md | 7 +++++ ClicShoppingAdmin/login.php | 21 +++++++------ .../External/vendor/composer/installed.php | 4 +-- .../ClicShopping/Sites/Shop/CustomerShop.php | 23 +++++++------- includes/ClicShopping/Sites/Shop/Shop.php | 18 ++++------- .../ClicShopping/Sites/Shop/ShoppingCart.php | 31 ++++++++++++------- index.php | 17 ++++++++++ 7 files changed, 74 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bfe5077f..8c6488ea1 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ + +------------- +Version 3.316 +Automatic install detection for the first installation +code refactoring + +------------- Version 3.315 Ckeditor version updated Librairies updated diff --git a/ClicShoppingAdmin/login.php b/ClicShoppingAdmin/login.php index 08f92842c..f44af661a 100755 --- a/ClicShoppingAdmin/login.php +++ b/ClicShoppingAdmin/login.php @@ -42,7 +42,7 @@ case 'process': $CLICSHOPPING_Hooks->call('PreAction', 'Process'); - if (isset($_SESSION['redirect_origin']) && isset($_SESSION['redirect_origin']['auth_user']) && !isset($_POST['username'])) { + if (isset($_SESSION['redirect_origin'], $_SESSION['redirect_origin']['auth_user']) && !isset($_POST['username'])) { $username = HTML::sanitize($_SESSION['redirect_origin']['auth_user']); $password = HTML::sanitize($_SESSION['redirect_origin']['auth_pw']); } else { @@ -145,14 +145,15 @@ $first_name = HTML::sanitize($_POST['first_name']); if (!empty($username)) { - $CLICSHOPPING_Db->save('administrators', [ - 'user_name' => $username, - 'user_password' => Hash::encrypt($password), - 'name' => $name, - 'first_name' => $first_name, - 'access' => 1 - ] - ); + $insert_array = [ + 'user_name' => $username, + 'user_password' => Hash::encrypt($password), + 'name' => $name, + 'first_name' => $first_name, + 'access' => 1 + ]; + + $CLICSHOPPING_Db->save('administrators', $insert_array); } } @@ -178,7 +179,7 @@ $Qcheck->bindValue(':user_name', $username); $Qcheck->execute(); - if ($Qcheck->rowCount() == 1 && Is::EmailAddress($username)) { + if ($Qcheck->rowCount() === 1 && Is::EmailAddress($username)) { $new_password = Hash::getRandomString(ENTRY_PASSWORD_MIN_LENGTH); $crypted_password = Hash::encrypt($new_password); diff --git a/includes/ClicShopping/External/vendor/composer/installed.php b/includes/ClicShopping/External/vendor/composer/installed.php index 0e31da33a..0c8d65d33 100755 --- a/includes/ClicShopping/External/vendor/composer/installed.php +++ b/includes/ClicShopping/External/vendor/composer/installed.php @@ -6,7 +6,7 @@ 'aliases' => array ( ), - 'reference' => '5d0e3be779bce467ecda590f9004e08b709992d0', + 'reference' => '495960da4e8a0a13b66dac9ff14a45b4004094b8', 'name' => '__root__', ), 'versions' => @@ -18,7 +18,7 @@ 'aliases' => array ( ), - 'reference' => '5d0e3be779bce467ecda590f9004e08b709992d0', + 'reference' => '495960da4e8a0a13b66dac9ff14a45b4004094b8', ), 'darkghosthunter/preloader' => array ( diff --git a/includes/ClicShopping/Sites/Shop/CustomerShop.php b/includes/ClicShopping/Sites/Shop/CustomerShop.php index 66e5da8f6..ab3d4f272 100755 --- a/includes/ClicShopping/Sites/Shop/CustomerShop.php +++ b/includes/ClicShopping/Sites/Shop/CustomerShop.php @@ -338,9 +338,7 @@ public function setID(int $id) public function setDefaultAddressID(int $id) { if (is_numeric($id) && ($id > 0)) { - if (!isset($this->_data['default_address_id']) || ($this->_data['default_address_id'] != $id)) { - $Qupdate = $this->db->prepare('update :table_customers set customers_default_address_id = :customers_default_address_id where customers_id = :customers_id' @@ -473,21 +471,24 @@ public function reset() public function customerGreeting(): string { if ($this->isLoggedOn()) { - $greeting_string = CLICSHOPPING::getDef('text_greeting_personal', ['first_name' => HTML::outputProtected($this->getFirstName()), - 'url_products_new' => CLICSHOPPING::link(null, 'Products&ProductsNew'), - 'url_logoff' => CLICSHOPPING::link(null, 'Account&LogOff') + $greeting_string = CLICSHOPPING::getDef('text_greeting_personal', [ + 'first_name' => HTML::outputProtected($this->getFirstName()), + 'url_products_new' => CLICSHOPPING::link(null, 'Products&ProductsNew'), + 'url_logoff' => CLICSHOPPING::link(null, 'Account&LogOff') ] ); } else { if (MODE_MANAGEMENT_B2C_B2B == 'B2C_B2B' || MODE_MANAGEMENT_B2C_B2B == 'B2B') { - $greeting_string = CLICSHOPPING::getDef('text_greeting_guest', ['url_login' => CLICSHOPPING::redirect(null, 'Account&LogIn'), - 'url_create_account' => CLICSHOPPING::link(null, 'Account&Create'), - 'url_create_account_pro' => CLICSHOPPING::link('Account.php', 'Account&CreatePro') + $greeting_string = CLICSHOPPING::getDef('text_greeting_guest', [ + 'url_login' => CLICSHOPPING::redirect(null, 'Account&LogIn'), + 'url_create_account' => CLICSHOPPING::link(null, 'Account&Create'), + 'url_create_account_pro' => CLICSHOPPING::link('Account.php', 'Account&CreatePro') ] ); } else { - $greeting_string = CLICSHOPPING::getDef('text_greeting_guest', ['url_login' => CLICSHOPPING::redirect(null, 'Account&LogIn'), - 'url_products_new' => CLICSHOPPING::link(null, 'Products&ProductsNew') + $greeting_string = CLICSHOPPING::getDef('text_greeting_guest', [ + 'url_login' => CLICSHOPPING::redirect(null, 'Account&LogIn'), + 'url_products_new' => CLICSHOPPING::link(null, 'Products&ProductsNew') ] ); } @@ -515,7 +516,7 @@ public function hasProductNotifications(): bool /** * @return mixed */ - public function getProductNotifications() + public function getProductNotifications() :mixed { $CLICSHOPPING_Language = Registry::get('Language'); diff --git a/includes/ClicShopping/Sites/Shop/Shop.php b/includes/ClicShopping/Sites/Shop/Shop.php index 5666a0e2d..f648b010f 100755 --- a/includes/ClicShopping/Sites/Shop/Shop.php +++ b/includes/ClicShopping/Sites/Shop/Shop.php @@ -35,17 +35,6 @@ protected function init() $CLICSHOPPING_Cookies = new Cookies(); Registry::set('Cookies', $CLICSHOPPING_Cookies); -//check configuration - if (!CLICSHOPPING::configExists('db_server') || (\strlen(CLICSHOPPING::getConfig('db_server')) < 1)) { - if (is_dir($_SERVER['DOCUMENT_ROOT'] . '/install')) { - header('Location: /install/index.php'); - exit; - } else { - echo 'Please look your install directory to begin your new installation like https://wwww.mydomain.com/MyDirectory/install'; - exit; - } - } - try { $CLICSHOPPING_Db = Db::initialize(); Registry::set('Db', $CLICSHOPPING_Db); @@ -136,7 +125,7 @@ protected function init() $CLICSHOPPING_Breadcrumb->getCategoriesManufacturer(); } - public function setPage() + public function setPage() :void { // en relation avec SitesAbstract @@ -187,6 +176,11 @@ public function setPage() } } + /** + * @param array $route + * @param array $routes + * @return array|mixed + */ public static function resolveRoute(array $route, array $routes) { $result = []; diff --git a/includes/ClicShopping/Sites/Shop/ShoppingCart.php b/includes/ClicShopping/Sites/Shop/ShoppingCart.php index aef751c1c..d5895c335 100755 --- a/includes/ClicShopping/Sites/Shop/ShoppingCart.php +++ b/includes/ClicShopping/Sites/Shop/ShoppingCart.php @@ -123,8 +123,13 @@ public function getRestoreContents() $this->productsId = $item_id; $restore_qty = $this->getRestoreQty($qty, $item_id); - if ($qty < $restore_qty) $qty = $this->getRestoreQty(); - if ($qty > $restore_qty) $qty = $data['qty']; + if ($qty < $restore_qty) { + $qty = $this->getRestoreQty(); + } + + if ($qty > $restore_qty) { + $qty = $data['qty']; + } $Qcheck = $this->db->prepare('select products_id from :table_customers_basket @@ -450,14 +455,14 @@ public function add(string $products_id, int $qty = 1, $attributes = '', bool $n $this->contents[$products_id_string]['attributes'][$option] = $value; // insert into database if ($this->customer->isLoggedOn()) { - - $this->db->save('customers_basket_attributes', [ + $insert_array = [ 'customers_id' => (int)$this->customer->getID(), 'products_id' => $products_id_string, 'products_options_id' => (int)$option, 'products_options_value_id' => (int)$value - ] - ); + ]; + + $this->db->save('customers_basket_attributes', $insert_array); } } } @@ -545,12 +550,14 @@ public function addCart(string $products_id,int $qty = 1, $attributes = '', bool $this->contents[$products_id_string]['attributes'][$option] = $value; // insert into database if ($this->customer->isLoggedOn()) { - $this->db->save('customers_basket_attributes', ['customers_id' => (int)$this->customer->getID(), - 'products_id' => $products_id_string, - 'products_options_id' => (int)$option, - 'products_options_value_id' => (int)$value - ] - ); + $insert_array = [ + 'customers_id' => (int)$this->customer->getID(), + 'products_id' => $products_id_string, + 'products_options_id' => (int)$option, + 'products_options_value_id' => (int)$value + ]; + + $this->db->save('customers_basket_attributes', $insert_array); } } } diff --git a/index.php b/index.php index 43ffd59cb..e7abd3eba 100755 --- a/index.php +++ b/index.php @@ -21,6 +21,23 @@ CLICSHOPPING::initialize(); +//check configuration + if (!CLICSHOPPING::configExists('db_server') || (\strlen(CLICSHOPPING::getConfig('db_server')) < 1)) { + if (realpath(__DIR__ . '/install/')) { + $realDocRoot = realpath($_SERVER['DOCUMENT_ROOT']); + $realDirPath = realpath(__DIR__); + $suffix = str_replace($realDocRoot, '', $realDirPath); + $prefix = isset($_SERVER['HTTPS']) ? 'https://' : 'http://'; + $folderUrl = $prefix . $_SERVER['HTTP_HOST'] . $suffix . '/install'; + + header('Location:' . $folderUrl); + exit; + } else { + echo 'Please look your install directory to begin your new installation like https://wwww.mydomain.com/MyDirectory/install'; + exit; + } + } + CLICSHOPPING::loadSite('Shop'); if (CLICSHOPPING::hasSitePage()) { From d4203cfd1e0499efeb7c9e8ce756f3e2b093e30b Mon Sep 17 00:00:00 2001 From: ClicShopping Date: Sat, 26 Feb 2022 15:59:09 +0100 Subject: [PATCH 3/9] add a new menu abnout technicals documents --- CHANGELOG.md | 3 +++ .../External/vendor/composer/InstalledVersions.php | 4 ++-- includes/ClicShopping/OM/HTTP.php | 12 +++++++----- install/clicshopping.sql | 5 +++++ install/clicshopping_en.sql | 5 +++++ install/demo_clicshopping_en.sql | 5 ++++- 6 files changed, 26 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c6488ea1..9ffbd05fa 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ Version 3.316 Automatic install detection for the first installation code refactoring +add support menu with wiki link (technical doc) + + ------------- Version 3.315 diff --git a/includes/ClicShopping/External/vendor/composer/InstalledVersions.php b/includes/ClicShopping/External/vendor/composer/InstalledVersions.php index c75e29355..b5d42b081 100755 --- a/includes/ClicShopping/External/vendor/composer/InstalledVersions.php +++ b/includes/ClicShopping/External/vendor/composer/InstalledVersions.php @@ -30,7 +30,7 @@ class InstalledVersions 'aliases' => array ( ), - 'reference' => '5d0e3be779bce467ecda590f9004e08b709992d0', + 'reference' => '495960da4e8a0a13b66dac9ff14a45b4004094b8', 'name' => '__root__', ), 'versions' => @@ -42,7 +42,7 @@ class InstalledVersions 'aliases' => array ( ), - 'reference' => '5d0e3be779bce467ecda590f9004e08b709992d0', + 'reference' => '495960da4e8a0a13b66dac9ff14a45b4004094b8', ), 'darkghosthunter/preloader' => array ( diff --git a/includes/ClicShopping/OM/HTTP.php b/includes/ClicShopping/OM/HTTP.php index e003aeb9a..ead9d59ce 100755 --- a/includes/ClicShopping/OM/HTTP.php +++ b/includes/ClicShopping/OM/HTTP.php @@ -111,7 +111,7 @@ public static function getResponse(array $data) $options['json'] = $data['parameters']; } else { if (($data['method'] === 'post') && !empty($data['parameters'])) { - if (!isset($options['headers']) || !isset($options['headers']['Content-Type'])) { + if (!isset($options['headers'], $options['headers']['Content-Type'])) { $options['headers']['Content-Type'] = 'application/x-www-form-urlencoded'; } @@ -298,9 +298,11 @@ public static function getFullPath(string $path = '', string $separator = '/') : $base = rtrim($base, $separator); } - if ($path === '' || $path === '.' . $separator) return $base; - - if (substr($path, 0, 3) === '..' . $separator) { + if ($path == '' || $path == '.' . $separator) { + return $base; + } + + if (substr($path, 0, 3) == '..' . $separator) { $path = $base . $separator . $path; } @@ -314,7 +316,7 @@ public static function getFullPath(string $path = '', string $separator = '/') : } // Relative path from 'Here' - if (substr($path, 0, 2) === '.' . $separator || $path[0] !== '.') { + if (substr($path, 0, 2) == '.' . $separator || $path[0] !== '.') { $arrn = preg_split($preg_separator, $path, -1, PREG_SPLIT_NO_EMPTY); if ($arrn[0] !== '.') { array_unshift($arrn, '.'); diff --git a/install/clicshopping.sql b/install/clicshopping.sql index bb7886602..4a531c655 100755 --- a/install/clicshopping.sql +++ b/install/clicshopping.sql @@ -188,6 +188,8 @@ INSERT INTO administrator_menu VALUES(778, 'index.php?A&Marketing\\Favorites&Fav INSERT INTO administrator_menu VALUES(779, 'index.php?A&Configuration\\Modules&Modules&set=modules_products_favorites', 117, 1, 0, 'products_favorites.png', 0, 'app_marketing_favorites', 1); INSERT INTO administrator_menu VALUES(780, 'index.php?A&Marketing\\Featured&Featured', 5, 1, 0, 'products_featured.png', 0, 'app_marketing_featured', 1); INSERT INTO administrator_menu VALUES(781, 'index.php?A&Configuration\\Modules&Modules&set=modules_products_featured', 117, 1, 0, 'products_featured.png', 0, 'app_marketing_featured', 1); +INSERT INTO administrator_menu VALUES(782, '', 163, 0, 0, '', 0, NULL, 1); +INSERT INTO administrator_menu VALUES(783, 'https://github.com/ClicShopping/ClicShopping_V3/wiki', 782, 0, 0, '', 0, NULL, 1); INSERT INTO administrator_menu_description VALUES(0, '', 1); INSERT INTO administrator_menu_description VALUES(0, '', 2); @@ -516,6 +518,9 @@ INSERT INTO administrator_menu_description VALUES(780, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(780, 'Produits sélectionnés', 2); INSERT INTO administrator_menu_description VALUES(781, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(781, 'Produits sélectionnés', 2); +INSERT INTO administrator_menu_description VALUES((782, 'Technical documents', 1); +INSERT INTO administrator_menu_description VALUES((782, 'Documents Techniques', 2); + INSERT INTO banners VALUES(1, 'Logo', '', 'logos/others/logo_clicshopping.webp', 'Default_multi_template_logo', '_self', '', 0, NULL, NULL, '2018-07-30 18:11:20', NULL, 1, 0, 99, 'Logo'); diff --git a/install/clicshopping_en.sql b/install/clicshopping_en.sql index c9beee9c2..d324dc715 100755 --- a/install/clicshopping_en.sql +++ b/install/clicshopping_en.sql @@ -188,6 +188,8 @@ INSERT INTO administrator_menu VALUES(778, 'index.php?A&Marketing\\Favorites&Fav INSERT INTO administrator_menu VALUES(779, 'index.php?A&Configuration\\Modules&Modules&set=modules_products_favorites', 117, 1, 0, 'products_favorites.png', 0, 'app_marketing_favorites', 1); INSERT INTO administrator_menu VALUES(780, 'index.php?A&Marketing\\Featured&Featured', 5, 1, 0, 'products_featured.png', 0, 'app_marketing_featured', 1); INSERT INTO administrator_menu VALUES(781, 'index.php?A&Configuration\\Modules&Modules&set=modules_products_featured', 117, 1, 0, 'products_featured.png', 0, 'app_marketing_featured', 1); +INSERT INTO administrator_menu VALUES(782, '', 163, 0, 0, '', 0, NULL, 1); +INSERT INTO administrator_menu VALUES(783, 'https://github.com/ClicShopping/ClicShopping_V3/wiki', 782, 0, 0, '', 0, NULL, 1); INSERT INTO administrator_menu_description VALUES(0, '', 1); INSERT INTO administrator_menu_description VALUES(0, '', 2); @@ -516,6 +518,9 @@ INSERT INTO administrator_menu_description VALUES(780, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(780, 'Produits sélectionnés', 2); INSERT INTO administrator_menu_description VALUES(781, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(781, 'Produits sélectionnés', 2); +INSERT INTO administrator_menu_description VALUES((782, 'Technicals documents', 1); +INSERT INTO administrator_menu_description VALUES((782, 'Documents Techniques', 2); + INSERT INTO banners VALUES(1, 'Logo', '', 'logos/others/logo_clicshopping.webp', 'Default_multi_template_logo', '_self', '', 0, NULL, NULL, '2018-07-30 18:11:20', NULL, 1, 0, 99, 'Logo'); diff --git a/install/demo_clicshopping_en.sql b/install/demo_clicshopping_en.sql index cfcf6c35e..a2454ddd1 100755 --- a/install/demo_clicshopping_en.sql +++ b/install/demo_clicshopping_en.sql @@ -189,6 +189,8 @@ INSERT INTO administrator_menu VALUES(778, 'index.php?A&Marketing\\Favorites&Fav INSERT INTO administrator_menu VALUES(779, 'index.php?A&Configuration\\Modules&Modules&set=modules_products_favorites', 117, 1, 0, 'products_favorites.png', 0, 'app_marketing_favorites', 1); INSERT INTO administrator_menu VALUES(780, 'index.php?A&Marketing\\Featured&Featured', 5, 1, 0, 'products_featured.png', 0, 'app_marketing_featured', 1); INSERT INTO administrator_menu VALUES(781, 'index.php?A&Configuration\\Modules&Modules&set=modules_products_featured', 117, 1, 0, 'products_featured.png', 0, 'app_marketing_featured', 1); +INSERT INTO administrator_menu VALUES(782, '', 163, 0, 0, '', 0, NULL, 1); +INSERT INTO administrator_menu VALUES(783, 'https://github.com/ClicShopping/ClicShopping_V3/wiki', 782, 0, 0, '', 0, NULL, 1); INSERT INTO administrator_menu_description VALUES(0, '', 1); INSERT INTO administrator_menu_description VALUES(0, '', 2); @@ -517,7 +519,8 @@ INSERT INTO administrator_menu_description VALUES(780, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(780, 'Produits sélectionnés', 2); INSERT INTO administrator_menu_description VALUES(781, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(781, 'Produits sélectionnés', 2); - +INSERT INTO administrator_menu_description VALUES((782, 'Technicals documents', 1); +INSERT INTO administrator_menu_description VALUES((782, 'Documents Techniques', 2); INSERT INTO banners VALUES(1, 'Logo', '', 'logos/others/logo_clicshopping.webp', 'Default_multi_template_logo', '_self', '', NULL, NULL, NULL, '2018-07-26 11:47:52', NULL, 1, 0, 99, 'Logo'); From a03d04d826e8773afe6d8e9d1f0fbd77ef9da945 Mon Sep 17 00:00:00 2001 From: ClicShopping Date: Mon, 28 Feb 2022 18:12:59 +0100 Subject: [PATCH 4/9] phpmailer librairies --- composer.lock | 12 ++--- .../vendor/composer/InstalledVersions.php | 10 ++--- .../External/vendor/composer/installed.json | 14 +++--- .../External/vendor/composer/installed.php | 10 ++--- .../vendor/phpmailer/phpmailer/VERSION | 2 +- .../vendor/phpmailer/phpmailer/src/OAuth.php | 2 +- .../phpmailer/src/OAuthTokenProvider.php | 44 +++++++++++++++++++ .../phpmailer/phpmailer/src/PHPMailer.php | 41 +++++++++++++---- .../vendor/phpmailer/phpmailer/src/POP3.php | 2 +- .../vendor/phpmailer/phpmailer/src/SMTP.php | 4 +- includes/ClicShopping/OM/DbStatement.php | 4 +- sql_upgrade/update3_315.txt | 16 +++++++ 12 files changed, 123 insertions(+), 38 deletions(-) create mode 100644 includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php create mode 100644 sql_upgrade/update3_315.txt diff --git a/composer.lock b/composer.lock index d76ffcee7..a9ab38e56 100755 --- a/composer.lock +++ b/composer.lock @@ -456,16 +456,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.4", + "version": "v6.6.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285" + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c0d9f7dd3c2aa247ca44791e9209233829d82285", - "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1", + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1", "shasum": "" }, "require": { @@ -522,7 +522,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.4" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0" }, "funding": [ { @@ -530,7 +530,7 @@ "type": "github" } ], - "time": "2022-02-17T08:19:04+00:00" + "time": "2022-02-28T15:31:21+00:00" }, { "name": "phpxmlrpc/phpxmlrpc", diff --git a/includes/ClicShopping/External/vendor/composer/InstalledVersions.php b/includes/ClicShopping/External/vendor/composer/InstalledVersions.php index b5d42b081..d3148ee90 100755 --- a/includes/ClicShopping/External/vendor/composer/InstalledVersions.php +++ b/includes/ClicShopping/External/vendor/composer/InstalledVersions.php @@ -30,7 +30,7 @@ class InstalledVersions 'aliases' => array ( ), - 'reference' => '495960da4e8a0a13b66dac9ff14a45b4004094b8', + 'reference' => 'd4203cfd1e0499efeb7c9e8ce756f3e2b093e30b', 'name' => '__root__', ), 'versions' => @@ -42,7 +42,7 @@ class InstalledVersions 'aliases' => array ( ), - 'reference' => '495960da4e8a0a13b66dac9ff14a45b4004094b8', + 'reference' => 'd4203cfd1e0499efeb7c9e8ce756f3e2b093e30b', ), 'darkghosthunter/preloader' => array ( @@ -100,12 +100,12 @@ class InstalledVersions ), 'phpmailer/phpmailer' => array ( - 'pretty_version' => 'v6.5.4', - 'version' => '6.5.4.0', + 'pretty_version' => 'v6.6.0', + 'version' => '6.6.0.0', 'aliases' => array ( ), - 'reference' => 'c0d9f7dd3c2aa247ca44791e9209233829d82285', + 'reference' => 'e43bac82edc26ca04b36143a48bde1c051cfd5b1', ), 'phpxmlrpc/phpxmlrpc' => array ( diff --git a/includes/ClicShopping/External/vendor/composer/installed.json b/includes/ClicShopping/External/vendor/composer/installed.json index 7a6015e21..70475d58e 100755 --- a/includes/ClicShopping/External/vendor/composer/installed.json +++ b/includes/ClicShopping/External/vendor/composer/installed.json @@ -464,17 +464,17 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.4", - "version_normalized": "6.5.4.0", + "version": "v6.6.0", + "version_normalized": "6.6.0.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285" + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c0d9f7dd3c2aa247ca44791e9209233829d82285", - "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1", + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1", "shasum": "" }, "require": { @@ -501,7 +501,7 @@ "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" }, - "time": "2022-02-17T08:19:04+00:00", + "time": "2022-02-28T15:31:21+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -533,7 +533,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.4" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0" }, "funding": [ { diff --git a/includes/ClicShopping/External/vendor/composer/installed.php b/includes/ClicShopping/External/vendor/composer/installed.php index 0c8d65d33..d48c459f0 100755 --- a/includes/ClicShopping/External/vendor/composer/installed.php +++ b/includes/ClicShopping/External/vendor/composer/installed.php @@ -6,7 +6,7 @@ 'aliases' => array ( ), - 'reference' => '495960da4e8a0a13b66dac9ff14a45b4004094b8', + 'reference' => 'd4203cfd1e0499efeb7c9e8ce756f3e2b093e30b', 'name' => '__root__', ), 'versions' => @@ -18,7 +18,7 @@ 'aliases' => array ( ), - 'reference' => '495960da4e8a0a13b66dac9ff14a45b4004094b8', + 'reference' => 'd4203cfd1e0499efeb7c9e8ce756f3e2b093e30b', ), 'darkghosthunter/preloader' => array ( @@ -76,12 +76,12 @@ ), 'phpmailer/phpmailer' => array ( - 'pretty_version' => 'v6.5.4', - 'version' => '6.5.4.0', + 'pretty_version' => 'v6.6.0', + 'version' => '6.6.0.0', 'aliases' => array ( ), - 'reference' => 'c0d9f7dd3c2aa247ca44791e9209233829d82285', + 'reference' => 'e43bac82edc26ca04b36143a48bde1c051cfd5b1', ), 'phpxmlrpc/phpxmlrpc' => array ( diff --git a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/VERSION b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/VERSION index c19261717..cd802a1ec 100644 --- a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/VERSION +++ b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/VERSION @@ -1 +1 @@ -6.5.4 \ No newline at end of file +6.6.0 \ No newline at end of file diff --git a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/OAuth.php b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/OAuth.php index c93d0be1b..c1d5b7762 100644 --- a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/OAuth.php +++ b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/OAuth.php @@ -33,7 +33,7 @@ * * @author Marcus Bointon (Synchro/coolbru) */ -class OAuth +class OAuth implements OAuthTokenProvider { /** * An instance of the League OAuth Client Provider. diff --git a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php new file mode 100644 index 000000000..115550743 --- /dev/null +++ b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php @@ -0,0 +1,44 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * OAuthTokenProvider - OAuth2 token provider interface. + * Provides base64 encoded OAuth2 auth strings for SMTP authentication. + * + * @see OAuth + * @see SMTP::authenticate() + * + * @author Peter Scopes (pdscopes) + * @author Marcus Bointon (Synchro/coolbru) + */ +interface OAuthTokenProvider +{ + /** + * Generate a base64-encoded OAuth token ensuring that the access token has not expired. + * The string to be base 64 encoded should be in the form: + * "user=\001auth=Bearer \001\001" + * + * @return string + */ + public function getOauth64(); +} diff --git a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/PHPMailer.php b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/PHPMailer.php index 19110df24..718216b54 100644 --- a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/PHPMailer.php +++ b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -358,9 +358,9 @@ class PHPMailer public $AuthType = ''; /** - * An instance of the PHPMailer OAuth class. + * An implementation of the PHPMailer OAuthTokenProvider interface. * - * @var OAuth + * @var OAuthTokenProvider */ protected $oauth; @@ -750,7 +750,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.5.4'; + const VERSION = '6.6.0'; /** * Error severity: message only, continue processing. @@ -2161,7 +2161,8 @@ public function smtpConnect($options = null) } if ($tls) { if (!$this->smtp->startTLS()) { - throw new Exception($this->lang('connect_host')); + $message = $this->getSmtpErrorMessage('connect_host'); + throw new Exception($message); } //We must resend EHLO after TLS negotiation $this->smtp->hello($hello); @@ -2191,6 +2192,10 @@ public function smtpConnect($options = null) //As we've caught all exceptions, just report whatever the last one was if ($this->exceptions && null !== $lastexception) { throw $lastexception; + } elseif ($this->exceptions) { + // no exception was thrown, likely $this->smtp->connect() failed + $message = $this->getSmtpErrorMessage('connect_host'); + throw new Exception($message); } return false; @@ -4127,6 +4132,26 @@ protected function lang($key) return $key; } + /** + * Build an error message starting with a generic one and adding details if possible. + * + * @param string $base_key + * @return string + */ + private function getSmtpErrorMessage($base_key) + { + $message = $this->lang($base_key); + $error = $this->smtp->getError(); + if (!empty($error['error'])) { + $message .= ' ' . $error['error']; + if (!empty($error['detail'])) { + $message .= ' ' . $error['detail']; + } + } + + return $message; + } + /** * Check if an error occurred. * @@ -5027,9 +5052,9 @@ protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from, $ } /** - * Get the OAuth instance. + * Get the OAuthTokenProvider instance. * - * @return OAuth + * @return OAuthTokenProvider */ public function getOAuth() { @@ -5037,9 +5062,9 @@ public function getOAuth() } /** - * Set an OAuth instance. + * Set an OAuthTokenProvider instance. */ - public function setOAuth(OAuth $oauth) + public function setOAuth(OAuthTokenProvider $oauth) { $this->oauth = $oauth; } diff --git a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/POP3.php b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/POP3.php index 6ca3e3cca..86cfebd20 100644 --- a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/POP3.php +++ b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/POP3.php @@ -46,7 +46,7 @@ class POP3 * * @var string */ - const VERSION = '6.5.4'; + const VERSION = '6.6.0'; /** * Default POP3 port number. diff --git a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/SMTP.php b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/SMTP.php index 138177060..5ecad21da 100644 --- a/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/SMTP.php +++ b/includes/ClicShopping/External/vendor/phpmailer/phpmailer/src/SMTP.php @@ -35,7 +35,7 @@ class SMTP * * @var string */ - const VERSION = '6.5.4'; + const VERSION = '6.6.0'; /** * SMTP line break constant. @@ -483,7 +483,7 @@ public function startTLS() * @param string $username The user name * @param string $password The password * @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2) - * @param OAuth $OAuth An optional OAuth instance for XOAUTH2 authentication + * @param OAuthTokenProvider $OAuth An optional OAuthTokenProvider instance for XOAUTH2 authentication * * @return bool True if successfully authenticated */ diff --git a/includes/ClicShopping/OM/DbStatement.php b/includes/ClicShopping/OM/DbStatement.php index 3e19ee8c9..d09e93762 100755 --- a/includes/ClicShopping/OM/DbStatement.php +++ b/includes/ClicShopping/OM/DbStatement.php @@ -23,7 +23,6 @@ class DbStatement extends \PDOStatement protected $pdo; protected bool $is_error = false; protected string $page_set_keyword = 'page'; - protected ?string $page_set; protected mixed $page_set_results_per_page; protected $cache; protected int $cache_expire; @@ -33,7 +32,8 @@ class DbStatement extends \PDOStatement protected string $query_call; protected ?int $page_set_total_rows; protected $result; - + public ?string $page_set; + /** * @param mixed $parameter * @param mixed $value diff --git a/sql_upgrade/update3_315.txt b/sql_upgrade/update3_315.txt new file mode 100644 index 000000000..5f64c186b --- /dev/null +++ b/sql_upgrade/update3_315.txt @@ -0,0 +1,16 @@ + +=================================== +Step 1 : Update your Db by the sql below + + +#insert in your phpmyAdmin this request in function of your language + +#All language +INSERT INTO administrator_menu VALUES(782, '', 163, 0, 0, '', 0, NULL, 1); +INSERT INTO administrator_menu VALUES(783, 'https://github.com/ClicShopping/ClicShopping_V3/wiki', 782, 0, 0, '', 0, NULL, 1); +INSERT INTO administrator_menu_description VALUES((782, 'Technicals documents', 1); +INSERT INTO administrator_menu_description VALUES((782, 'Documents Techniques', 2); + +#English + +#french From 7deb6c394f11150252f3dd7f73c9e94f2b65c492 Mon Sep 17 00:00:00 2001 From: ClicShopping Date: Mon, 28 Feb 2022 18:14:32 +0100 Subject: [PATCH 5/9] error template updated --- CHANGELOG.md | 3 ++- error_documents/404.php | 25 ++++++++++++++++++------- error_documents/error_template.php | 13 +++---------- error_documents/maintenance.php | 9 ++------- offline.php | 4 ++++ 5 files changed, 29 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ffbd05fa..31214868c 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ Version 3.316 Automatic install detection for the first installation code refactoring add support menu with wiki link (technical doc) - +error template updated +librairies updated ------------- diff --git a/error_documents/404.php b/error_documents/404.php index 4d43b3fa2..7918c0cbb 100755 --- a/error_documents/404.php +++ b/error_documents/404.php @@ -10,6 +10,16 @@ */ use ClicShopping\OM\HTTP; + use ClicShopping\OM\CLICSHOPPING; + + define('CLICSHOPPING_BASE_DIR', realpath(__DIR__ . '/../includes/ClicShopping/') . '/'); + + require_once(CLICSHOPPING_BASE_DIR . 'OM/CLICSHOPPING.php'); + spl_autoload_register('ClicShopping\OM\CLICSHOPPING::autoload'); + + CLICSHOPPING::initialize(); + + CLICSHOPPING::loadSite('Shop'); http_response_code(404); ?> @@ -22,9 +32,8 @@ - - - + +
@@ -41,14 +50,12 @@

This Page is Missing

It looks like this page is missing. Please continue back to our website and try again.

- +

-
@@ -58,5 +65,9 @@ + + diff --git a/error_documents/error_template.php b/error_documents/error_template.php index ab4863e08..ee1e86daa 100755 --- a/error_documents/error_template.php +++ b/error_documents/error_template.php @@ -9,7 +9,6 @@ * */ ?> - @@ -19,22 +18,16 @@ - - + - - Template problem !
diff --git a/error_documents/maintenance.php b/error_documents/maintenance.php index c75fa28ee..2dce9c5d6 100755 --- a/error_documents/maintenance.php +++ b/error_documents/maintenance.php @@ -23,11 +23,7 @@ Maintenance - - - - - +
@@ -37,8 +33,7 @@

We'll be back soon!

We're currently working on and improving our website. We'll be back in a few moments..

-

+

diff --git a/offline.php b/offline.php index b08a56dd4..d99f1db00 100755 --- a/offline.php +++ b/offline.php @@ -12,6 +12,8 @@ + + Site offline @@ -30,4 +32,6 @@ + + \ No newline at end of file From 05f582da528242505480bfdbdbb0385c87c25215 Mon Sep 17 00:00:00 2001 From: ClicShopping Date: Tue, 1 Mar 2022 10:01:12 +0100 Subject: [PATCH 6/9] litlle change on 404 error --- sources/template/Default/files/product_info.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/template/Default/files/product_info.php b/sources/template/Default/files/product_info.php index ca58f1278..3b120fd65 100755 --- a/sources/template/Default/files/product_info.php +++ b/sources/template/Default/files/product_info.php @@ -21,7 +21,7 @@ // ----------------------------------------------------------------// if ($CLICSHOPPING_ProductsCommon->getProductsCount() < 1 || (\is_null($CLICSHOPPING_ProductsCommon->getID())) || $CLICSHOPPING_ProductsCommon->getID() === false ) { - header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); + http_response_code(404); ?>
From ec015e482055f256c9461ef10942deae10dac306 Mon Sep 17 00:00:00 2001 From: ClicShopping Date: Thu, 3 Mar 2022 09:44:35 +0100 Subject: [PATCH 7/9] update librairies, fix db --- composer.lock | 12 +-- .../vendor/composer/InstalledVersions.php | 10 +-- .../External/vendor/composer/installed.json | 14 +-- .../External/vendor/composer/installed.php | 10 +-- .../vendor/stripe/stripe-php/CHANGELOG.md | 18 +++- .../External/vendor/stripe/stripe-php/VERSION | 2 +- .../vendor/stripe/stripe-php/init.php | 3 + .../vendor/stripe/stripe-php/lib/Customer.php | 1 + .../vendor/stripe/stripe-php/lib/Invoice.php | 1 + .../stripe/stripe-php/lib/InvoiceItem.php | 1 + .../stripe/stripe-php/lib/InvoiceLineItem.php | 1 + .../stripe/stripe-php/lib/PaymentMethod.php | 1 + .../vendor/stripe/stripe-php/lib/Quote.php | 1 + .../vendor/stripe/stripe-php/lib/Refund.php | 1 + .../lib/Service/CoreServiceFactory.php | 2 + .../lib/Service/SubscriptionService.php | 11 +++ .../Service/TestHelpers/TestClockService.php | 87 +++++++++++++++++++ .../TestHelpers/TestHelpersServiceFactory.php | 25 ++++++ .../vendor/stripe/stripe-php/lib/Stripe.php | 2 +- .../stripe/stripe-php/lib/StripeClient.php | 1 + .../stripe/stripe-php/lib/Subscription.php | 1 + .../stripe-php/lib/SubscriptionSchedule.php | 1 + .../stripe/stripe-php/lib/Terminal/Reader.php | 2 +- .../stripe-php/lib/TestHelpers/TestClock.php | 53 +++++++++++ .../stripe-php/lib/Util/ObjectTypes.php | 1 + install/clicshopping.sql | 6 +- install/clicshopping_en.sql | 4 +- install/demo_clicshopping_en.sql | 4 +- sql_upgrade/update3_315.txt | 6 +- 29 files changed, 243 insertions(+), 39 deletions(-) create mode 100644 includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestClockService.php create mode 100644 includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php create mode 100644 includes/ClicShopping/External/vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php diff --git a/composer.lock b/composer.lock index a9ab38e56..662846011 100755 --- a/composer.lock +++ b/composer.lock @@ -732,16 +732,16 @@ }, { "name": "stripe/stripe-php", - "version": "v7.114.0", + "version": "v7.116.0", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "63be231686c6874befb5b3a47fb8effb4c30b78b" + "reference": "7a39f594f213ed3f443a95adf769d1ecbc8393e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/63be231686c6874befb5b3a47fb8effb4c30b78b", - "reference": "63be231686c6874befb5b3a47fb8effb4c30b78b", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/7a39f594f213ed3f443a95adf769d1ecbc8393e7", + "reference": "7a39f594f213ed3f443a95adf769d1ecbc8393e7", "shasum": "" }, "require": { @@ -786,9 +786,9 @@ ], "support": { "issues": "https://github.com/stripe/stripe-php/issues", - "source": "https://github.com/stripe/stripe-php/tree/v7.114.0" + "source": "https://github.com/stripe/stripe-php/tree/v7.116.0" }, - "time": "2022-02-15T22:48:31+00:00" + "time": "2022-03-02T15:51:15+00:00" }, { "name": "stymiee/email-validator", diff --git a/includes/ClicShopping/External/vendor/composer/InstalledVersions.php b/includes/ClicShopping/External/vendor/composer/InstalledVersions.php index d3148ee90..56daa594b 100755 --- a/includes/ClicShopping/External/vendor/composer/InstalledVersions.php +++ b/includes/ClicShopping/External/vendor/composer/InstalledVersions.php @@ -30,7 +30,7 @@ class InstalledVersions 'aliases' => array ( ), - 'reference' => 'd4203cfd1e0499efeb7c9e8ce756f3e2b093e30b', + 'reference' => '05f582da528242505480bfdbdbb0385c87c25215', 'name' => '__root__', ), 'versions' => @@ -42,7 +42,7 @@ class InstalledVersions 'aliases' => array ( ), - 'reference' => 'd4203cfd1e0499efeb7c9e8ce756f3e2b093e30b', + 'reference' => '05f582da528242505480bfdbdbb0385c87c25215', ), 'darkghosthunter/preloader' => array ( @@ -152,12 +152,12 @@ class InstalledVersions ), 'stripe/stripe-php' => array ( - 'pretty_version' => 'v7.114.0', - 'version' => '7.114.0.0', + 'pretty_version' => 'v7.116.0', + 'version' => '7.116.0.0', 'aliases' => array ( ), - 'reference' => '63be231686c6874befb5b3a47fb8effb4c30b78b', + 'reference' => '7a39f594f213ed3f443a95adf769d1ecbc8393e7', ), 'stymiee/email-validator' => array ( diff --git a/includes/ClicShopping/External/vendor/composer/installed.json b/includes/ClicShopping/External/vendor/composer/installed.json index 70475d58e..70003fdc9 100755 --- a/includes/ClicShopping/External/vendor/composer/installed.json +++ b/includes/ClicShopping/External/vendor/composer/installed.json @@ -745,17 +745,17 @@ }, { "name": "stripe/stripe-php", - "version": "v7.114.0", - "version_normalized": "7.114.0.0", + "version": "v7.116.0", + "version_normalized": "7.116.0.0", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "63be231686c6874befb5b3a47fb8effb4c30b78b" + "reference": "7a39f594f213ed3f443a95adf769d1ecbc8393e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/63be231686c6874befb5b3a47fb8effb4c30b78b", - "reference": "63be231686c6874befb5b3a47fb8effb4c30b78b", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/7a39f594f213ed3f443a95adf769d1ecbc8393e7", + "reference": "7a39f594f213ed3f443a95adf769d1ecbc8393e7", "shasum": "" }, "require": { @@ -770,7 +770,7 @@ "phpunit/phpunit": "^5.7 || ^9.0", "squizlabs/php_codesniffer": "^3.3" }, - "time": "2022-02-15T22:48:31+00:00", + "time": "2022-03-02T15:51:15+00:00", "type": "library", "extra": { "branch-alias": { @@ -802,7 +802,7 @@ ], "support": { "issues": "https://github.com/stripe/stripe-php/issues", - "source": "https://github.com/stripe/stripe-php/tree/v7.114.0" + "source": "https://github.com/stripe/stripe-php/tree/v7.116.0" }, "install-path": "../stripe/stripe-php" }, diff --git a/includes/ClicShopping/External/vendor/composer/installed.php b/includes/ClicShopping/External/vendor/composer/installed.php index d48c459f0..bdd879676 100755 --- a/includes/ClicShopping/External/vendor/composer/installed.php +++ b/includes/ClicShopping/External/vendor/composer/installed.php @@ -6,7 +6,7 @@ 'aliases' => array ( ), - 'reference' => 'd4203cfd1e0499efeb7c9e8ce756f3e2b093e30b', + 'reference' => '05f582da528242505480bfdbdbb0385c87c25215', 'name' => '__root__', ), 'versions' => @@ -18,7 +18,7 @@ 'aliases' => array ( ), - 'reference' => 'd4203cfd1e0499efeb7c9e8ce756f3e2b093e30b', + 'reference' => '05f582da528242505480bfdbdbb0385c87c25215', ), 'darkghosthunter/preloader' => array ( @@ -128,12 +128,12 @@ ), 'stripe/stripe-php' => array ( - 'pretty_version' => 'v7.114.0', - 'version' => '7.114.0.0', + 'pretty_version' => 'v7.116.0', + 'version' => '7.116.0.0', 'aliases' => array ( ), - 'reference' => '63be231686c6874befb5b3a47fb8effb4c30b78b', + 'reference' => '7a39f594f213ed3f443a95adf769d1ecbc8393e7', ), 'stymiee/email-validator' => array ( diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/CHANGELOG.md b/includes/ClicShopping/External/vendor/stripe/stripe-php/CHANGELOG.md index 98fbe29f8..90b2463c5 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/CHANGELOG.md +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/CHANGELOG.md @@ -1,11 +1,23 @@ # Changelog +## 7.116.0 - 2022-03-02 +* [#1248](https://github.com/stripe/stripe-php/pull/1248) API Updates + * Add support for `proration_details` on `InvoiceLineItem` + + +## 7.115.0 - 2022-03-01 +* [#1245](https://github.com/stripe/stripe-php/pull/1245) [#1247](https://github.com/stripe/stripe-php/pull/1247) API Updates + * Add support for new resource `TestHelpers.TestClock` + * Add support for `test_clock` on `Customer`, `Invoice`, `InvoiceItem`, `Quote`, `Subscription`, and `SubscriptionSchedule` + * Add support for `next_action` on `Refund` + * Add support for `konbini` on `PaymentMethod` +* [#1244](https://github.com/stripe/stripe-php/pull/1244) API Updates + * Add support for new values `bbpos_wisepad3` and `stripe_m2` on enum `Terminal.Reader.device_type` + ## 7.114.0 - 2022-02-15 * [#1243](https://github.com/stripe/stripe-php/pull/1243) Add test * [#1240](https://github.com/stripe/stripe-php/pull/1240) API Updates - * Add support for `verify_microdeposits` method on resources `PaymentIntent` and `SetupIntent` - - + * Add support for `verify_microdeposits` method on resources `PaymentIntent` and `SetupIntent` * [#1241](https://github.com/stripe/stripe-php/pull/1241) Add generic parameter to \Stripe\Collection usages ## 7.113.0 - 2022-02-03 diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/VERSION b/includes/ClicShopping/External/vendor/stripe/stripe-php/VERSION index 1fc959a1e..1d15089e3 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/VERSION +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/VERSION @@ -1 +1 @@ -7.114.0 +7.116.0 diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/init.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/init.php index d4606acfb..4c94ede34 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/init.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/init.php @@ -158,6 +158,7 @@ require __DIR__ . '/lib/Terminal/ConnectionToken.php'; require __DIR__ . '/lib/Terminal/Location.php'; require __DIR__ . '/lib/Terminal/Reader.php'; +require __DIR__ . '/lib/TestHelpers/TestClock.php'; require __DIR__ . '/lib/ThreeDSecure.php'; require __DIR__ . '/lib/Token.php'; require __DIR__ . '/lib/Topup.php'; @@ -230,6 +231,7 @@ require __DIR__ . '/lib/Service/Terminal/ConnectionTokenService.php'; require __DIR__ . '/lib/Service/Terminal/LocationService.php'; require __DIR__ . '/lib/Service/Terminal/ReaderService.php'; +require __DIR__ . '/lib/Service/TestHelpers/TestClockService.php'; require __DIR__ . '/lib/Service/TokenService.php'; require __DIR__ . '/lib/Service/TopupService.php'; require __DIR__ . '/lib/Service/TransferService.php'; @@ -245,6 +247,7 @@ require __DIR__ . '/lib/Service/Reporting/ReportingServiceFactory.php'; require __DIR__ . '/lib/Service/Sigma/SigmaServiceFactory.php'; require __DIR__ . '/lib/Service/Terminal/TerminalServiceFactory.php'; +require __DIR__ . '/lib/Service/TestHelpers/TestHelpersServiceFactory.php'; // OAuth require __DIR__ . '/lib/OAuth.php'; diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Customer.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Customer.php index 6887e4479..a0bcd62d3 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Customer.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Customer.php @@ -37,6 +37,7 @@ * @property \Stripe\StripeObject $tax * @property null|string $tax_exempt Describes the customer's tax exemption status. One of none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the text "Reverse charge". * @property \Stripe\Collection<\Stripe\TaxId> $tax_ids The customer's tax IDs. + * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this customer belongs to. */ class Customer extends ApiResource { diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Invoice.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Invoice.php index f5360a111..6fd62331f 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Invoice.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Invoice.php @@ -104,6 +104,7 @@ * @property int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations. * @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated * @property null|int $tax The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice belongs to. * @property \Stripe\StripeObject $threshold_reason * @property int $total Total after discounts and taxes. * @property null|\Stripe\StripeObject[] $total_discount_amounts The aggregate amounts calculated per discount across all line items. diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/InvoiceItem.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/InvoiceItem.php index 6153bbf98..76eae0693 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/InvoiceItem.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/InvoiceItem.php @@ -34,6 +34,7 @@ * @property null|string|\Stripe\Subscription $subscription The subscription that this invoice item has been created for, if any. * @property string $subscription_item The subscription item that this invoice item has been created for, if any. * @property null|\Stripe\TaxRate[] $tax_rates The tax rates which apply to the invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item. + * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this invoice item belongs to. * @property null|int $unit_amount Unit amount (in the currency specified) of the invoice item. * @property null|string $unit_amount_decimal Same as unit_amount, but contains a decimal value with at most 12 decimal places. */ diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/InvoiceLineItem.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/InvoiceLineItem.php index e579afb6a..0a5331e67 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/InvoiceLineItem.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/InvoiceLineItem.php @@ -20,6 +20,7 @@ * @property null|\Stripe\Plan $plan The plan of the subscription, if the line item is a subscription or a proration. * @property null|\Stripe\Price $price The price of the line item. * @property bool $proration Whether this is a proration. + * @property null|\Stripe\StripeObject $proration_details Additional details for proration line items * @property null|int $quantity The quantity of the subscription, if the line item is a subscription or a proration. * @property null|string $subscription The subscription that the invoice item pertains to, if any. * @property string $subscription_item The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription. diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/PaymentMethod.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/PaymentMethod.php index b4ecd0556..fac09ec8a 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/PaymentMethod.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/PaymentMethod.php @@ -37,6 +37,7 @@ * @property \Stripe\StripeObject $ideal * @property \Stripe\StripeObject $interac_present * @property \Stripe\StripeObject $klarna + * @property \Stripe\StripeObject $konbini * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property \Stripe\StripeObject $oxxo diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Quote.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Quote.php index fd6b4eee0..f94076909 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Quote.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Quote.php @@ -40,6 +40,7 @@ * @property null|string|\Stripe\Subscription $subscription The subscription that was created or updated from this quote. * @property \Stripe\StripeObject $subscription_data * @property null|string|\Stripe\SubscriptionSchedule $subscription_schedule The subscription schedule that was created or updated from this quote. + * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this quote belongs to. * @property \Stripe\StripeObject $total_details * @property null|\Stripe\StripeObject $transfer_data The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. */ diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Refund.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Refund.php index ddff61658..e452653e2 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Refund.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Refund.php @@ -22,6 +22,7 @@ * @property string|\Stripe\BalanceTransaction $failure_balance_transaction If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. * @property string $failure_reason If the refund failed, the reason for refund failure if known. Possible values are lost_or_stolen_card, expired_or_canceled_card, or unknown. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property \Stripe\StripeObject $next_action * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was refunded. * @property null|string $reason Reason for the refund, either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Stripe internally (expired_uncaptured_charge). * @property null|string $receipt_number This is the transaction number that appears on email receipts sent for this refund. diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/CoreServiceFactory.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/CoreServiceFactory.php index edaadd3fa..5157c2b68 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/CoreServiceFactory.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/CoreServiceFactory.php @@ -59,6 +59,7 @@ * @property TaxCodeService $taxCodes * @property TaxRateService $taxRates * @property Terminal\TerminalServiceFactory $terminal + * @property TestHelpers\TestHelpersServiceFactory $testHelpers * @property TokenService $tokens * @property TopupService $topups * @property TransferService $transfers @@ -122,6 +123,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory 'taxCodes' => TaxCodeService::class, 'taxRates' => TaxRateService::class, 'terminal' => Terminal\TerminalServiceFactory::class, + 'testHelpers' => TestHelpers\TestHelpersServiceFactory::class, 'tokens' => TokenService::class, 'topups' => TopupService::class, 'transfers' => TransferService::class, diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/SubscriptionService.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/SubscriptionService.php index 8369e9975..6b10db489 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/SubscriptionService.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/SubscriptionService.php @@ -58,6 +58,17 @@ public function cancel($id, $params = null, $opts = null) * Creates a new subscription on an existing customer. Each customer can have up to * 500 active or scheduled subscriptions. * + * When you create a subscription with + * collection_method=charge_automatically, the first invoice is + * finalized as part of the request. The payment_behavior parameter + * determines the exact behavior of the initial payment. + * + * To start subscriptions where the first invoice always begins in a + * draft status, use subscription + * schedules instead. Schedules provide the flexibility to model more complex + * billing configurations that change over time. + * * @param null|array $params * @param null|array|\Stripe\Util\RequestOptions $opts * diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestClockService.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestClockService.php new file mode 100644 index 000000000..a4eee8c3e --- /dev/null +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestClockService.php @@ -0,0 +1,87 @@ +Ready. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TestHelpers\TestClock + */ + public function advance($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/test_clocks/%s/advance', $id), $params, $opts); + } + + /** + * Returns a list of your test clocks. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection<\Stripe\TestHelpers\TestClock> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/test_helpers/test_clocks', $params, $opts); + } + + /** + * Creates a new test clock that can be attached to new customers and quotes. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TestHelpers\TestClock + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/test_helpers/test_clocks', $params, $opts); + } + + /** + * Deletes a test clock. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TestHelpers\TestClock + */ + public function delete($id, $params = null, $opts = null) + { + return $this->request('delete', $this->buildPath('/v1/test_helpers/test_clocks/%s', $id), $params, $opts); + } + + /** + * Retrieves a test clock. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TestHelpers\TestClock + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/test_helpers/test_clocks/%s', $id), $params, $opts); + } +} diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php new file mode 100644 index 000000000..01f15946a --- /dev/null +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Service/TestHelpers/TestHelpersServiceFactory.php @@ -0,0 +1,25 @@ + + */ + private static $classMap = [ + 'testClocks' => TestClockService::class, + ]; + + protected function getServiceClass($name) + { + return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null; + } +} diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Stripe.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Stripe.php index 9eed6295d..5705f5401 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Stripe.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Stripe.php @@ -58,7 +58,7 @@ class Stripe /** @var float Initial delay between retries, in seconds */ private static $initialNetworkRetryDelay = 0.5; - const VERSION = '7.114.0'; + const VERSION = '7.116.0'; /** * @return string the API key used for requests diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/StripeClient.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/StripeClient.php index 89b4c6be6..89dedad2e 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/StripeClient.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/StripeClient.php @@ -59,6 +59,7 @@ * @property \Stripe\Service\TaxCodeService $taxCodes * @property \Stripe\Service\TaxRateService $taxRates * @property \Stripe\Service\Terminal\TerminalServiceFactory $terminal + * @property \Stripe\Service\TestHelpers\TestHelpersServiceFactory $testHelpers * @property \Stripe\Service\TokenService $tokens * @property \Stripe\Service\TopupService $topups * @property \Stripe\Service\TransferService $transfers diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Subscription.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Subscription.php index 1b91e384d..1220dcf2a 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Subscription.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Subscription.php @@ -44,6 +44,7 @@ * @property null|string|\Stripe\SubscriptionSchedule $schedule The schedule attached to the subscription * @property int $start_date Date when the subscription was first created. The date might differ from the created date due to backdating. * @property string $status

Possible values are incomplete, incomplete_expired, trialing, active, past_due, canceled, or unpaid.

For collection_method=charge_automatically a subscription moves into incomplete if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an active state. If the first invoice is not paid within 23 hours, the subscription transitions to incomplete_expired. This is a terminal state, the open invoice will be voided and no further invoices will be generated.

A subscription that is currently in a trial period is trialing and moves to active when the trial period is over.

If subscription collection_method=charge_automatically it becomes past_due when payment to renew it fails and canceled or unpaid (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts.

If subscription collection_method=send_invoice it becomes past_due when its invoice is not paid by the due date, and canceled or unpaid if it is still not paid by an additional deadline after that. Note that when a subscription has a status of unpaid, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.

+ * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this subscription belongs to. * @property null|int $trial_end If the subscription has a trial, the end of that trial. * @property null|int $trial_start If the subscription has a trial, the beginning of that trial. */ diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/SubscriptionSchedule.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/SubscriptionSchedule.php index d10ea12a3..d4a25ddfb 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/SubscriptionSchedule.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/SubscriptionSchedule.php @@ -28,6 +28,7 @@ * @property null|string $released_subscription ID of the subscription once managed by the subscription schedule (if it is released). * @property string $status The present status of the subscription schedule. Possible values are not_started, active, completed, released, and canceled. You can read more about the different states in our behavior guide. * @property null|string|\Stripe\Subscription $subscription ID of the subscription managed by the subscription schedule. + * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this subscription schedule belongs to. */ class SubscriptionSchedule extends ApiResource { diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Terminal/Reader.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Terminal/Reader.php index 28edf434d..badde99a0 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Terminal/Reader.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Terminal/Reader.php @@ -14,7 +14,7 @@ * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|string $device_sw_version The current software version of the reader. - * @property string $device_type Type of reader, one of bbpos_chipper2x, bbpos_wisepos_e, or verifone_P400. + * @property string $device_type Type of reader, one of bbpos_wisepad3, stripe_m2, bbpos_chipper2x, bbpos_wisepos_e, or verifone_P400. * @property null|string $ip_address The local IP address of the reader. * @property string $label Custom label given to the reader for easier identification. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php new file mode 100644 index 000000000..01d36ea05 --- /dev/null +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/TestHelpers/TestClock.php @@ -0,0 +1,53 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|string $name The custom name supplied at creation. + * @property string $status The status of the Test Clock. + */ +class TestClock extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'test_helpers.test_clock'; + + use \Stripe\ApiOperations\All; + use \Stripe\ApiOperations\Create; + use \Stripe\ApiOperations\Delete; + use \Stripe\ApiOperations\Retrieve; + + const STATUS_ADVANCING = 'advancing'; + const STATUS_INTERNAL_FAILURE = 'internal_failure'; + const STATUS_READY = 'ready'; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\TestHelpers\TestClock the advanced test clock + */ + public function advance($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/advance'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Util/ObjectTypes.php b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Util/ObjectTypes.php index 4546cff06..057364089 100644 --- a/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Util/ObjectTypes.php +++ b/includes/ClicShopping/External/vendor/stripe/stripe-php/lib/Util/ObjectTypes.php @@ -94,6 +94,7 @@ class ObjectTypes \Stripe\Terminal\ConnectionToken::OBJECT_NAME => \Stripe\Terminal\ConnectionToken::class, \Stripe\Terminal\Location::OBJECT_NAME => \Stripe\Terminal\Location::class, \Stripe\Terminal\Reader::OBJECT_NAME => \Stripe\Terminal\Reader::class, + \Stripe\TestHelpers\TestClock::OBJECT_NAME => \Stripe\TestHelpers\TestClock::class, \Stripe\ThreeDSecure::OBJECT_NAME => \Stripe\ThreeDSecure::class, \Stripe\Token::OBJECT_NAME => \Stripe\Token::class, \Stripe\Topup::OBJECT_NAME => \Stripe\Topup::class, diff --git a/install/clicshopping.sql b/install/clicshopping.sql index 4a531c655..f2edfca95 100755 --- a/install/clicshopping.sql +++ b/install/clicshopping.sql @@ -189,7 +189,7 @@ INSERT INTO administrator_menu VALUES(779, 'index.php?A&Configuration\\Modules&M INSERT INTO administrator_menu VALUES(780, 'index.php?A&Marketing\\Featured&Featured', 5, 1, 0, 'products_featured.png', 0, 'app_marketing_featured', 1); INSERT INTO administrator_menu VALUES(781, 'index.php?A&Configuration\\Modules&Modules&set=modules_products_featured', 117, 1, 0, 'products_featured.png', 0, 'app_marketing_featured', 1); INSERT INTO administrator_menu VALUES(782, '', 163, 0, 0, '', 0, NULL, 1); -INSERT INTO administrator_menu VALUES(783, 'https://github.com/ClicShopping/ClicShopping_V3/wiki', 782, 0, 0, '', 0, NULL, 1); +INSERT INTO administrator_menu VALUES(783, 'https://github.com/ClicShopping/ClicShopping_V3/wiki', 163, 0, 0, '', 0, NULL, 1); INSERT INTO administrator_menu_description VALUES(0, '', 1); INSERT INTO administrator_menu_description VALUES(0, '', 2); @@ -518,8 +518,8 @@ INSERT INTO administrator_menu_description VALUES(780, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(780, 'Produits sélectionnés', 2); INSERT INTO administrator_menu_description VALUES(781, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(781, 'Produits sélectionnés', 2); -INSERT INTO administrator_menu_description VALUES((782, 'Technical documents', 1); -INSERT INTO administrator_menu_description VALUES((782, 'Documents Techniques', 2); +INSERT INTO administrator_menu_description VALUES(782, 'Technical documents', 1); +INSERT INTO administrator_menu_description VALUES(782, 'Documents Techniques', 2); INSERT INTO banners VALUES(1, 'Logo', '', 'logos/others/logo_clicshopping.webp', 'Default_multi_template_logo', '_self', '', 0, NULL, NULL, '2018-07-30 18:11:20', NULL, 1, 0, 99, 'Logo'); diff --git a/install/clicshopping_en.sql b/install/clicshopping_en.sql index d324dc715..90a4458d1 100755 --- a/install/clicshopping_en.sql +++ b/install/clicshopping_en.sql @@ -518,8 +518,8 @@ INSERT INTO administrator_menu_description VALUES(780, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(780, 'Produits sélectionnés', 2); INSERT INTO administrator_menu_description VALUES(781, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(781, 'Produits sélectionnés', 2); -INSERT INTO administrator_menu_description VALUES((782, 'Technicals documents', 1); -INSERT INTO administrator_menu_description VALUES((782, 'Documents Techniques', 2); +INSERT INTO administrator_menu_description VALUES(782, ''Technical documents'', 1); +INSERT INTO administrator_menu_description VALUES(782, ''Documents Techniques'', 2); INSERT INTO banners VALUES(1, 'Logo', '', 'logos/others/logo_clicshopping.webp', 'Default_multi_template_logo', '_self', '', 0, NULL, NULL, '2018-07-30 18:11:20', NULL, 1, 0, 99, 'Logo'); diff --git a/install/demo_clicshopping_en.sql b/install/demo_clicshopping_en.sql index a2454ddd1..e981b5d1d 100755 --- a/install/demo_clicshopping_en.sql +++ b/install/demo_clicshopping_en.sql @@ -519,8 +519,8 @@ INSERT INTO administrator_menu_description VALUES(780, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(780, 'Produits sélectionnés', 2); INSERT INTO administrator_menu_description VALUES(781, 'Featured products', 1); INSERT INTO administrator_menu_description VALUES(781, 'Produits sélectionnés', 2); -INSERT INTO administrator_menu_description VALUES((782, 'Technicals documents', 1); -INSERT INTO administrator_menu_description VALUES((782, 'Documents Techniques', 2); +INSERT INTO administrator_menu_description VALUES(782, ''Technical documents'', 1); +INSERT INTO administrator_menu_description VALUES(782, ''Documents Techniques'', 2); INSERT INTO banners VALUES(1, 'Logo', '', 'logos/others/logo_clicshopping.webp', 'Default_multi_template_logo', '_self', '', NULL, NULL, NULL, '2018-07-26 11:47:52', NULL, 1, 0, 99, 'Logo'); diff --git a/sql_upgrade/update3_315.txt b/sql_upgrade/update3_315.txt index 5f64c186b..a42284190 100644 --- a/sql_upgrade/update3_315.txt +++ b/sql_upgrade/update3_315.txt @@ -7,9 +7,9 @@ Step 1 : Update your Db by the sql below #All language INSERT INTO administrator_menu VALUES(782, '', 163, 0, 0, '', 0, NULL, 1); -INSERT INTO administrator_menu VALUES(783, 'https://github.com/ClicShopping/ClicShopping_V3/wiki', 782, 0, 0, '', 0, NULL, 1); -INSERT INTO administrator_menu_description VALUES((782, 'Technicals documents', 1); -INSERT INTO administrator_menu_description VALUES((782, 'Documents Techniques', 2); +INSERT INTO administrator_menu VALUES(783, 'https://github.com/ClicShopping/ClicShopping_V3/wiki', 163, 0, 0, '', 0, NULL, 1); +INSERT INTO administrator_menu_description VALUES(782, 'Technicals documents', 1); +INSERT INTO administrator_menu_description VALUES(782, 'Documents Techniques', 2); #English From c43bf3fdea90018d8d974c378bb58eac1fc38c63 Mon Sep 17 00:00:00 2001 From: ClicShopping Date: Fri, 4 Mar 2022 09:53:02 +0100 Subject: [PATCH 8/9] update --- CHANGELOG.md | 2 +- ClicShoppingAdmin/login.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31214868c..0ec2efdc5 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ Automatic install detection for the first installation code refactoring add support menu with wiki link (technical doc) error template updated -librairies updated +librairies updated. ------------- diff --git a/ClicShoppingAdmin/login.php b/ClicShoppingAdmin/login.php index f44af661a..38da40bf4 100755 --- a/ClicShoppingAdmin/login.php +++ b/ClicShoppingAdmin/login.php @@ -41,6 +41,8 @@ switch ($action) { case 'process': $CLICSHOPPING_Hooks->call('PreAction', 'Process'); + $username = ''; + $password = ''; if (isset($_SESSION['redirect_origin'], $_SESSION['redirect_origin']['auth_user']) && !isset($_POST['username'])) { $username = HTML::sanitize($_SESSION['redirect_origin']['auth_user']); From d1621c1794dfdcfb2761d8d5bf0555fce97bdce5 Mon Sep 17 00:00:00 2001 From: ClicShopping Date: Mon, 7 Mar 2022 13:23:16 +0100 Subject: [PATCH 9/9] update changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ec2efdc5..3123811d7 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,6 @@ add support menu with wiki link (technical doc) error template updated librairies updated. - ------------- Version 3.315 Ckeditor version updated