diff --git a/.gitignore b/.gitignore index 327d17fc..7ecb7b45 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store .idea +desktop.ini /build/coverage /build/clover /build/logs diff --git a/.gitmodules b/.gitmodules index 3dd6bc29..4fdb98ca 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "catalog/controller/payment/mollie-api-client"] - path = catalog/controller/payment/mollie-api-client +[submodule "catalog/controller/extension/payment/mollie-api-client"] + path = catalog/controller/extension/payment/mollie-api-client url = https://github.com/mollie/mollie-api-php.git diff --git a/.travis.yml b/.travis.yml index 3db8cb31..ce8437b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,10 @@ language: php php: -- 5.4 -- 5.5 - 5.6 - 7.0 - 7.1 +- 7.2 sudo: false @@ -18,5 +17,17 @@ install: script: - composer validate --strict -- find admin catalog tests -name *.php | xargs -n 1 -P4 php -l +- find admin catalog -path catalog/controller/payment/mollie-api-client -prune -o -name '*.php' | xargs -n 1 -P4 php -l - vendor/bin/phpunit -c tests/phpunit.xml + +before_deploy: +- bash release.sh + +deploy: + provider: releases + api_key: + secure: "N9Gtz2Cyxo8LPsMOKMcuGViL7Tn+vu0C2AkUzo6+mvEqYx8Vl8VisKCapjNnCPBGz084YVQ6yIj2q3jDrRPqHwkhc5Hvd5tFVVsrxZhxo7z4EDujkA21i8uTVtXr4a/DL/JfE1dEzdu+LP0DniR0TIn+fAJcgmqAUCLkhqclNDQ=" + file: mollie-opencart-1.5-and-up.vqmod.zip + skip_cleanup: true + on: + tags: true \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 40e07e66..bc317469 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,118 @@ # Changelog # +#### Changes in release 9.0.6 + + Added Przelewy24 support. + + Added additional check on order_id in webhook. + + Update cleanup function to include cleanup for < 9.x modules. + + Remove Bitcoin. + + Fix double payment bug. + + Fix voucher support. + + Fix Amount invalid bug for all currencies. + + Fix non-integer qty support. + +#### Changes in release 9.0.5 + + Fixed notice error when shipping method is used that isn't linked to a tax class. + + Fixed update functionality. + +#### Changes in release 9.0.4 + + Added conditional checking for OC 1.5, so OCMod checks are not attempted on a version that doesn't support it. + +#### Changes in release 9.0.3 + + Fixed settings randomly disappearing from admin. + + Added support for VQMod/OCMod combinations. + + Rounding fix. + + Fixed missing translation button label. + + Fixed cleanup function. + + Send webhook URL on order creation. + + Check payment status on success page. + +#### Changes in release 9.0.2 + + Fixed a bug in the module update functionality. + +#### Changes in release 9.0.1 + + Correctly calculate taxes. + + Unselect payment method for store is possible again. + + Fixed "Undefined index: iso_code_2" in one page checkouts. + + Less warnings about adding an API key in the backend. + + "Amount is lower than minimum" bugfix. + + Fixed loading Belfius controller (thanks @KevinJDurant). + + Fixed switched translations for EPS and Giropay (thanks @pvdptje). + + Added support for 3rd party totals. + + Minor improvements to documentation. + + Removed possibility of sending html entities to Mollie API. + + Made API key a mandatory field. + + Added support for OC events in the versions that support it. + + Added "shipping after complete status" functionality. + +#### Changes in release 9.0.0 + + Added version support for OpenCart 1.5.x to 3.x in one module, no need to download a separate version anymore; + + Added Klarna payment methods; + + Added Mollie Order API and Shipment API; + + Added update functionality right from the module itself, linked to new Github releases; + + Added multi currency support; + + Improved payment method display based on Mollie settings; + + Bugfixes: fixed amount.value errors with totals over 1000 EU, errors when checking out with USD, setting price limits, entering API key. + +#### Changes in release 8.4.2 + + Fixed error in total price that gave a amount.value error on totals over 1000 eu. + +#### Changes in release 8.4.1 + + Fixed the error with rounded order totals in 2.2-and-lower version giving the following error: "Error executing API call (422: Unprocessable Entity): The amount contains an invalid value. Field: amount.value." + + Fixed language file switch of EPS and Giropay payment methods. + + Removed remaining Mistercash language files from the admin dir for the 2.3+ version. + +#### Changes in release 8.4.0 + + Added support for Mollie API v2. + + Added German (DE) and Spanish (ES) language support in the module. + + Added EPS and Giropay payment methods. + + Renamed MisterCash to Bancontact according to Mollie specifications. + +#### Changes in release 8.3.2 + + Bugfix in the array with available Locale + +#### Changes in release 8.3.1 + + Locale: use en_US if user Locale is not supported + +#### Changes in release 8.3.0 + + ING Home'Pay added as payment method + + Cleanup check for already installed modules that are updated + +#### Changes in release 8.2.3 + + Improved logging for future debugging + + Minor bug fixes. + +#### Changes in release 8.2.2 + + Fixed a bug where quick checkouts would not validate properly + + Added missing translation + +#### Changes in release 8.2.1 + + Fixed a bug where Bancontact would be displayed as Mister Cash + +#### Changes in release 8.2.0 + + New features are now available for OpenCart 1.5 and 2.x! + + Fix a bug where a payment method would not always be displayed correctly in the order email when using payment images. + + Minor issues solved. + +#### Changes in release 8.1.0 + + Added 6 new payment methods (Gift cards)! + + fashioncheque + + Nationale EntertainmentCard + + Podium Cadeaukaart + + VVV Giftcard + + YourGift + + Webshop Giftcard + +#### Changes in release 8.0.0 + + Convert module to work with OpenCart 3.x.x.x only (soon to be backported). + + Addition of geo-zone selection per payment method. + + Adjusted admin interface to declutter the view. + +#### Changes in release 7.2.0 + + Add helpful method: `getPaymentID()` + + Double check payment status in callback - uses new `getPaymentID()` method + + Update mollie_return_2.tpl - some themes are using HTML 'id' attributes on container divs + #### Changes in release 7.1.1 + Update bundled cacert.pem file. Follows Mozilla's recommendations on invalid certificates. @@ -134,7 +246,7 @@ #### Wijzigigen in versie 5.0 + De module gebruikt nu de nieuwe betalings-API van Mollie. Dit betekent dat de module naast [iDEAL](https://www.mollie.com/ideal/), nu - ook [creditcard](https://www.mollie.com/creditcard/), [Mister Cash](https://www.mollie.com/mistercash/) en [paysafecard](https://www.mollie.com/paysafecard/) + ook [creditcard](https://www.mollie.com/creditcard/), [Mister Cash](https://www.mollie.com/bancontact/) en [paysafecard](https://www.mollie.com/paysafecard/) ondersteunt. Mocht een betaling om wat voor reden dan ook niet lukken, dat kan uw klant het gelijk nog een keer proberen. U hoeft hiervoor niets extra's te implementeren. In de toekomst zullen ook nog nieuwe betaalmethodes toegevoegd worden. Deze zijn dan direct beschikbaar in uw webshop. + Het instellingenscherm in de admin toont nu gelijk of de module correct kan communiceren met de Mollie API. Hierdoor kunnen we u beter helpen wanneer diff --git a/admin/controller/extension/payment/mollie/base.php b/admin/controller/extension/payment/mollie/base.php deleted file mode 100644 index a0036a1f..00000000 --- a/admin/controller/extension/payment/mollie/base.php +++ /dev/null @@ -1,730 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @property Config $config - * @property DB $db - * @property Language $language - * @property Loader $load - * @property ModelSettingSetting $model_setting_setting - * @property ModelSettingStore $model_setting_store - * @property ModelLocalisationOrderStatus $model_localisation_order_status - * @property Request $request - * @property Response $response - * @property URL $url - * @property User $user - */ -require_once(dirname(DIR_SYSTEM) . "/catalog/controller/extension/payment/mollie/helper.php"); - -class ControllerExtensionPaymentMollieBase extends Controller -{ - // Current module name - should be overwritten by subclass using one of the MollieHelper::MODULE_NAME_* values. - const MODULE_NAME = NULL; - - // Initialize var(s) - protected $error = array(); - - // Holds multistore configs - protected $data = array(); - - /** - * @param int $store The Store ID - * @return Mollie_API_Client - */ - protected function getAPIClient ($store = 0) - { - return MollieHelper::getAPIClientAdmin($this->data['stores'][$store]); - } - - /** - * This method is executed by OpenCart when the Payment module is installed from the admin. It will create the - * required tables. - * - * @return void - */ - public function install () - { - $this->db->query( - sprintf( - "CREATE TABLE IF NOT EXISTS `%smollie_payments` ( - `order_id` int(11) unsigned NOT NULL, - `method` enum('idl') NOT NULL DEFAULT 'idl', - `transaction_id` varchar(32) NOT NULL, - `bank_account` varchar(15) NOT NULL, - `bank_status` varchar(20) NOT NULL, - PRIMARY KEY (`order_id`), - UNIQUE KEY `transaction_id` (`transaction_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8", - DB_PREFIX - )); - - // Just install all modules while we're at it. - $this->installAllModules(); - } - - /** - * Trigger installation of all Mollie modules. - */ - protected function installAllModules () - { - // Load models. - $extensions = $this->getExtensionModel(); - $this->load->model("user/user_group"); - - if ($this->isOpencart2()) - { - $user_id = $this->user->getGroupId(); - } - else - { - $user_id = $this->user->getId(); - } - - foreach (MollieHelper::$MODULE_NAMES as $module_name) - { - // Install extension. - $extensions->install("payment", "mollie_" . $module_name); - - // Set permissions. - $this->model_user_user_group->addPermission($user_id, "access", "extension/payment/mollie_" . $module_name); - $this->model_user_user_group->addPermission($user_id, "modify", "extension/payment/mollie_" . $module_name); - } - } - - /** - * The method is executed by OpenCart when the Payment module is uninstalled from the admin. It will not drop the Mollie - * table at this point - we want to allow the user to toggle payment modules without losing their settings. - * - * @return void - */ - public function uninstall () - { - $this->uninstallAllModules(); - } - - /** - * Trigger removal of all Mollie modules. - */ - protected function uninstallAllModules () - { - $extensions = $this->getExtensionModel(); - - foreach (MollieHelper::$MODULE_NAMES as $module_name) - { - $extensions->uninstall("payment", "mollie_" . $module_name); - } - } - - /** - * Get the extension installation handler. - * - * @return Model - */ - protected function getExtensionModel () - { - if ($this->isOpencart2()) - { - $this->load->model("extension/extension"); - - return $this->model_extension_extension; - } - - $this->load->model("setting/extension"); - - return $this->model_setting_extension; - } - - /** - * Render the payment method's settings page. - */ - public function index () - { - // Load essential models - $this->load->language("extension/payment/mollie"); - $this->load->model("setting/setting"); - $this->load->model("setting/store"); - $this->load->model("localisation/order_status"); - - $this->document->setTitle($this->language->get("heading_title")); - - $shops = $this->getMultiStores(); - $this->retrieveMultiStoreConfigs(); - - // Call validate method on POST - - $doRedirect = false; - foreach($shops as $store) - { - if (($this->request->server['REQUEST_METHOD'] == "POST") && ($this->validate($store['id']))) - { - - $post = $this->request->post['stores'][$store['id']]; - - foreach (MollieHelper::$MODULE_NAMES as $module_name) - { - $status = "mollie_" . $module_name . "_status"; - - $post[$status] = (isset($post[$status]) && $post[$status] == "on") ? 1 : 0; - } - - $this->model_setting_setting->editSetting("mollie", $post, $store['id']); - - // Migrate old settings if needed. We used to use "ideal" as setting group, but Opencart 2 requires us to use "mollie". - $this->model_setting_setting->deleteSetting("ideal", $store['id']); - - $doRedirect = true; - } - } - - if ($doRedirect) - { - $this->session->data['success'] = $this->language->get("text_success"); - $this->redirect($this->url->link("extension/extension", "type=payment&token=" . $this->session->data['token'], "SSL")); - } - - // Set data for template - $data['heading_title'] = $this->language->get("heading_title"); - $data['title_global_options'] = $this->language->get("title_global_options"); - $data['title_payment_status'] = $this->language->get("title_payment_status"); - $data['title_mod_about'] = $this->language->get("title_mod_about"); - $data['footer_text'] = $this->language->get("footer_text"); - - $data['text_enabled'] = $this->language->get("text_enabled"); - $data['text_disabled'] = $this->language->get("text_disabled"); - $data['text_yes'] = $this->language->get("text_yes"); - $data['text_no'] = $this->language->get("text_no"); - $data['text_none'] = $this->language->get("text_none"); - $data['text_edit'] = $this->language->get("text_edit"); - $data['text_missing_api_key'] = $this->language->get("text_missing_api_key"); - $data['text_activate_payment_method'] = $this->language->get("text_activate_payment_method"); - $data['text_no_status_id'] = $this->language->get("text_no_status_id"); - - $data['entry_api_key'] = $this->language->get("entry_api_key"); - $data['entry_description'] = $this->language->get("entry_description"); - $data['entry_show_icons'] = $this->language->get("entry_show_icons"); - $data['entry_show_order_canceled_page'] = $this->language->get("entry_show_order_canceled_page"); - $data['entry_status'] = $this->language->get("entry_status"); - $data['entry_mod_status'] = $this->language->get("entry_mod_status"); - $data['entry_comm_status'] = $this->language->get("entry_comm_status"); - - $data['help_view_profile'] = $this->language->get("help_view_profile"); - $data['help_api_key'] = $this->language->get("help_api_key"); - $data['help_description'] = $this->language->get("help_description"); - $data['help_show_icons'] = $this->language->get("help_show_icons"); - $data['help_show_order_canceled_page'] = $this->language->get("help_show_order_canceled_page"); - $data['help_status'] = $this->language->get("help_status"); - - $data['order_statuses'] = $this->model_localisation_order_status->getOrderStatuses(); - $data['entry_failed_status'] = $this->language->get("entry_failed_status"); - $data['entry_canceled_status'] = $this->language->get("entry_canceled_status"); - $data['entry_pending_status'] = $this->language->get("entry_pending_status"); - $data['entry_expired_status'] = $this->language->get("entry_expired_status"); - $data['entry_processing_status']= $this->language->get("entry_processing_status"); - $data['entry_processed_status'] = $this->language->get("entry_processed_status"); - - $data['entry_payment_method'] = $this->language->get("entry_payment_method"); - $data['entry_activate'] = $this->language->get("entry_activate"); - $data['entry_sort_order'] = $this->language->get("entry_sort_order"); - $data['entry_support'] = $this->language->get("entry_support"); - $data['entry_mstatus'] = $this->checkModuleStatus(); - $data['entry_module'] = $this->language->get("entry_module"); - $data['entry_version'] = $this->language->get("entry_version") . " " . MollieHelper::PLUGIN_VERSION; - - $data['button_save'] = $this->language->get("button_save"); - $data['button_cancel'] = $this->language->get("button_cancel"); - - $data['tab_general'] = $this->language->get("tab_general"); - - $data['shops'] = $shops; - - // If there are errors, show the error. - if (isset($this->error['warning'])) { - $data['error_warning'] = $this->error['warning']; - } else { - $data['error_warning'] = ''; - } - - foreach($shops as $store) - { - - $data['stores'][$store['id']]['entry_cstatus'] = $this->checkCommunicationStatus($store['id']); - - if (isset($this->error[$store['id']]['api_key'])) { - $data['stores'][$store['id']]['error_api_key'] = $this->error[$store['id']]['api_key']; - } else { - $data['stores'][$store['id']]['error_api_key'] = ''; - } - - if (isset($this->error[$store['id']]['description'])) { - $data['stores'][$store['id']]['error_description'] = $this->error[$store['id']]['description']; - } else { - $data['stores'][$store['id']]['error_description'] = ''; - } - - if (isset($this->error[$store['id']]['show_icons'])) { - $data['stores'][$store['id']]['error_show_icons'] = $this->error[$store['id']]['show_icons']; - } else { - $data['stores'][$store['id']]['error_show_icons'] = ''; - } - - if (isset($this->error[$store['id']]['show_order_canceled_page'])) { - $data['stores'][$store['id']]['show_order_canceled_page'] = $this->error[$store['id']]['show_order_canceled_page']; - } else { - $data['stores'][$store['id']]['show_order_canceled_page'] = ''; - } - - if (isset($this->error[$store['id']]['total'])) { - $data['stores'][$store['id']]['error_total'] = $this->error[$store['id']]['total']; - } else { - $data['stores'][$store['id']]['error_total'] = ''; - } - } - - $data['error_file_missing'] = $this->language->get("error_file_missing"); - - // Breadcrumbs - $data['breadcrumbs'] = array(); - - $data['breadcrumbs'][] = array( - "href" => $this->url->link("common/home", "token=" . $this->session->data['token'], "SSL"), - "text" => $this->language->get("text_home"), - "separator" => FALSE, - ); - - $data['breadcrumbs'][] = array( - "href" => $this->url->link("extension/extension", "type=payment&token=" . $this->session->data['token'], "SSL"), - "text" => $this->language->get("text_payment"), - "separator" => ' :: ', - ); - - $data['breadcrumbs'][] = array( - "href" => $this->url->link("extension/payment/mollie_" . static::MODULE_NAME, "token=" . $this->session->data['token'], "SSL"), - "text" => $this->language->get("heading_title"), - "separator" => " :: ", - ); - - // Form action url - $data['action'] = $this->url->link("extension/payment/mollie_" . static::MODULE_NAME, "token=" . $this->session->data['token'], "SSL"); - $data['cancel'] = $this->url->link("extension/extension", "type=payment&token=" . $this->session->data['token'], "SSL"); - - // Load global settings. Some are prefixed with mollie_ideal_ for legacy reasons. - $settings = array( - "mollie_api_key" => NULL, - "mollie_ideal_description" => "Order %", - "mollie_show_icons" => FALSE, - "mollie_show_order_canceled_page" => TRUE, - "mollie_ideal_pending_status_id" => 1, - "mollie_ideal_processing_status_id" => 2, - "mollie_ideal_canceled_status_id" => 7, - "mollie_ideal_failed_status_id" => 10, - "mollie_ideal_expired_status_id" => 14, - ); - - foreach($shops as $store) - { - foreach ($settings as $setting_name => $default_value) - { - // Attempt to read from post - if (isset($this->request->post['stores'][$store['id']][$setting_name])) - { - $data['stores'][$store['id']][$setting_name] = $this->request->post['stores'][$store['id']][$setting_name]; - } - - // Otherwise, attempt to get the setting from the database - else - { - // same as $this->config->get() - $stored_setting = isset($this->data['stores'][$store['id']][$setting_name]) ? $this->data['stores'][$store['id']][$setting_name] : null; - - if($stored_setting === NULL && $default_value !== NULL) - { - $data['stores'][$store['id']][$setting_name] = $default_value; - } - else - { - $data['stores'][$store['id']][$setting_name] = $stored_setting; - } - } - } - - // Check which payment methods we can use with the current API key. - $allowed_methods = array(); - - try - { - $api_methods = $this->getAPIClient($store['id'])->methods->all(); - - foreach ($api_methods as $api_method) - { - $allowed_methods[] = $api_method->id; - } - } - catch (Mollie_API_Exception $e) - { - // If we have an unauthorized request, our API key is likely invalid. - if ($data['stores'][$store['id']]['mollie_api_key'] !== NULL && strpos($e->getMessage(), "Unauthorized request") >= 0) - { - $data['stores'][$store['id']]['error_api_key'] = $this->language->get("error_api_key_invalid"); - } - } - - $data['stores'][$store['id']]['payment_methods'] = array(); - - - foreach (MollieHelper::$MODULE_NAMES as $module_name) - { - $payment_method = array(); - - $payment_method['name'] = $this->language->get("name_mollie_" . $module_name); - $payment_method['icon'] = "https://www.mollie.com/images/payscreen/methods/" . $module_name . ".png"; - $payment_method['allowed'] = in_array($module_name, $allowed_methods); - - // Load module specific settings. - if (isset($this->request->post['stores'][$store['id']]['mollie_' . $module_name . '_status'])) - { - $payment_method['status'] = ($this->request->post['stores'][$store['id']]['mollie_' . $module_name . '_status'] == "on"); - } - else - { - $payment_method['status'] = (bool) isset($this->data['stores'][$store['id']]["mollie_" . $module_name . "_status"]) ? $this->data['stores'][$store['id']]["mollie_" . $module_name . "_status"] : null; - } - - if (isset($this->request->post['stores'][$store['id']]['mollie_' . $module_name . '_sort_order'])) - { - $payment_method['sort_order'] = $this->request->post['stores'][$store['id']]['mollie_' . $module_name . '_sort_order']; - } - else - { - $payment_method['sort_order'] = isset($this->data['stores'][$store['id']]["mollie_" . $module_name . "_sort_order"]) ? $this->data['stores'][$store['id']]["mollie_" . $module_name . "_sort_order"] : null; - } - - $data['stores'][$store['id']]['payment_methods'][$module_name] = $payment_method; - } - - } - - - // Set different template for Opencart 2 as it uses Bootstrap and a left column - if ($this->isOpencart2()) - { - $this->renderTemplate("extension/payment/mollie_2.tpl", $data, array( - "header", - "column_left", - "footer", - )); - } - else - { - $this->renderTemplate("extension/payment/mollie.tpl", $data, array( - "header", - "footer", - )); - } - } - - /** - * Check the post and check if the user has permission to edit the module settings - * @param int $store The store id - * @return bool - */ - private function validate ($store = 0) - { - if (!$this->user->hasPermission("modify", "extension/payment/mollie_" . static::MODULE_NAME)) - { - $this->error['warning'] = $this->language->get("error_permission"); - } - - if (!$this->request->post['stores'][$store]['mollie_api_key']) - { - $this->error[$store]['api_key'] = $this->language->get("error_api_key"); - } - - if (!$this->request->post['stores'][$store]['mollie_ideal_description']) - { - $this->error[$store]['description'] = $this->language->get("error_description"); - } - - return (count($this->error) == 0); - } - - protected function checkModuleStatus () - { - $need_files = array(); - - if ($this->isOpencart22()) - { - $mod_files = array( - DIR_APPLICATION . "controller/extension/payment/mollie/base.php", - DIR_APPLICATION . "language/en-gb/extension/payment/mollie.php", - DIR_TEMPLATE . "extension/payment/mollie.tpl", - DIR_TEMPLATE . "extension/payment/mollie_2.tpl", - DIR_CATALOG . "controller/extension/payment/mollie-api-client/", - DIR_CATALOG . "controller/extension/payment/mollie/base.php", - DIR_CATALOG . "language/en-gb/extension/payment/mollie.php", - DIR_CATALOG . "model/extension/payment/mollie/base.php", - DIR_CATALOG . "view/theme/default/template/extension/payment/mollie_checkout_form.tpl", - DIR_CATALOG . "view/theme/default/template/extension/payment/mollie_return.tpl", - DIR_CATALOG . "view/theme/default/template/extension/payment/mollie_return_2.tpl", - ); - } - else - { - $mod_files = array( - DIR_APPLICATION . "controller/extension/payment/mollie/base.php", - DIR_APPLICATION . "language/english/extension/payment/mollie.php", - DIR_TEMPLATE . "extension/payment/mollie.tpl", - DIR_TEMPLATE . "extension/payment/mollie_2.tpl", - DIR_CATALOG . "controller/extension/payment/mollie-api-client/", - DIR_CATALOG . "controller/extension/payment/mollie/base.php", - DIR_CATALOG . "language/english/extension/payment/mollie.php", - DIR_CATALOG . "model/extension/payment/mollie/base.php", - DIR_CATALOG . "view/theme/default/template/extension/payment/mollie_checkout_form.tpl", - DIR_CATALOG . "view/theme/default/template/extension/payment/mollie_return.tpl", - DIR_CATALOG . "view/theme/default/template/extension/payment/mollie_return_2.tpl", - ); - } - - - foreach (MollieHelper::$MODULE_NAMES as $module_name) - { - if ($this->isOpencart22()) - { - $mod_files[] = DIR_APPLICATION . "controller/extension/payment/mollie_" . $module_name . ".php"; - $mod_files[] = DIR_APPLICATION . "language/en-gb/extension/payment/mollie_" . $module_name . ".php"; - $mod_files[] = DIR_CATALOG . "controller/extension/payment/mollie_" . $module_name . ".php"; - $mod_files[] = DIR_CATALOG . "model/extension/payment/mollie_" . $module_name . ".php"; - } - else - { - $mod_files[] = DIR_APPLICATION . "controller/extension/payment/mollie_" . $module_name . ".php"; - $mod_files[] = DIR_APPLICATION . "language/english/extension/payment/mollie_" . $module_name . ".php"; - $mod_files[] = DIR_CATALOG . "controller/extension/payment/mollie_" . $module_name . ".php"; - $mod_files[] = DIR_CATALOG . "model/extension/payment/mollie_" . $module_name . ".php"; - } - } - - foreach ($mod_files as $file) - { - $realpath = realpath($file); - - if (!file_exists($realpath)) - { - $need_files[] = '' . $file . ''; - } - } - - if (!MollieHelper::apiClientFound()) - { - $need_files[] = '' - . 'API client not found. Please make sure you have installed the module correctly. Use the download ' - . 'button on the release page' - . ''; - } - - if (count($need_files) > 0) - { - return $need_files; - } - - return 'OK'; - } - - /** - * @param int $store The Store id - * @return string - */ - protected function checkCommunicationStatus ($store = 0) - { - /* - * Check API key - */ - $api_key = isset($this->data['stores'][$store]['mollie_api_key']) ? $this->data['stores'][$store]['mollie_api_key'] : null; - - if (empty($api_key)) - { - return 'No API key provided. Please insert your API key.'; - } - - $client = NULL; - - /* - * Test compatibility + communication - */ - try - { - $client = $this->getAPIClient($store); - - if (!$client) - { - return 'API client not found.'; - } - - $client->methods->all(); - - return 'OK'; - } - catch (Mollie_API_Exception_IncompatiblePlatform $e) - { - return '' . $e->getMessage() . ' You can ask your hosting provider to help with this.'; - } - catch (Mollie_API_Exception $e) - { - return '' - . 'Communicating with Mollie failed:
' - . htmlspecialchars($e->getMessage()) - . '


' - - . 'Please check the following conditions. You can ask your hosting provider to help with this.' - . '
' - - . 'Contact info@mollie.nl if this still does not fix your problem.'; - } - } - - /** - * Map template handling for different Opencart versions - * - * @param string $template - * @param array $data - * @param array $common_children - * @param bool $echo - */ - protected function renderTemplate ($template, $data, $common_children = array(), $echo = TRUE) - { - if ($this->isOpencart2()) - { - foreach ($common_children as $child) - { - $data[$child] = $this->load->controller("common/" . $child); - } - - $html = $this->load->view($template, $data); - } - else - { - foreach ($data as $field => $value) - { - $this->data[$field] = $value; - } - - $this->template = $template; - - $this->children = array(); - - foreach ($common_children as $child) - { - $this->children[] = "common/" . $child; - } - - $html = $this->render(); - } - - if ($echo) - { - return $this->response->setOutput($html); - } - - return $html; - } - - /** - * @param string $url - * @param int $status - */ - protected function redirect ($url, $status = 302) - { - if ($this->isOpencart2()) - { - $this->response->redirect($url, $status); - } - else - { - parent::redirect($url, $status); - } - } - - /** - * @return bool - */ - protected function isOpencart2 () - { - return version_compare(VERSION, 2, ">="); - } - - protected function isOpencart22 () - { - return version_compare(VERSION, 2.2, ">="); - } - - /** - * Retrieve additional store id's from store table. - * Will not include default store. Only the additional stores. So we inject the default store here. - * @return array - */ - protected function getMultiStores() - { - $sql = $this->db->query(sprintf("SELECT store_id as id, name FROM %sstore", DB_PREFIX)); - $rows = $sql->rows; - $default = array( - array( - 'id' => 0, - 'name' => $this->config->get('config_name') - ) - ); - $allStores = array_merge($default, $rows); - - return $allStores; - } - - /** - * Retrieve mollie options according to multistore (default is store 0) - */ - protected function retrieveMultiStoreConfigs() - { - $shops = $this->getMultiStores(); - foreach($shops as $store) - { - $sql = $this->db->query(sprintf("SELECT * FROM %ssetting WHERE store_id = %s", DB_PREFIX, $store['id'])); - $rows = $sql->rows; - $newArrray = array(); - foreach($rows as $setting) - { - $newArrray[$setting['key']] = $setting['value']; - } - $this->data['stores'][$store['id']] = $newArrray; - } - - } -} diff --git a/admin/controller/extension/payment/mollie_bancontact.php b/admin/controller/extension/payment/mollie_bancontact.php new file mode 100644 index 00000000..af80e932 --- /dev/null +++ b/admin/controller/extension/payment/mollie_bancontact.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/admin/controller/extension/payment/mollie_banktransfer.php b/admin/controller/extension/payment/mollie_banktransfer.php index b7431e89..32629efa 100644 --- a/admin/controller/extension/payment/mollie_banktransfer.php +++ b/admin/controller/extension/payment/mollie_banktransfer.php @@ -1,7 +1,5 @@ diff --git a/admin/controller/extension/payment/mollie_belfius.php b/admin/controller/extension/payment/mollie_belfius.php index 4baf4f0b..7a7dd60a 100644 --- a/admin/controller/extension/payment/mollie_belfius.php +++ b/admin/controller/extension/payment/mollie_belfius.php @@ -1,7 +1,5 @@ diff --git a/admin/controller/extension/payment/mollie_bitcoin.php b/admin/controller/extension/payment/mollie_bitcoin.php index b9ee39f3..037f3f3a 100644 --- a/admin/controller/extension/payment/mollie_bitcoin.php +++ b/admin/controller/extension/payment/mollie_bitcoin.php @@ -1,7 +1,5 @@ diff --git a/admin/controller/extension/payment/mollie_creditcard.php b/admin/controller/extension/payment/mollie_creditcard.php index 73764f5c..fe4ae30f 100644 --- a/admin/controller/extension/payment/mollie_creditcard.php +++ b/admin/controller/extension/payment/mollie_creditcard.php @@ -1,7 +1,5 @@ diff --git a/admin/controller/extension/payment/mollie_directdebit.php b/admin/controller/extension/payment/mollie_directdebit.php index 60188e91..dee1f9f3 100644 --- a/admin/controller/extension/payment/mollie_directdebit.php +++ b/admin/controller/extension/payment/mollie_directdebit.php @@ -1,7 +1,5 @@ diff --git a/admin/controller/extension/payment/mollie_eps.php b/admin/controller/extension/payment/mollie_eps.php new file mode 100644 index 00000000..074f0ed6 --- /dev/null +++ b/admin/controller/extension/payment/mollie_eps.php @@ -0,0 +1,5 @@ + diff --git a/admin/controller/extension/payment/mollie_giftcard.php b/admin/controller/extension/payment/mollie_giftcard.php new file mode 100644 index 00000000..aebde959 --- /dev/null +++ b/admin/controller/extension/payment/mollie_giftcard.php @@ -0,0 +1,5 @@ + diff --git a/admin/controller/extension/payment/mollie_giropay.php b/admin/controller/extension/payment/mollie_giropay.php new file mode 100644 index 00000000..23511d24 --- /dev/null +++ b/admin/controller/extension/payment/mollie_giropay.php @@ -0,0 +1,5 @@ + diff --git a/admin/controller/extension/payment/mollie_ideal.php b/admin/controller/extension/payment/mollie_ideal.php index 15400ba7..38b6909e 100644 --- a/admin/controller/extension/payment/mollie_ideal.php +++ b/admin/controller/extension/payment/mollie_ideal.php @@ -1,7 +1,5 @@ diff --git a/admin/controller/extension/payment/mollie_inghomepay.php b/admin/controller/extension/payment/mollie_inghomepay.php new file mode 100644 index 00000000..094b6ef6 --- /dev/null +++ b/admin/controller/extension/payment/mollie_inghomepay.php @@ -0,0 +1,5 @@ + diff --git a/admin/controller/extension/payment/mollie_kbc.php b/admin/controller/extension/payment/mollie_kbc.php index ce2fc570..83cf4497 100644 --- a/admin/controller/extension/payment/mollie_kbc.php +++ b/admin/controller/extension/payment/mollie_kbc.php @@ -1,7 +1,5 @@ diff --git a/admin/controller/extension/payment/mollie_klarnapaylater.php b/admin/controller/extension/payment/mollie_klarnapaylater.php new file mode 100644 index 00000000..fd1d1f34 --- /dev/null +++ b/admin/controller/extension/payment/mollie_klarnapaylater.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/admin/controller/extension/payment/mollie_klarnasliceit.php b/admin/controller/extension/payment/mollie_klarnasliceit.php new file mode 100644 index 00000000..26bd2ae4 --- /dev/null +++ b/admin/controller/extension/payment/mollie_klarnasliceit.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/admin/controller/extension/payment/mollie_mistercash.php b/admin/controller/extension/payment/mollie_mistercash.php deleted file mode 100644 index 6d42ced4..00000000 --- a/admin/controller/extension/payment/mollie_mistercash.php +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/admin/controller/extension/payment/mollie_paysafecard.php b/admin/controller/extension/payment/mollie_paysafecard.php index 90f2b6a6..8036d4ef 100644 --- a/admin/controller/extension/payment/mollie_paysafecard.php +++ b/admin/controller/extension/payment/mollie_paysafecard.php @@ -1,7 +1,5 @@ diff --git a/admin/controller/extension/payment/mollie_przelewy24.php b/admin/controller/extension/payment/mollie_przelewy24.php new file mode 100644 index 00000000..eb3186ea --- /dev/null +++ b/admin/controller/extension/payment/mollie_przelewy24.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/admin/controller/extension/payment/mollie_sofort.php b/admin/controller/extension/payment/mollie_sofort.php index 31fe2713..e673ebb0 100644 --- a/admin/controller/extension/payment/mollie_sofort.php +++ b/admin/controller/extension/payment/mollie_sofort.php @@ -1,7 +1,5 @@ diff --git a/admin/controller/payment/mollie/base.php b/admin/controller/payment/mollie/base.php new file mode 100644 index 00000000..0daf3dc4 --- /dev/null +++ b/admin/controller/payment/mollie/base.php @@ -0,0 +1,837 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + * + * @property Config $config + * @property DB $db + * @property Language $language + * @property Loader $load + * @property ModelSettingSetting $model_setting_setting + * @property ModelSettingStore $model_setting_store + * @property ModelLocalisationOrderStatus $model_localisation_order_status + * @property Request $request + * @property Response $response + * @property URL $url + * @property User $user + */ + +//Check if VQMod is installed +if(!class_exists('VQMod')) { + die('
This extension requires VQMod. Please download and install it on your shop. You can find the latest release here!
'); +} + +use Mollie\Api\Exceptions\ApiException; +use Mollie\Api\Exceptions\IncompatiblePlatform; +use Mollie\Api\MollieApiClient; + +require_once(dirname(DIR_SYSTEM) . "/catalog/controller/payment/mollie/helper.php"); + +define("MOLLIE_VERSION", MollieHelper::PLUGIN_VERSION); +define("MOLLIE_RELEASE", "v" . MOLLIE_VERSION); +define("MOLLIE_VERSION_URL", "https://api.github.com/repos/mollie/OpenCart/releases/latest"); +// Defining arrays in a constant cannot be done with "define" until PHP 7, so using this syntax for backwards compatibility. +const DEPRECATED_METHODS = array('mistercash', 'bitcoin'); + +if (!defined("MOLLIE_TMP")) { + define("MOLLIE_TMP", sys_get_temp_dir()); +} + +use comercia\Util; + +class ControllerPaymentMollieBase extends Controller +{ + // Current module name - should be overwritten by subclass using one of the MollieHelper::MODULE_NAME_* values. + const MODULE_NAME = NULL; + + // Initialize var(s) + protected $error = array(); + + // Holds multistore configs + protected $data = array(); + + /** + * @param int $store The Store ID + * @return MollieApiClient + */ + protected function getAPIClient ($store = 0) + { + return MollieHelper::getAPIClientAdmin($this->data); + } + + /** + * This method is executed by OpenCart when the Payment module is installed from the admin. It will create the + * required tables. + * + * @return void + */ + public function install () + { + $this->db->query( + sprintf( + "CREATE TABLE IF NOT EXISTS `%smollie_payments` ( + `order_id` int(11) unsigned NOT NULL, + `method` enum('idl') NOT NULL DEFAULT 'idl', + `mollie_order_id` varchar(32) NOT NULL, + `transaction_id` varchar(32) NOT NULL, + `bank_account` varchar(15) NOT NULL, + `bank_status` varchar(20) NOT NULL, + PRIMARY KEY (`order_id`), + UNIQUE KEY `mollie_order_id` (`mollie_order_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8", + DB_PREFIX + )); + + $this->db->query("ALTER TABLE `" . DB_PREFIX . "order` MODIFY `payment_method` VARCHAR(255) NOT NULL;"); + + // Just install all modules while we're at it. + $this->installAllModules(); + $this->cleanUp(); + + //Add event to create shipment + if (Util::version()->isMinimal(2.2)) { // Events were added in OC2.2 + $modelEvent = Util::load()->model('extension/event'); + if (MollieHelper::isOpenCart3x()) { + $modelEvent->deleteEventByCode('mollie_create_shipment'); + } else { + $modelEvent->deleteEvent('mollie_create_shipment'); + } + + $modelEvent->addEvent('mollie_create_shipment', 'catalog/model/checkout/order/addOrderHistory/after', 'payment/mollie/base/createShipment'); + } + } + + //Check for patch + public function patch() + { + Util::patch()->runPatchesFromFolder('mollie', __FILE__); + } + + /** + * Clean up files that are not needed for the running version of OC. + */ + public function cleanUp() + { + $adminThemeDir = DIR_APPLICATION . 'view/template/'; + $catalogThemeDir = DIR_CATALOG . 'view/theme/default/template/'; + + // Add new column if it doesn't exist yet + $this->patch(); + + // Remove old template from previous version. + if (file_exists($adminThemeDir . 'extension/payment/mollie_2.tpl')) { + unlink($adminThemeDir . 'extension/payment/mollie_2.tpl'); + unlink($adminThemeDir . 'payment/mollie_2.tpl'); + } + + //Remove deprecated method files from old version + $adminControllerDir = DIR_APPLICATION . 'controller/'; + $adminLanguageDir = DIR_APPLICATION . 'language/'; + $catalogControllerDir = DIR_CATALOG . 'controller/'; + $catalogModelDir = DIR_CATALOG . 'model/'; + + foreach (DEPRECATED_METHODS as $method) { + if (file_exists($adminControllerDir . 'extension/payment/mollie_' . $method . '.php')) { + unlink($adminControllerDir . 'extension/payment/mollie_' . $method . '.php'); + } + + $languageFiles = glob($adminLanguageDir . '*/extension/payment/mollie_' . $method . '.php'); + foreach ($languageFiles as $file) { + if (file_exists($file)) { + unlink($file); + } + } + + if (file_exists($catalogControllerDir . 'extension/payment/mollie_' . $method . '.php')) { + unlink($catalogControllerDir . 'extension/payment/mollie_' . $method . '.php'); + } + + if (file_exists($catalogModelDir . 'extension/payment/mollie_' . $method . '.php')) { + unlink($catalogModelDir . 'extension/payment/mollie_' . $method . '.php'); + } + + if (file_exists($adminControllerDir . 'payment/mollie_' . $method . '.php')) { + unlink($adminControllerDir . 'payment/mollie_' . $method . '.php'); + } + + $languageFiles = glob($adminLanguageDir . '*/payment/mollie_' . $method . '.php'); + foreach ($languageFiles as $file) { + if (file_exists($file)) { + unlink($file); + } + } + + if (file_exists($catalogControllerDir . 'payment/mollie_' . $method . '.php')) { + unlink($catalogControllerDir . 'payment/mollie_' . $method . '.php'); + } + + if (file_exists($catalogModelDir . 'payment/mollie_' . $method . '.php')) { + unlink($catalogModelDir . 'payment/mollie_' . $method . '.php'); + } + } + + if (MollieHelper::isOpenCart3x()) { + if(file_exists($adminThemeDir . 'extension/payment/mollie(max_1.5.6.4).tpl')) { + unlink($adminThemeDir . 'extension/payment/mollie(max_1.5.6.4).tpl'); + unlink($adminThemeDir . 'payment/mollie(max_1.5.6.4).tpl'); + unlink($catalogThemeDir . 'extension/payment/mollie_return.tpl'); + unlink($catalogThemeDir . 'payment/mollie_return.tpl'); + unlink($catalogThemeDir . 'extension/payment/mollie_checkout_form.tpl'); + unlink($catalogThemeDir . 'payment/mollie_checkout_form.tpl'); + } + //Remove twig file from old version + if(file_exists($adminThemeDir . 'extension/payment/mollie.twig')) { + unlink($adminThemeDir . 'extension/payment/mollie.twig'); + } + if(file_exists($adminThemeDir . 'payment/mollie.twig')) { + unlink($adminThemeDir . 'payment/mollie.twig'); + } + } elseif (MollieHelper::isOpenCart2x()) { + if(file_exists($adminThemeDir . 'extension/payment/mollie(max_1.5.6.4).tpl')) { + unlink($adminThemeDir . 'extension/payment/mollie(max_1.5.6.4).tpl'); + unlink($adminThemeDir . 'payment/mollie(max_1.5.6.4).tpl'); + unlink($catalogThemeDir . 'extension/payment/mollie_return.twig'); + unlink($catalogThemeDir . 'payment/mollie_return.twig'); + unlink($catalogThemeDir . 'extension/payment/mollie_checkout_form.twig'); + unlink($catalogThemeDir . 'payment/mollie_checkout_form.twig'); + } + } else { + if(file_exists($adminThemeDir . 'extension/payment/mollie.tpl')) { + unlink($adminThemeDir . 'extension/payment/mollie.tpl'); + unlink($adminThemeDir . 'payment/mollie.tpl'); + unlink($catalogThemeDir . 'extension/payment/mollie_return.twig'); + unlink($catalogThemeDir . 'payment/mollie_return.twig'); + unlink($catalogThemeDir . 'extension/payment/mollie_checkout_form.twig'); + unlink($catalogThemeDir . 'payment/mollie_checkout_form.twig'); + } + } + + // Remove base.php file from version 8.x + if (file_exists($adminControllerDir . 'extension/payment/mollie')) { + $this->delTree($adminControllerDir . 'extension/payment/mollie'); + } + + if (file_exists($catalogControllerDir . 'extension/payment/mollie')) { + $this->delTree($catalogControllerDir . 'extension/payment/mollie'); + } + + if (file_exists($catalogControllerDir . 'extension/payment/mollie-api-client')) { + $this->delTree($catalogControllerDir . 'extension/payment/mollie-api-client'); + } + + } + + public function delTree($dir) { + $files = array_diff(scandir($dir), array('.','..')); + foreach ($files as $file) { + (is_dir("$dir/$file")) ? $this->delTree("$dir/$file") : unlink("$dir/$file"); + } + return rmdir($dir); + } + + /** + * Trigger installation of all Mollie modules. + */ + protected function installAllModules () + { + // Load models. + $extensions = Util::load()->model('extension/extension'); + $user_id = $this->getUserId(); + + foreach (MollieHelper::$MODULE_NAMES as $module_name) + { + // Install extension. + $extensions->install("payment", "mollie_" . $module_name); + + // Set permissions. + $this->model_user_user_group->addPermission($user_id, "access", "payment/mollie_" . $module_name); + $this->model_user_user_group->addPermission($user_id, "access", "extension/payment/mollie_" . $module_name); + $this->model_user_user_group->addPermission($user_id, "modify", "payment/mollie_" . $module_name); + $this->model_user_user_group->addPermission($user_id, "modify", "extension/payment/mollie_" . $module_name); + } + } + + /** + * The method is executed by OpenCart when the Payment module is uninstalled from the admin. It will not drop the Mollie + * table at this point - we want to allow the user to toggle payment modules without losing their settings. + * + * @return void + */ + public function uninstall () + { + $this->uninstallAllModules(); + } + + /** + * Trigger removal of all Mollie modules. + */ + protected function uninstallAllModules () + { + $extensions = Util::load()->model('extension/extension'); + + foreach (MollieHelper::$MODULE_NAMES as $module_name) + { + $extensions->uninstall("payment", "mollie_" . $module_name); + } + } + + //Delete deprecated method data from setting + public function clearData() { + foreach (DEPRECATED_METHODS as $method) { + $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "setting WHERE `key` LIKE '%$method%'"); + if ($query->num_rows > 0) { + $this->db->query("DELETE FROM " . DB_PREFIX . "setting WHERE `key` LIKE '%$method%'"); + } + } + } + + /** + * Render the payment method's settings page. + */ + public function index () + { + // Double-check if clean-up has been done - For upgrades + if (empty($this->config->get('mollie_payment_version')) || $this->config->get('mollie_payment_version') < MOLLIE_VERSION) { + $this->cleanUp(); + Util::config(0)->set('mollie_payment', 'mollie_payment_version', MOLLIE_VERSION); + } + + $adminThemeDir = DIR_APPLICATION . 'view/template/'; + if (MollieHelper::isOpenCart3x() || MollieHelper::isOpenCart2x()) { + if(file_exists($adminThemeDir . 'extension/payment/mollie(max_1.5.6.4).tpl') || file_exists($adminThemeDir . 'extension/payment/mollie.twig') || file_exists($adminThemeDir . 'payment/mollie.twig')) { + $this->cleanUp(); + } + } else { + if(file_exists($adminThemeDir . 'extension/payment/mollie.tpl')) { + $this->cleanUp(); + } + } + + $adminControllerDir = DIR_APPLICATION . 'controller/'; + foreach (DEPRECATED_METHODS as $method) { + if (file_exists($adminControllerDir . 'extension/payment/mollie_' . $method . '.php') || file_exists($adminControllerDir . 'payment/mollie_' . $method . '.php')) { + $this->cleanUp(); + } + } + + $catalogControllerDir = DIR_CATALOG . 'controller/'; + + // Remove un-used files from version 8.x + if (file_exists($adminControllerDir . 'extension/payment/mollie') || file_exists($catalogControllerDir . 'extension/payment/mollie') || file_exists($catalogControllerDir . 'extension/payment/mollie-api-client')) { + $this->cleanUp(); + } + + //Also delete data related to deprecated modules from settings + $this->clearData(); + + //Load language data + $data = array("version" => MOLLIE_RELEASE); + Util::load()->language("payment/mollie", $data); + $this->data = $data; + $form = Util::form($data); + + // Load essential models + $modelSetting = Util::load()->model("setting/setting"); + $modelStore = Util::load()->model("setting/store"); + $modelOrderStatus = Util::load()->model("localisation/order_status"); + $modelGeoZone = Util::load()->model("localisation/geo_zone"); + Util::load()->library("mollieHttpClient"); + + $code = MollieHelper::getModuleCode(); + + $form->finish(function ($data) { + $code = MollieHelper::getModuleCode(); + $redirect = true; + $stores = Util::info()->stores(); + foreach ($stores as $store) { + if(count($stores) > 1) { + $configSet = Util::request()->post()->allPrefixed($store["store_id"] . "_"); + if (!$store["store_id"]) { + $configSet = array_merge($configSet, Util::request()->post()->allPrefixed($code, false)); + } + Util::config($store["store_id"])->set($code, $configSet); + } else { + if ($this->validate($store["store_id"])) { + $configSet = Util::request()->post()->allPrefixed($store["store_id"] . "_"); + if (!$store["store_id"]) { + $configSet = array_merge($configSet, Util::request()->post()->allPrefixed($code, false)); + } + Util::config($store["store_id"])->set($code, $configSet); + } + else { + $redirect = false; + } + } + } + + if ($redirect) { + Util::session()->success = $data['text_success']; + Util::response()->redirectToUrl(Util::url()->link(Util::route()->extension(false, 'payment'), "type=payment")); + } + }); + + //title + Util::document() + ->setTitle(Util::language()->heading_title); + + //place the prepared data into the form + $form + ->fillFromSessionClear("error_warning", "success"); + + //Set form variables + $paymentStatus = array(); + $paymentSortOrder = array(); + $paymentGeoZone = array(); + + foreach (MollieHelper::$MODULE_NAMES as $module_name) { + $paymentStatus[] = $code . '_' . $module_name . '_status'; + $paymentSortOrder[] = $code . '_' . $module_name . '_sort_order'; + $paymentGeoZone[] = $code . '_' . $module_name . '_geo_zone'; + } + + $fields = array("show_icons", "show_order_canceled_page", "ideal_description", "api_key", "ideal_processing_status_id", "ideal_expired_status_id", "ideal_canceled_status_id", "ideal_failed_status_id", "ideal_pending_status_id", "ideal_shipping_status_id", "create_shipment_status_id", "create_shipment"); + $settingFields = Util::arrayHelper()->prefixAllValues($code . '_', $fields); + + $storeFormFields = array_merge($settingFields, $paymentStatus, $paymentSortOrder, $paymentGeoZone); + + $data['shops'] = Util::info()->stores(); + foreach ($data['shops'] as &$store) { + + Util::form($store, $store["store_id"]) + ->fillFromPost($storeFormFields) + ->fillFromConfig($storeFormFields); + } + + //API key not required for multistores + $data['api_required'] = true; + + if(count($data['shops']) > 1) { + $data['api_required'] = false; + } + + //Breadcrumb + Util::breadcrumb($data) + ->add("text_home", "common/home") + ->add("text_payment", Util::route()->extension(false, 'payment'), "type=payment") + ->add("heading_title", Util::route()->extension("mollie_" . static::MODULE_NAME, 'payment')); + + // Set data for template + $data['api_check_url'] = Util::url()->link("payment/mollie_" . static::MODULE_NAME . '/validate_api_key'); + $data['module_name'] = static::MODULE_NAME; + $data['token'] = $this->getTokenUriPart(); + $data['entry_version'] = $this->language->get("entry_version") . " " . MollieHelper::PLUGIN_VERSION; + $data['update_url'] = $this->getUpdateUrl(); + + $data['code'] = $code; + + $data['geo_zones'] = $modelGeoZone->getGeoZones(); + $data['order_statuses'] = $modelOrderStatus->getOrderStatuses(); + + // Form action url + $data['action'] = Util::url()->link("payment/mollie_" . static::MODULE_NAME); + $data['cancel'] = Util::url()->link( Util::route()->extension(false, 'payment'), "type=payment"); + + // Load global settings. Some are prefixed with mollie_ideal_ for legacy reasons. + $settings = array( + $code . "_api_key" => NULL, + $code . "_ideal_description" => "Order %", + $code . "_show_icons" => FALSE, + $code . "_show_order_canceled_page" => FALSE, + $code . "_ideal_pending_status_id" => 1, + $code . "_ideal_processing_status_id" => 2, + $code . "_ideal_canceled_status_id" => 7, + $code . "_ideal_failed_status_id" => 10, + $code . "_ideal_expired_status_id" => 14, + $code . "_ideal_shipping_status_id" => 3, + $code . "_create_shipment_status_id" => 3, + $code . "_create_shipment" => 1, + ); + + // Check if order complete status is defined in store setting + $data['is_order_complete_status'] = true; + $data['order_complete_statuses'] = array(); + if((null == Util::config()->get('config_complete_status')) && (Util::config()->get('config_complete_status_id')) == '') { + $data['is_order_complete_status'] = false; + } + + foreach($data['shops'] as &$store) + { + $this->data = $store; + foreach ($settings as $setting_name => $default_value) + { + // Attempt to read from post + if (null != Util::request()->post()->get($store['store_id'] . '_' . $setting_name)) + { + $data['shops'][$store['store_id']][$setting_name] = Util::request()->post()->get($store['store_id'] . '_' . $setting_name); + } + + // Otherwise, attempt to get the setting from the database + else + { + // same as $this->config->get() + $stored_setting = !empty($this->data[$setting_name]) ? $this->data[$setting_name] : null; + + if($stored_setting === NULL && $default_value !== NULL) + { + $data['shops'][$store['store_id']][$setting_name] = $default_value; + } + else + { + $data['shops'][$store['store_id']][$setting_name] = $stored_setting; + } + } + } + + + // Check which payment methods we can use with the current API key. + $allowed_methods = array(); + try + { + $api_methods = $this->getAPIClient()->methods->all(array('resource' => 'orders')); + + foreach ($api_methods as $api_method) + { + $allowed_methods[] = $api_method->id; + } + } + catch (Mollie\Api\Exceptions\ApiException $e) + { + // If we have an unauthorized request, our API key is likely invalid. + if ($store[$code . '_api_key'] !== NULL && strpos($e->getMessage(), "Unauthorized request") !== false) + { + $data['error_api_key'] = $this->language->get("error_api_key_invalid"); + } + } + + $data['store'][$store['store_id'] . '_' . $code . '_payment_methods'] = array(); + + foreach (MollieHelper::$MODULE_NAMES as $module_name) + { + $payment_method = array(); + + $payment_method['name'] = $this->language->get("name_mollie_" . $module_name); + $payment_method['icon'] = "https://www.mollie.com/images/payscreen/methods/" . $module_name . ".png"; + $payment_method['allowed'] = in_array($module_name, $allowed_methods); + + // Load module specific settings. + if (isset($store[$store['store_id'] . '_' . $code . '_' . $module_name . '_status'])) + { + $payment_method['status'] = ($store[$store['store_id'] . '_' . $code . '_' . $module_name . '_status'] == "on"); + } + else + { + $payment_method['status'] = (bool) isset($store[$code . "_" . $module_name . "_status"]) ? $store[$code . "_" . $module_name . "_status"] : null; + } + + if (isset($store[$store['store_id'] . '_' . $code . '_' . $module_name . '_sort_order'])) + { + $payment_method['sort_order'] = $store[$store['store_id'] . '_' . $code . '_' . $module_name . '_sort_order']; + } + else + { + $payment_method['sort_order'] = isset($store[$code . "_" . $module_name . "_sort_order"]) ? $store[$code . "_" . $module_name . "_sort_order"] : null; + } + + if (isset($store[$store['store_id'] . '_' . $code . '_' . $module_name . '_geo_zone'])) + { + $payment_method['geo_zone'] = $store[$store['store_id'] . '_' . $code . '_' . $module_name . '_geo_zone']; + } + else + { + $payment_method['geo_zone'] = isset($store[$code . "_" . $module_name . "_geo_zone"]) ? $store[$code . "_" . $module_name . "_geo_zone"] : null; + } + + $data['store'][$store['store_id'] . '_' . $code . '_payment_methods'][$module_name] = $payment_method; + } + + $data['shops'][$store['store_id']]['entry_cstatus'] = $this->checkCommunicationStatus(isset($store[$code . '_api_key']) ? $store[$code . '_api_key'] : null); + + Util::validation($store, $store['store_id'], $this->error) + ->notIsset('error_api_key', 'api_key') + ->notIsset('error_description', 'description'); + + } + Util::response()->view("payment/mollie", $data); + } + + /** + * + */ + public function validate_api_key() + { + $json = array( + 'error' => false, + 'invalid' => false, + 'valid' => false, + 'message' => '', + ); + + if (empty($this->request->get['key'])) { + $json['invalid'] = true; + $json['message'] = 'API client not found.'; + } else { + try { + $client = MollieHelper::getAPIClientForKey($this->request->get['key']); + + if (!$client) { + $json['invalid'] = true; + $json['message'] = 'API client not found.'; + } else { + $client->methods->all(); + + $json['valid'] = true; + $json['message'] = 'Ok.'; + } + } catch (IncompatiblePlatform $e) { + $json['error'] = true; + $json['message'] = $e->getMessage() . ' You can ask your hosting provider to help with this.'; + } catch (ApiException $e) { + $json['error'] = true; + $json['message'] = 'Communicating with Mollie failed:
' + . htmlspecialchars($e->getMessage()) + . '

' + . 'Please check the following conditions. You can ask your hosting provider to help with this.' + . '
' + . 'Contact info@mollie.nl if this still does not fix your problem.'; + } + } + + + $this->response->addHeader('Content-Type: application/json'); + $this->response->setOutput(json_encode($json)); + } + + /** + * Check the post and check if the user has permission to edit the module settings + * @param int $store The store id + * @return bool + */ + private function validate ($store = 0) + { + if (!$this->user->hasPermission("modify", "payment/mollie_" . static::MODULE_NAME)) + { + $this->error['warning'] = $this->language->get("error_permission"); + } + + if (!Util::request()->post()->get($store . '_' . MollieHelper::getModuleCode() . '_api_key')) + { + $this->error[$store]['api_key'] = $this->data["error_api_key"]; + } + + if (!Util::request()->post()->get($store . '_' . MollieHelper::getModuleCode() . '_ideal_description')) + { + $this->error[$store]['description'] = $this->data["error_description"]; + } + + return (count($this->error) == 0); + } + + /** + * @param string|null + * @return string + */ + protected function checkCommunicationStatus ($api_key = null) + { + if (empty($api_key)) { + return 'No API key provided. Please insert your API key.'; + } + + try { + $client = MollieHelper::getAPIClientForKey($api_key); + + if (!$client) { + return 'API client not found.'; + } + + $client->methods->all(); + + return 'OK'; + } catch (Mollie\Api\Exceptions\ApiException_IncompatiblePlatform $e) { + return '' . $e->getMessage() . ' You can ask your hosting provider to help with this.'; + } catch (Mollie\Api\Exceptions\ApiException $e) { + return '' + . 'Communicating with Mollie failed:
' + . htmlspecialchars($e->getMessage()) + . '


' + + . 'Please check the following conditions. You can ask your hosting provider to help with this.' + . '
' + + . 'Contact info@mollie.nl if this still does not fix your problem.'; + } + } + + /** + * @return string + */ + private function getTokenUriPart() + { + if (isset($this->session->data['user_token'])) { + return 'user_token=' . $this->session->data['user_token']; + } + + return 'token=' . $this->session->data['token']; + } + + private function getUserId() + { + $this->load->model('user/user_group'); + + if (method_exists($this->user, 'getGroupId')) { + return $this->user->getGroupId(); + } + + return $this->user->getId(); + } + + public function saveAPIKey() { + $settingModel = Util::load()->model('setting/setting'); + $store_id = $_POST['store_id']; + $code = MollieHelper::getModuleCode(); + + $data = $settingModel->getSetting($code, $store_id); + $data[$code.'_api_key'] = $_POST['api_key']; + + $settingModel->editSetting($code, $data, $store_id); + return true; + } + + private function getUpdateUrl() + { + $client = new mollieHttpClient(); + $info = $client->get(MOLLIE_VERSION_URL); + if ($info["tag_name"] && $info["tag_name"] != MOLLIE_RELEASE && version_compare(MOLLIE_RELEASE, $info["tag_name"], "<")) { + return Util::url()->link("payment/mollie_" . static::MODULE_NAME . '/update'); + } + return false; + } + + function update() + { + Util::load()->library("mollieHttpClient"); + + //get info + $client = new mollieHttpClient(); + $info = $client->get(MOLLIE_VERSION_URL); + + //save tmp file + $temp_file = MOLLIE_TMP . "/mollieUpdate.zip"; + $handle = fopen($temp_file, "w+"); + $content = $client->get($info["assets"][0]["browser_download_url"], false, false); + fwrite($handle, $content); + fclose($handle); + + + //extract to temp dir + $temp_dir = MOLLIE_TMP . "/mollieUpdate"; + if (class_exists("ZipArchive")) { + $zip = new ZipArchive; + $zip->open($temp_file); + $zip->extractTo($temp_dir); + $zip->close(); + } else { + shell_exec("unzip " . $temp_file . " -d " . $temp_dir); + } + + //find upload path + + $handle = opendir($temp_dir); + $upload_dir = $temp_dir . "/upload"; + while ($file = readdir($handle)) { + if ($file != "." && $file != ".." && is_dir($temp_dir . "/" . $file . "/upload")) { + $upload_dir = $temp_dir . "/" . $file . "/upload"; + break; + } + } + + //copy files + $handle = opendir($upload_dir); + while ($file = readdir($handle)) { + if ($file != "." && $file != "..") { + $from = $upload_dir . "/" . $file; + if ($file == "admin") { + $to = DIR_APPLICATION; + } elseif ($file == "system") { + $to = DIR_SYSTEM; + } else { + $to = DIR_CATALOG . "../" . $file . "/"; + } + $this->cpy($from, $to); + } + + } + + //cleanup + unlink($temp_file); + $this->rmDirRecursive($temp_dir); + + //go back + Util::response()->redirectBack(); + } + + public function rmDirRecursive($dir) + { + $files = array_diff(scandir($dir), array('.', '..')); + foreach ($files as $file) { + (is_dir("$dir/$file")) ? $this->rmDirRecursive("$dir/$file") : unlink("$dir/$file"); + } + return rmdir($dir); + } + + function cpy($source, $dest) + { + if (is_dir($source)) { + $dir_handle = opendir($source); + while ($file = readdir($dir_handle)) { + if ($file != "." && $file != "..") { + if (is_dir($source . "/" . $file)) { + if (!is_dir($dest . "/" . $file)) { + mkdir($dest . "/" . $file); + } + $this->cpy($source . "/" . $file, $dest . "/" . $file); + } else { + copy($source . "/" . $file, $dest . "/" . $file); + } + } + } + closedir($dir_handle); + } else { + copy($source, $dest); + } + } +} diff --git a/admin/controller/payment/mollie_bancontact.php b/admin/controller/payment/mollie_bancontact.php new file mode 100644 index 00000000..98fc8a70 --- /dev/null +++ b/admin/controller/payment/mollie_bancontact.php @@ -0,0 +1,7 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +// These are called automatically by the Payment modules list - do not change the names +$method_list_logo = 'Mollie'; +$_['text_mollie_banktransfer'] = $method_list_logo; +$_['text_mollie_belfius'] = $method_list_logo; +$_['text_mollie_creditcard'] = $method_list_logo; +$_['text_mollie_directdebit'] = $method_list_logo; +$_['text_mollie_ideal'] = $method_list_logo; +$_['text_mollie_kbc'] = $method_list_logo; +$_['text_mollie_mistercash'] = $method_list_logo; +$_['text_mollie_paypal'] = $method_list_logo; +$_['text_mollie_paysafecard'] = $method_list_logo; +$_['text_mollie_sofort'] = $method_list_logo; +$_['text_mollie_giftcard'] = $method_list_logo; +$_['text_mollie_inghomepay'] = $method_list_logo; +$_['text_mollie_eps'] = $method_list_logo; +$_['text_mollie_giropay'] = $method_list_logo; +$_['text_mollie_klarnapaylater'] = $method_list_logo; +$_['text_mollie_klarnasliceit'] = $method_list_logo; +$_['text_mollie_przelewy24'] = $method_list_logo; + +// Heading +$_['heading_title'] = "Mollie"; +$_['title_global_options'] = "Einstellungen"; +$_['title_payment_status'] = "Bezahlungs-Status"; +$_['title_mod_about'] = "Über dieses Modul"; +$_['footer_text'] = "Zahlungsdienste"; + +// Module names +$_['name_mollie_banktransfer'] = "Übertragung"; +$_['name_mollie_belfius'] = "Belfius Direct Net"; +$_['name_mollie_creditcard'] = "Creditcard"; +$_['name_mollie_directdebit'] = "Einmaliges Inkasso"; +$_['name_mollie_ideal'] = "iDEAL"; +$_['name_mollie_kbc'] = "KBC/CBC-Betaalknop"; +$_['name_mollie_mistercash'] = "Bancontact/MisterCash"; +$_['name_mollie_paypal'] = "PayPal"; +$_['name_mollie_paysafecard'] = "paysafecard"; +$_['name_mollie_sofort'] = "SOFORT Banking"; +$_['name_mollie_giftcard'] = 'Giftcard'; +$_['name_mollie_inghomepay'] = 'ING Home\'Pay'; +$_['name_mollie_eps'] = 'EPS'; +$_['name_mollie_giropay'] = 'Giropay'; +$_['name_mollie_klarnapaylater'] = 'Klarna Pay Later'; +$_['name_mollie_klarnasliceit'] = 'Klarna Slice It'; +$_['name_mollie_przelewy24'] = 'P24'; + +// Text +$_['text_edit'] = "Mollie bearbeiten"; +$_['text_payment'] = "Bezahlung"; +$_['text_success'] = "Erfolg: Die Einstellungen für dieses Modul wurden angepasst!"; +$_['text_missing_api_key'] = "Bitte füllen Sie Ihren API-Schlüssel auf der Registerkarte Einstellungen aus."; +$_['text_activate_payment_method'] = 'Aktivieren Sie diese Zahlungsart über das Mollie Dashboard.'; +$_['text_no_status_id'] = "- Status nicht ändern (nicht empfohlen) -"; + +// Entry +$_['entry_payment_method'] = "Zahlungsart"; +$_['entry_activate'] = "Aktivieren"; +$_['entry_sort_order'] = "Sortierreihenfolge"; +$_['entry_api_key'] = "API Key"; +$_['entry_description'] = "Beschreibung"; +$_['entry_show_icons'] = "Icons anzeigen"; +$_['entry_show_order_canceled_page'] = "Meldung bei annullierten Bezahlungen anzeigen"; +$_['entry_geo_zone'] = "Geo Zone"; + +// Help +$_['help_view_profile'] = 'Sie können Ihren API Key auf Ihren Mollie-Webseiten-Profilen finden.'; +$_['help_status'] = "Das Modul aktivieren"; +$_['help_api_key'] = "Geben Sie hier den api_key des Webseiten-Profils ein, das Sie verwenden wollen. Der API Key beginnt mit test_ oder live_."; +$_['help_description'] = "Die Beschreibung soll auf der Banküberweisung Ihres Kunden erscheinen und Sie können sie in der Mollie Verwaltung sehen. Sie können maximal 29 Zeichen verwenden. TIPP: Verwenden Sie %, dies wird durch die Auftragsnummer ersetzt werden. Die Auftragsnummer selbst kann auch mehrere Zeichen lang sein!"; +$_['help_show_icons'] = "Icons neben den Zahlungsarten von Mollie auf der Zahlungsseite anzeigen."; +$_['help_show_order_canceled_page'] = "Eine Meldung für den Kunden anzeigen, wenn eine Zahlung annulliert wurde, bevor der Kunde zurück zum Warenkorb verwiesen wird."; + +// Info +$_['entry_module'] = "Module"; +$_['entry_mod_status'] = "Modulestatus"; +$_['entry_comm_status'] = "Kommunikationsstatus"; +$_['entry_support'] = "Support"; + +$_['entry_version'] = 'Mollie Opencart'; + +// Error +$_['error_permission'] = "Warnung: Sie haben keine Berechtigung, das Modul zu bearbeiten."; +$_['error_api_key'] = "Mollie API Key ist verpflichtend!"; +$_['error_api_key_invalid'] = "Ungültiger Mollie API Key!"; +$_['error_description'] = "Die Beschreibung ist obligatorisch!"; +$_['error_file_missing'] = "Die Datei existiert nicht"; + +// Status +$_['entry_pending_status'] = "Status Zahlung erstellt"; +$_['entry_failed_status'] = "Status Zahlung fehlgeschlagen"; +$_['entry_canceled_status'] = "Status Zahlung annulliert"; +$_['entry_expired_status'] = "Status Zahlung verstrichen"; +$_['entry_processing_status']= "Status Zahlung erfolgreich"; + +$_['entry_shipping_status'] = "Versandstatus der Bestellung"; +$_['entry_shipment'] = "Sendung erstellen"; +$_['entry_create_shipment_status'] = "Erstellen Sie eine Sendung nach dem Bestellstatus"; +$_['help_shipment'] = "Versand (nur für Klarna-Methoden) wird direkt nach dem Erstellen der Bestellung erstellt. Wählen Sie 'Nein', um die Sendung zu erstellen, wenn die Bestellung einen bestimmten Status erreicht, und wählen Sie den Bestellstatus von unten aus."; + +$_['text_create_shipment_automatically'] = "Erstellen Sie den Versand automatisch bei der Auftragserstellung"; +$_['text_create_shipment_on_status'] = "Legen Sie eine Sendung an, wenn Sie den Auftrag auf diesen Status setzen"; +$_['text_create_shipment_on_order_complete'] = "Erstellen Sie eine Sendung, nachdem Sie den Status zum Bestellen der Bestellung festgelegt haben"; +$_['entry_create_shipment_on_order_complete'] = "Erstellen Sie den Versand nach Abschluss der Bestellung"; + +//Button +$_['button_update'] = "Aktualisieren"; diff --git a/admin/language/de-de/payment/mollie_banktransfer.php b/admin/language/de-de/payment/mollie_banktransfer.php new file mode 100644 index 00000000..8a40e816 --- /dev/null +++ b/admin/language/de-de/payment/mollie_banktransfer.php @@ -0,0 +1,4 @@ + - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -// These are called automatically by the Payment modules list - do not change the names -$method_list_logo = 'Mollie'; -$_['text_mollie_banktransfer'] = $method_list_logo; -$_['text_mollie_belfius'] = $method_list_logo; -$_['text_mollie_bitcoin'] = $method_list_logo; -$_['text_mollie_creditcard'] = $method_list_logo; -$_['text_mollie_directdebit'] = $method_list_logo; -$_['text_mollie_ideal'] = $method_list_logo; -$_['text_mollie_kbc'] = $method_list_logo; -$_['text_mollie_mistercash'] = $method_list_logo; -$_['text_mollie_paypal'] = $method_list_logo; -$_['text_mollie_paysafecard'] = $method_list_logo; -$_['text_mollie_sofort'] = $method_list_logo; - -// Heading -$_['heading_title'] = "Mollie"; -$_['title_global_options'] = "Opties voor alle Mollie-modules"; -$_['title_payment_status'] = "Betaalstatussen"; -$_['title_mod_about'] = "Over deze module"; -$_['footer_text'] = "Betaaldiensten"; - -// Module names -$_['name_mollie_banktransfer'] = "Overboeking"; -$_['name_mollie_belfius'] = "Belfius Direct Net"; -$_['name_mollie_bitcoin'] = "Bitcoin"; -$_['name_mollie_creditcard'] = "Creditcard"; -$_['name_mollie_directdebit'] = "Eenmalige incasso"; -$_['name_mollie_ideal'] = "iDEAL"; -$_['name_mollie_kbc'] = "KBC/CBC-Betaalknop"; -$_['name_mollie_mistercash'] = "Bancontact/MisterCash"; -$_['name_mollie_paypal'] = "PayPal"; -$_['name_mollie_paysafecard'] = "paysafecard"; -$_['name_mollie_sofort'] = "SOFORT Banking"; - -// Text -$_['text_edit'] = "Bewerk Mollie"; -$_['text_payment'] = "Betaling"; -$_['text_success'] = "Gelukt: de instellingen voor de module zijn aangepast!"; -$_['text_missing_api_key'] = "Vul hieronder de API-key in."; -$_['text_activate_payment_method'] = 'Activeer deze betaalmethode via het Mollie-dashboard.'; -$_['text_no_status_id'] = "- Status niet wijzigen (niet aanbevolen) -"; - -// Entry -$_['entry_payment_method'] = "Betaalmethode"; -$_['entry_activate'] = "Activeren"; -$_['entry_sort_order'] = "Sorteervolgorde"; -$_['entry_status'] = "Status"; -$_['entry_api_key'] = "API-sleutel"; -$_['entry_description'] = "Omschrijving"; -$_['entry_show_icons'] = "Toon icoontjes"; -$_['entry_show_order_canceled_page'] = "Toon melding bij geannuleerde betalingen"; - -// Help -$_['help_view_profile'] = 'U kunt uw API-sleutel vinden bij uw Mollie-websiteprofielen.'; -$_['help_status'] = "Activeer de module"; -$_['help_api_key'] = "Voer hier de api_key van het websiteprofiel in dat u wilt gebruiken. De API-sleutel begint met test_ of live_."; -$_['help_description'] = "De omschrijving zal op het bankafschrift van uw klant verschijnen en kunt u terugvinden in het Mollie beheer. U kunt maximaal 29 tekens gebruiken. TIP: Gebruik %, dit zal vervangen worden door het ordernummer. Het ordernummer kan zelf ook meerdere tekens lang zijn!"; -$_['help_show_icons'] = "Toon icoontjes naast de betaalmethodes van Mollie op de betaalpagina."; -$_['help_show_order_canceled_page'] = "Toon een melding aan de klant als een betaling geannuleerd wordt, alvorens de klant terug naar het winkelmandje te verwijzen."; - -// Info -$_['entry_module'] = "Module"; -$_['entry_mod_status'] = "Modulestatus"; -$_['entry_comm_status'] = "Communicatiestatus"; -$_['entry_support'] = "Support"; - -$_['entry_version'] = 'Mollie Opencart'; - -// Error -$_['error_permission'] = "Waarschuwing: U heeft geen toestemming om de module aan te passen."; -$_['error_api_key'] = "Mollie API-sleutel is verplicht!"; -$_['error_api_key_invalid'] = "Ongeldige Mollie API-sleutel!"; -$_['error_description'] = "De omschrijving is verplicht!"; -$_['error_file_missing'] = "Bestand bestaat niet"; - -// Status -$_['entry_pending_status'] = "Status betaling aangemaakt"; -$_['entry_failed_status'] = "Status betaling mislukt"; -$_['entry_canceled_status'] = "Status betaling geannuleerd"; -$_['entry_expired_status'] = "Status betaling verlopen"; -$_['entry_processing_status']= "Status betaling succesvol"; + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/admin/language/dutch/extension/payment/mollie_bancontact.php b/admin/language/dutch/extension/payment/mollie_bancontact.php new file mode 100644 index 00000000..4d68cb30 --- /dev/null +++ b/admin/language/dutch/extension/payment/mollie_bancontact.php @@ -0,0 +1,2 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +// These are called automatically by the Payment modules list - do not change the names +$method_list_logo = 'Mollie'; +$_['text_mollie_banktransfer'] = $method_list_logo; +$_['text_mollie_belfius'] = $method_list_logo; +$_['text_mollie_creditcard'] = $method_list_logo; +$_['text_mollie_directdebit'] = $method_list_logo; +$_['text_mollie_ideal'] = $method_list_logo; +$_['text_mollie_kbc'] = $method_list_logo; +$_['text_mollie_bancontact'] = $method_list_logo; +$_['text_mollie_paypal'] = $method_list_logo; +$_['text_mollie_paysafecard'] = $method_list_logo; +$_['text_mollie_sofort'] = $method_list_logo; +$_['text_mollie_giftcard'] = $method_list_logo; +$_['text_mollie_inghomepay'] = $method_list_logo; +$_['text_mollie_eps'] = $method_list_logo; +$_['text_mollie_giropay'] = $method_list_logo; +$_['text_mollie_klarnapaylater'] = $method_list_logo; +$_['text_mollie_klarnasliceit'] = $method_list_logo; +$_['text_mollie_przelewy24'] = $method_list_logo; + +// Heading +$_['heading_title'] = "Mollie"; +$_['title_global_options'] = "Instellingen"; +$_['title_payment_status'] = "Betaalstatussen"; +$_['title_mod_about'] = "Over deze module"; +$_['footer_text'] = "Betaaldiensten"; + +// Module names +$_['name_mollie_banktransfer'] = "Overboeking"; +$_['name_mollie_belfius'] = "Belfius Direct Net"; +$_['name_mollie_creditcard'] = "Creditcard"; +$_['name_mollie_directdebit'] = "Eenmalige incasso"; +$_['name_mollie_ideal'] = "iDEAL"; +$_['name_mollie_kbc'] = "KBC/CBC-Betaalknop"; +$_['name_mollie_bancontact'] = "Bancontact"; +$_['name_mollie_paypal'] = "PayPal"; +$_['name_mollie_paysafecard'] = "paysafecard"; +$_['name_mollie_sofort'] = "SOFORT Banking"; +$_['name_mollie_giftcard'] = 'Giftcard'; +$_['name_mollie_inghomepay'] = 'ING Home\'pay'; +$_['name_mollie_eps'] = 'EPS'; +$_['name_mollie_giropay'] = 'Giropay'; +$_['name_mollie_klarnapaylater'] = 'Klarna Pay Later'; +$_['name_mollie_klarnasliceit'] = 'Klarna Slice It'; +$_['name_mollie_przelewy24'] = 'P24'; + +// Text +$_['text_edit'] = "Bewerk Mollie"; +$_['text_payment'] = "Betaling"; +$_['text_success'] = "Gelukt: de instellingen voor de module zijn aangepast!"; +$_['text_missing_api_key'] = "Vul uw API-key in bij de Instellingen."; +$_['text_activate_payment_method'] = 'Activeer deze betaalmethode via het Mollie-dashboard.'; +$_['text_no_status_id'] = "- Status niet wijzigen (niet aanbevolen) -"; + +// Entry +$_['entry_payment_method'] = "Betaalmethode"; +$_['entry_activate'] = "Activeren"; +$_['entry_sort_order'] = "Sorteervolgorde"; +$_['entry_api_key'] = "API-sleutel"; +$_['entry_description'] = "Omschrijving"; +$_['entry_show_icons'] = "Toon icoontjes"; +$_['entry_show_order_canceled_page'] = "Toon melding bij geannuleerde betalingen"; +$_['entry_geo_zone'] = "Geo Zone"; + +// Help +$_['help_view_profile'] = 'U kunt uw API-sleutel vinden bij uw Mollie-websiteprofielen.'; +$_['help_status'] = "Activeer de module"; +$_['help_api_key'] = "Voer hier de api_key van het websiteprofiel in dat u wilt gebruiken. De API-sleutel begint met test_ of live_."; +$_['help_description'] = "De omschrijving zal op het bankafschrift van uw klant verschijnen en kunt u terugvinden in het Mollie beheer. U kunt maximaal 29 tekens gebruiken. TIP: Gebruik %, dit zal vervangen worden door het ordernummer. Het ordernummer kan zelf ook meerdere tekens lang zijn!"; +$_['help_show_icons'] = "Toon icoontjes naast de betaalmethodes van Mollie op de betaalpagina."; +$_['help_show_order_canceled_page'] = "Toon een melding aan de klant als een betaling geannuleerd wordt, alvorens de klant terug naar het winkelmandje te verwijzen."; + +// Info +$_['entry_module'] = "Module"; +$_['entry_mod_status'] = "Modulestatus"; +$_['entry_comm_status'] = "Communicatiestatus"; +$_['entry_support'] = "Support"; + +$_['entry_version'] = 'Mollie Opencart'; + +// Error +$_['error_permission'] = "Waarschuwing: U heeft geen toestemming om de module aan te passen."; +$_['error_api_key'] = "Mollie API-sleutel is verplicht!"; +$_['error_api_key_invalid'] = "Ongeldige Mollie API-sleutel!"; +$_['error_description'] = "De omschrijving is verplicht!"; +$_['error_file_missing'] = "Bestand bestaat niet"; + +// Status +$_['entry_pending_status'] = "Status betaling aangemaakt"; +$_['entry_failed_status'] = "Status betaling mislukt"; +$_['entry_canceled_status'] = "Status betaling geannuleerd"; +$_['entry_expired_status'] = "Status betaling verlopen"; +$_['entry_processing_status']= "Status betaling succesvol"; + +$_['entry_shipping_status'] = "Status bestelling verzonden"; +$_['entry_shipment'] = "Maak verzending"; +$_['entry_create_shipment_status'] = "Maak verzending aan na order status"; +$_['help_shipment'] = "Verzending (alleen voor Klarna-methoden) wordt direct na het maken van de bestelling gemaakt. Selecteer 'Nee' om een ​​zending te creëren wanneer de order een specifieke status bereikt en selecteer de bestelstatus van onder."; + +$_['text_create_shipment_automatically'] = "Maak automatisch een zending bij het maken van de bestelling"; +$_['text_create_shipment_on_status'] = "Maak verzending bij het plaatsen van de bestelling naar deze status"; +$_['text_create_shipment_on_order_complete'] = "Maak verzending bij het plaatsen van bestelling om de volledige status te bestellen"; +$_['entry_create_shipment_on_order_complete'] = "Maak verzending bij bestelling compleet"; + +//Button +$_['button_update'] = "Bijwerken"; diff --git a/admin/language/dutch/payment/mollie_bancontact.php b/admin/language/dutch/payment/mollie_bancontact.php new file mode 100644 index 00000000..4a1a8110 --- /dev/null +++ b/admin/language/dutch/payment/mollie_bancontact.php @@ -0,0 +1,4 @@ + - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -// These are called automatically by the Payment modules list - do not change the names -$method_list_logo = 'Mollie'; -$_['text_mollie_banktransfer'] = $method_list_logo; -$_['text_mollie_belfius'] = $method_list_logo; -$_['text_mollie_bitcoin'] = $method_list_logo; -$_['text_mollie_creditcard'] = $method_list_logo; -$_['text_mollie_directdebit'] = $method_list_logo; -$_['text_mollie_ideal'] = $method_list_logo; -$_['text_mollie_kbc'] = $method_list_logo; -$_['text_mollie_mistercash'] = $method_list_logo; -$_['text_mollie_paypal'] = $method_list_logo; -$_['text_mollie_paysafecard'] = $method_list_logo; -$_['text_mollie_sofort'] = $method_list_logo; - -// Heading -$_['heading_title'] = "Mollie"; -$_['title_global_options'] = "Options for all Mollie modules"; -$_['title_payment_status'] = "Payment statuses"; -$_['title_mod_about'] = "About this module"; -$_['footer_text'] = "Payment services"; - -// Module names -$_['name_mollie_banktransfer'] = "Bank transfer"; -$_['name_mollie_belfius'] = "Belfius Direct Net"; -$_['name_mollie_bitcoin'] = "Bitcoin"; -$_['name_mollie_creditcard'] = "Creditcard"; -$_['name_mollie_directdebit'] = "Direct debit"; -$_['name_mollie_ideal'] = "iDEAL"; -$_['name_mollie_kbc'] = "KBC/CBC Payment Button"; -$_['name_mollie_mistercash'] = "Bancontact/MisterCash"; -$_['name_mollie_paypal'] = "PayPal"; -$_['name_mollie_paysafecard'] = "paysafecard"; -$_['name_mollie_sofort'] = "SOFORT Banking"; - -// Text -$_['text_edit'] = "Edit"; -$_['text_payment'] = "Payment"; -$_['text_success'] = "Success: You have successfully modified your Mollie settings!"; -$_['text_missing_api_key'] = "Please fill out your API key below."; -$_['text_activate_payment_method'] = 'Enable this payment method in your Mollie dashboard.'; -$_['text_no_status_id'] = "- Do not update the order status (not recommended) -"; - -// Entry -$_['entry_payment_method'] = "Payment method"; -$_['entry_activate'] = "Activate"; -$_['entry_sort_order'] = "Sort order"; -$_['entry_status'] = "Status"; -$_['entry_api_key'] = "API key"; -$_['entry_description'] = "Description"; -$_['entry_show_icons'] = "Show icons"; -$_['entry_show_order_canceled_page'] = "Show message if payment is cancelled"; - -// Help -$_['help_view_profile'] = 'You can find your API key in your Mollie website profiles.'; -$_['help_status'] = "Activate the module"; -$_['help_api_key'] = 'Enter the api_key of the website profile you want to use. The API key starts with test_ or live_.'; -$_['help_description'] = 'This description will appear on the bank / card statement of your customer. You may use a maximum of 29 characters. TIP: Use %, this will be replaced by the order id of the payment. Don\'t forget % can be multiple characters long!'; -$_['help_show_icons'] = 'Show icons next to the Mollie payment methods on the checkout page.'; -$_['help_show_order_canceled_page'] = 'Show a message to the customer if a payment is cancelled, before redirecting the customer back to their shopping cart.'; - -// Info -$_['entry_module'] = "Module"; -$_['entry_mod_status'] = "Module status"; -$_['entry_comm_status'] = "Communication status"; -$_['entry_support'] = "Support"; - -$_['entry_version'] = 'Mollie Opencart'; - -// Error -$_['error_permission'] = "Warning: You don't have permission to modify the Mollie payment methods."; -$_['error_api_key'] = "Mollie API key is required!"; -$_['error_api_key_invalid'] = "Invalid API key!"; -$_['error_description'] = "Description is required!"; -$_['error_file_missing'] = "File does not exist"; - -// Status -$_['entry_pending_status'] = "Payment created status"; -$_['entry_failed_status'] = "Payment failed status"; -$_['entry_canceled_status'] = "Payment canceled status"; -$_['entry_expired_status'] = "Payment expired status"; -$_['entry_processing_status'] = "Payment successful status"; + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/admin/language/en-gb/extension/payment/mollie_bancontact.php b/admin/language/en-gb/extension/payment/mollie_bancontact.php new file mode 100644 index 00000000..4d68cb30 --- /dev/null +++ b/admin/language/en-gb/extension/payment/mollie_bancontact.php @@ -0,0 +1,2 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +// These are called automatically by the Payment modules list - do not change the names +$method_list_logo = 'Mollie'; +$_['text_mollie_banktransfer'] = $method_list_logo; +$_['text_mollie_belfius'] = $method_list_logo; +$_['text_mollie_creditcard'] = $method_list_logo; +$_['text_mollie_directdebit'] = $method_list_logo; +$_['text_mollie_ideal'] = $method_list_logo; +$_['text_mollie_kbc'] = $method_list_logo; +$_['text_mollie_bancontact'] = $method_list_logo; +$_['text_mollie_paypal'] = $method_list_logo; +$_['text_mollie_paysafecard'] = $method_list_logo; +$_['text_mollie_sofort'] = $method_list_logo; +$_['text_mollie_giftcard'] = $method_list_logo; +$_['text_mollie_inghomepay'] = $method_list_logo; +$_['text_mollie_eps'] = $method_list_logo; +$_['text_mollie_giropay'] = $method_list_logo; +$_['text_mollie_klarnapaylater'] = $method_list_logo; +$_['text_mollie_klarnasliceit'] = $method_list_logo; +$_['text_mollie_przelewy24'] = $method_list_logo; + +// Heading +$_['heading_title'] = "Mollie"; +$_['title_global_options'] = "Settings"; +$_['title_payment_status'] = "Payment statuses"; +$_['title_mod_about'] = "About this module"; +$_['footer_text'] = "Payment services"; + +// Module names +$_['name_mollie_banktransfer'] = "Bank transfer"; +$_['name_mollie_belfius'] = "Belfius Direct Net"; +$_['name_mollie_creditcard'] = "Creditcard"; +$_['name_mollie_directdebit'] = "Direct debit"; +$_['name_mollie_ideal'] = "iDEAL"; +$_['name_mollie_kbc'] = "KBC/CBC Payment Button"; +$_['name_mollie_bancontact'] = "Bancontact"; +$_['name_mollie_paypal'] = "PayPal"; +$_['name_mollie_paysafecard'] = "paysafecard"; +$_['name_mollie_sofort'] = "SOFORT Banking"; +$_['name_mollie_giftcard'] = 'Giftcard'; +$_['name_mollie_inghomepay'] = 'ING Home\'pay'; +$_['name_mollie_eps'] = 'EPS'; +$_['name_mollie_giropay'] = 'Giropay'; +$_['name_mollie_klarnapaylater'] = 'Klarna Pay Later'; +$_['name_mollie_klarnasliceit'] = 'Klarna Slice It'; +$_['name_mollie_przelewy24'] = 'P24'; + +// Text +$_['text_edit'] = "Edit"; +$_['text_payment'] = "Payment"; +$_['text_success'] = "Success: You have successfully modified your Mollie settings!"; +$_['text_missing_api_key'] = "Please fill out your API key in the Settings tab."; +$_['text_activate_payment_method'] = 'Enable this payment method in your Mollie dashboard.'; +$_['text_no_status_id'] = "- Do not update the order status (not recommended) -"; + +// Entry +$_['entry_payment_method'] = "Payment method"; +$_['entry_activate'] = "Activate"; +$_['entry_sort_order'] = "Sort order"; +$_['entry_api_key'] = "API key"; +$_['entry_description'] = "Description"; +$_['entry_show_icons'] = "Show icons"; +$_['entry_show_order_canceled_page'] = "Show message if payment is cancelled"; +$_['entry_geo_zone'] = "Geo Zone"; + +// Help +$_['help_view_profile'] = 'You can find your API key in your Mollie website profiles.'; +$_['help_status'] = "Activate the module"; +$_['help_api_key'] = 'Enter the api_key of the website profile you want to use. The API key starts with test_ or live_.'; +$_['help_description'] = 'This description will appear on the bank / card statement of your customer. You may use a maximum of 29 characters. TIP: Use %, this will be replaced by the order id of the payment. Don\'t forget % can be multiple characters long!'; +$_['help_show_icons'] = 'Show icons next to the Mollie payment methods on the checkout page.'; +$_['help_show_order_canceled_page'] = 'Show a message to the customer if a payment is cancelled, before redirecting the customer back to their shopping cart.'; + +// Info +$_['entry_module'] = "Module"; +$_['entry_mod_status'] = "Module status"; +$_['entry_comm_status'] = "Communication status"; +$_['entry_support'] = "Support"; + +$_['entry_version'] = 'Mollie Opencart'; + +// Error +$_['error_permission'] = "Warning: You don't have permission to modify the Mollie payment methods."; +$_['error_api_key'] = "Mollie API key is required!"; +$_['error_api_key_invalid'] = "Invalid API key!"; +$_['error_description'] = "Description is required!"; +$_['error_file_missing'] = "File does not exist"; + +// Status +$_['entry_pending_status'] = "Payment created status"; +$_['entry_failed_status'] = "Payment failed status"; +$_['entry_canceled_status'] = "Payment canceled status"; +$_['entry_expired_status'] = "Payment expired status"; +$_['entry_processing_status'] = "Payment successful status"; + +$_['entry_shipping_status'] = "Order shipped status"; +$_['entry_shipment'] = "Create shipment"; +$_['entry_create_shipment_status'] = "Create shipment after order status"; +$_['help_shipment'] = "Shipment(For klarna methods only) will be created right after creating order. Select 'No' to create shipment when order reach to a specific status and select the order status from below."; + +$_['text_create_shipment_automatically'] = "Create shipment automatically upon order creation"; +$_['text_create_shipment_on_status'] = "Create shipment upon setting order to this status"; +$_['text_create_shipment_on_order_complete'] = "Create shipment upon setting order to order complete status"; +$_['entry_create_shipment_on_order_complete'] = "Create shipment upon order complete"; + +//Button +$_['button_update'] = "Update"; diff --git a/admin/language/en-gb/payment/mollie_bancontact.php b/admin/language/en-gb/payment/mollie_bancontact.php new file mode 100644 index 00000000..4a1a8110 --- /dev/null +++ b/admin/language/en-gb/payment/mollie_bancontact.php @@ -0,0 +1,4 @@ + - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -// These are called automatically by the Payment modules list - do not change the names -$method_list_logo = 'Mollie'; -$_['text_mollie_banktransfer'] = $method_list_logo; -$_['text_mollie_belfius'] = $method_list_logo; -$_['text_mollie_bitcoin'] = $method_list_logo; -$_['text_mollie_creditcard'] = $method_list_logo; -$_['text_mollie_directdebit'] = $method_list_logo; -$_['text_mollie_ideal'] = $method_list_logo; -$_['text_mollie_kbc'] = $method_list_logo; -$_['text_mollie_mistercash'] = $method_list_logo; -$_['text_mollie_paypal'] = $method_list_logo; -$_['text_mollie_paysafecard'] = $method_list_logo; -$_['text_mollie_sofort'] = $method_list_logo; - -// Heading -$_['heading_title'] = "Mollie"; -$_['title_global_options'] = "Options for all Mollie modules"; -$_['title_payment_status'] = "Payment statuses"; -$_['title_mod_about'] = "About this module"; -$_['footer_text'] = "Payment services"; - -// Module names -$_['name_mollie_banktransfer'] = "Bank transfer"; -$_['name_mollie_belfius'] = "Belfius Direct Net"; -$_['name_mollie_bitcoin'] = "Bitcoin"; -$_['name_mollie_creditcard'] = "Creditcard"; -$_['name_mollie_directdebit'] = "Direct debit"; -$_['name_mollie_ideal'] = "iDEAL"; -$_['name_mollie_kbc'] = "KBC/CBC Payment Button"; -$_['name_mollie_mistercash'] = "Bancontact/MisterCash"; -$_['name_mollie_paypal'] = "PayPal"; -$_['name_mollie_paysafecard'] = "paysafecard"; -$_['name_mollie_sofort'] = "SOFORT Banking"; - -// Text -$_['text_edit'] = "Edit"; -$_['text_payment'] = "Payment"; -$_['text_success'] = "Success: You have successfully modified your Mollie settings!"; -$_['text_missing_api_key'] = "Please fill out your API key below."; -$_['text_activate_payment_method'] = 'Enable this payment method in your Mollie dashboard.'; -$_['text_no_status_id'] = "- Do not update the order status (not recommended) -"; - -// Entry -$_['entry_payment_method'] = "Payment method"; -$_['entry_activate'] = "Activate"; -$_['entry_sort_order'] = "Sort order"; -$_['entry_status'] = "Status"; -$_['entry_api_key'] = "API key"; -$_['entry_description'] = "Description"; -$_['entry_show_icons'] = "Show icons"; -$_['entry_show_order_canceled_page'] = "Show message if payment is cancelled"; - -// Help -$_['help_view_profile'] = 'You can find your API key in your Mollie website profiles.'; -$_['help_status'] = "Activate the module"; -$_['help_api_key'] = 'Enter the api_key of the website profile you want to use. The API key starts with test_ or live_.'; -$_['help_description'] = 'This description will appear on the bank / card statement of your customer. You may use a maximum of 29 characters. TIP: Use %, this will be replaced by the order id of the payment. Don\'t forget % can be multiple characters long!'; -$_['help_show_icons'] = 'Show icons next to the Mollie payment methods on the checkout page.'; -$_['help_show_order_canceled_page'] = 'Show a message to the customer if a payment is cancelled, before redirecting the customer back to their shopping cart.'; - -// Info -$_['entry_module'] = "Module"; -$_['entry_mod_status'] = "Module status"; -$_['entry_comm_status'] = "Communication status"; -$_['entry_support'] = "Support"; - -$_['entry_version'] = 'Mollie Opencart'; - -// Error -$_['error_permission'] = "Warning: You don't have permission to modify the Mollie payment methods."; -$_['error_api_key'] = "Mollie API key is required!"; -$_['error_api_key_invalid'] = "Invalid API key!"; -$_['error_description'] = "Description is required!"; -$_['error_file_missing'] = "File does not exist"; - -// Status -$_['entry_pending_status'] = "Payment created status"; -$_['entry_failed_status'] = "Payment failed status"; -$_['entry_canceled_status'] = "Payment canceled status"; -$_['entry_expired_status'] = "Payment expired status"; -$_['entry_processing_status'] = "Payment successful status"; + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/admin/language/english/extension/payment/mollie_bancontact.php b/admin/language/english/extension/payment/mollie_bancontact.php new file mode 100644 index 00000000..4d68cb30 --- /dev/null +++ b/admin/language/english/extension/payment/mollie_bancontact.php @@ -0,0 +1,2 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +// These are called automatically by the Payment modules list - do not change the names +$method_list_logo = 'Mollie'; +$_['text_mollie_banktransfer'] = $method_list_logo; +$_['text_mollie_belfius'] = $method_list_logo; +$_['text_mollie_creditcard'] = $method_list_logo; +$_['text_mollie_directdebit'] = $method_list_logo; +$_['text_mollie_ideal'] = $method_list_logo; +$_['text_mollie_kbc'] = $method_list_logo; +$_['text_mollie_bancontact'] = $method_list_logo; +$_['text_mollie_paypal'] = $method_list_logo; +$_['text_mollie_paysafecard'] = $method_list_logo; +$_['text_mollie_sofort'] = $method_list_logo; +$_['text_mollie_giftcard'] = $method_list_logo; +$_['text_mollie_inghomepay'] = $method_list_logo; +$_['text_mollie_eps'] = $method_list_logo; +$_['text_mollie_giropay'] = $method_list_logo; +$_['text_mollie_klarnapaylater'] = $method_list_logo; +$_['text_mollie_klarnasliceit'] = $method_list_logo; +$_['text_mollie_przelewy24'] = $method_list_logo; + +// Heading +$_['heading_title'] = "Mollie"; +$_['title_global_options'] = "Settings"; +$_['title_payment_status'] = "Payment statuses"; +$_['title_mod_about'] = "About this module"; +$_['footer_text'] = "Payment services"; + +// Module names +$_['name_mollie_banktransfer'] = "Bank transfer"; +$_['name_mollie_belfius'] = "Belfius Direct Net"; +$_['name_mollie_creditcard'] = "Creditcard"; +$_['name_mollie_directdebit'] = "Direct debit"; +$_['name_mollie_ideal'] = "iDEAL"; +$_['name_mollie_kbc'] = "KBC/CBC Payment Button"; +$_['name_mollie_bancontact'] = "Bancontact"; +$_['name_mollie_paypal'] = "PayPal"; +$_['name_mollie_paysafecard'] = "paysafecard"; +$_['name_mollie_sofort'] = "SOFORT Banking"; +$_['name_mollie_giftcard'] = 'Giftcard'; +$_['name_mollie_inghomepay'] = 'ING Home\'pay'; +$_['name_mollie_eps'] = 'EPS'; +$_['name_mollie_giropay'] = 'Giropay'; +$_['name_mollie_klarnapaylater'] = 'Klarna Pay Later'; +$_['name_mollie_klarnasliceit'] = 'Klarna Slice It'; +$_['name_mollie_przelewy24'] = 'P24'; + +// Text +$_['text_edit'] = "Edit"; +$_['text_payment'] = "Payment"; +$_['text_success'] = "Success: You have successfully modified your Mollie settings!"; +$_['text_missing_api_key'] = "Please fill out your API key in the Settings tab."; +$_['text_activate_payment_method'] = 'Enable this payment method in your Mollie dashboard.'; +$_['text_no_status_id'] = "- Do not update the order status (not recommended) -"; + +// Entry +$_['entry_payment_method'] = "Payment method"; +$_['entry_activate'] = "Activate"; +$_['entry_sort_order'] = "Sort order"; +$_['entry_api_key'] = "API key"; +$_['entry_description'] = "Description"; +$_['entry_show_icons'] = "Show icons"; +$_['entry_show_order_canceled_page'] = "Show message if payment is cancelled"; +$_['entry_geo_zone'] = "Geo Zone"; + +// Help +$_['help_view_profile'] = 'You can find your API key in your Mollie website profiles.'; +$_['help_status'] = "Activate the module"; +$_['help_api_key'] = 'Enter the api_key of the website profile you want to use. The API key starts with test_ or live_.'; +$_['help_description'] = 'This description will appear on the bank / card statement of your customer. You may use a maximum of 29 characters. TIP: Use %, this will be replaced by the order id of the payment. Don\'t forget % can be multiple characters long!'; +$_['help_show_icons'] = 'Show icons next to the Mollie payment methods on the checkout page.'; +$_['help_show_order_canceled_page'] = 'Show a message to the customer if a payment is cancelled, before redirecting the customer back to their shopping cart.'; + +// Info +$_['entry_module'] = "Module"; +$_['entry_mod_status'] = "Module status"; +$_['entry_comm_status'] = "Communication status"; +$_['entry_support'] = "Support"; + +$_['entry_version'] = 'Mollie Opencart'; + +// Error +$_['error_permission'] = "Warning: You don't have permission to modify the Mollie payment methods."; +$_['error_api_key'] = "Mollie API key is required!"; +$_['error_api_key_invalid'] = "Invalid API key!"; +$_['error_description'] = "Description is required!"; +$_['error_file_missing'] = "File does not exist"; + +// Status +$_['entry_pending_status'] = "Payment created status"; +$_['entry_failed_status'] = "Payment failed status"; +$_['entry_canceled_status'] = "Payment canceled status"; +$_['entry_expired_status'] = "Payment expired status"; +$_['entry_processing_status'] = "Payment successful status"; + +$_['entry_shipping_status'] = "Order shipped status"; +$_['entry_shipment'] = "Create shipment"; +$_['entry_create_shipment_status'] = "Create shipment after order status"; +$_['help_shipment'] = "Shipment(For klarna methods only) will be created right after creating order. Select 'No' to create shipment when order reach to a specific status and select the order status from below."; + +$_['text_create_shipment_automatically'] = "Create shipment automatically upon order creation"; +$_['text_create_shipment_on_status'] = "Create shipment upon setting order to this status"; +$_['text_create_shipment_on_order_complete'] = "Create shipment upon setting order to order complete status"; +$_['entry_create_shipment_on_order_complete'] = "Create shipment upon order complete"; + +//Button +$_['button_update'] = "Update"; diff --git a/admin/language/english/payment/mollie_bancontact.php b/admin/language/english/payment/mollie_bancontact.php new file mode 100644 index 00000000..4a1a8110 --- /dev/null +++ b/admin/language/english/payment/mollie_bancontact.php @@ -0,0 +1,4 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +// These are called automatically by the Payment modules list - do not change the names +$method_list_logo = 'Mollie'; +$_['text_mollie_banktransfer'] = $method_list_logo; +$_['text_mollie_belfius'] = $method_list_logo; +$_['text_mollie_creditcard'] = $method_list_logo; +$_['text_mollie_directdebit'] = $method_list_logo; +$_['text_mollie_ideal'] = $method_list_logo; +$_['text_mollie_kbc'] = $method_list_logo; +$_['text_mollie_mistercash'] = $method_list_logo; +$_['text_mollie_paypal'] = $method_list_logo; +$_['text_mollie_paysafecard'] = $method_list_logo; +$_['text_mollie_sofort'] = $method_list_logo; +$_['text_mollie_giftcard'] = $method_list_logo; +$_['text_mollie_inghomepay'] = $method_list_logo; +$_['text_mollie_eps'] = $method_list_logo; +$_['text_mollie_giropay'] = $method_list_logo; +$_['text_mollie_klarnapaylater'] = $method_list_logo; +$_['text_mollie_klarnasliceit'] = $method_list_logo; +$_['text_mollie_przelewy24'] = $method_list_logo; + +// Heading +$_['heading_title'] = "Mollie"; +$_['title_global_options'] = "Ajustes"; +$_['title_payment_status'] = "Estados de pago"; +$_['title_mod_about'] = "Acerca de este módulo"; +$_['footer_text'] = "Servicios de pago"; + +// Module names +$_['name_mollie_banktransfer'] = "Transferencia bancaria"; +$_['name_mollie_belfius'] = "Belfius Direct Net"; +$_['name_mollie_creditcard'] = "Creditcard"; +$_['name_mollie_directdebit'] = "Adeudo bancario"; +$_['name_mollie_ideal'] = "iDEAL"; +$_['name_mollie_kbc'] = "KBC/CBC-Betaalknop"; +$_['name_mollie_mistercash'] = "Bancontact/MisterCash"; +$_['name_mollie_paypal'] = "PayPal"; +$_['name_mollie_paysafecard'] = "paysafecard"; +$_['name_mollie_sofort'] = "SOFORT Banking"; +$_['name_mollie_giftcard'] = 'Giftcard'; +$_['name_mollie_inghomepay'] = 'ING Home\'Pay'; +$_['name_mollie_eps'] = 'EPS'; +$_['name_mollie_giropay'] = 'Giropay'; +$_['name_mollie_klarnapaylater'] = 'Klarna Pay Later'; +$_['name_mollie_klarnasliceit'] = 'Klarna Slice It'; +$_['name_mollie_przelewy24'] = 'P24'; + +// Text +$_['text_edit'] = "Corregir Mollie"; +$_['text_payment'] = "Pago"; +$_['text_success'] = "Realizado con éxito: ¡los ajustes para el módulo han sido modificados!"; +$_['text_missing_api_key'] = "Por favor, complete su clave API en la pestaña Configuración."; +$_['text_activate_payment_method'] = 'Active esta forma de pago a través del panel de control de Mollie.'; +$_['text_no_status_id'] = "- No cambiar de estado (no recomendado) -"; + +// Entry +$_['entry_payment_method'] = "Método de pago"; +$_['entry_activate'] = "Activar"; +$_['entry_sort_order'] = "Orden de clasificación"; +$_['entry_api_key'] = "Clave API"; +$_['entry_description'] = "Descripción"; +$_['entry_show_icons'] = "Mostrar iconos"; +$_['entry_show_order_canceled_page'] = "Mostrar notificación en caso de cancelación de pagos"; +$_['entry_geo_zone'] = "Zona Geo"; + + +// Help +$_['help_view_profile'] = 'Puede encontrar su clave API en sus +perfiles de la web de Mollie.'; +$_['help_status'] = "Activar módulo"; +$_['help_api_key'] = "Introduzca aquí la clave_api del perfil de la web que desea utilizar. La clave API comienza con test_ o live_."; +$_['help_description'] = "La descripción aparecerá en el estado de cuenta de su cliente y se puede encontrar en la administración de Mollie. Puede utilizar hasta 29 caracteres. CONSEJO: Use%, que será reemplazado por el número de pedido. ¡El número de pedido puede tener algunos caracteres más!"; +$_['help_show_icons'] = "Mostrar iconos junto a los métodos de pago de Mollie en la página de pago."; +$_['help_show_order_canceled_page'] = "Mostrar una notificación al cliente si un pago es cancelado, antes de redirigir al cliente de nuevo a la cesta de la compra."; + +// Info +$_['entry_module'] = "Module"; +$_['entry_mod_status'] = "Modulestatus"; +$_['entry_comm_status'] = "Estado de comunicación"; +$_['entry_support'] = "Ayuda"; + +$_['entry_version'] = 'Mollie Opencart'; + +// Error +$_['error_permission'] = "Advertencia: no tienes permiso para modificar el módulo."; +$_['error_api_key'] = "¡La clave API de Mollie es obligatoria!"; +$_['error_api_key_invalid'] = "¡Clave inválida de Mollie API!"; +$_['error_description'] = "¡La descripción es obligatoria!"; +$_['error_file_missing'] = "El archivo no existe"; + +// Status +$_['entry_pending_status'] = "¡Clave de API Mollie inválida!"; +$_['entry_failed_status'] = "Estado de pago creado"; +$_['entry_canceled_status'] = "Estado del pago fallido"; +$_['entry_expired_status'] = "Estado del pago cancelado"; +$_['entry_processing_status']= "Estado del pago vencido"; + +$_['entry_shipping_status'] = "Estado del pedido enviado"; +$_['entry_shipment'] = "Crear envío"; +$_['entry_create_shipment_status'] = "Crear envío después del estado del pedido"; +$_['help_shipment'] = "El envío (solo para los métodos de klarna) se creará justo después de crear el pedido. Seleccione 'No' para crear el envío cuando el pedido llegue a un estado específico y seleccione el estado del pedido a continuación."; + +$_['text_create_shipment_automatically'] = "Crear envío automáticamente al crear el pedido"; +$_['text_create_shipment_on_status'] = "Crear envío al establecer orden a este estado"; +$_['text_create_shipment_on_order_complete'] = "Crear envío al establecer orden para ordenar estado completo"; +$_['entry_create_shipment_on_order_complete'] = "Crear envío al completar el pedido"; + +//Button +$_['button_update'] = "Actualizar"; diff --git a/admin/language/es-es/payment/mollie_banktransfer.php b/admin/language/es-es/payment/mollie_banktransfer.php new file mode 100644 index 00000000..8a40e816 --- /dev/null +++ b/admin/language/es-es/payment/mollie_banktransfer.php @@ -0,0 +1,4 @@ + - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -// These are called automatically by the Payment modules list - do not change the names -$method_list_logo = 'Mollie'; -$_['text_mollie_banktransfer'] = $method_list_logo; -$_['text_mollie_belfius'] = $method_list_logo; -$_['text_mollie_bitcoin'] = $method_list_logo; -$_['text_mollie_creditcard'] = $method_list_logo; -$_['text_mollie_directdebit'] = $method_list_logo; -$_['text_mollie_ideal'] = $method_list_logo; -$_['text_mollie_kbc'] = $method_list_logo; -$_['text_mollie_mistercash'] = $method_list_logo; -$_['text_mollie_paypal'] = $method_list_logo; -$_['text_mollie_paysafecard'] = $method_list_logo; -$_['text_mollie_sofort'] = $method_list_logo; - -// Heading -$_['heading_title'] = "Mollie"; -$_['title_global_options'] = "Pour tous les modules Mollie"; -$_['title_payment_status'] = "États de paiement"; -$_['title_mod_about'] = "Sur ce module"; -$_['footer_text'] = "Services paiement"; - -// Module names -$_['name_mollie_banktransfer'] = "Virement bancaire"; -$_['name_mollie_belfius'] = "Belfius Direct Net"; -$_['name_mollie_bitcoin'] = "Bitcoin"; -$_['name_mollie_creditcard'] = "Creditcard"; -$_['name_mollie_directdebit'] = "Débit direct"; -$_['name_mollie_ideal'] = "iDEAL"; -$_['name_mollie_kbc'] = "Bouton de paiement KBC/CBC"; -$_['name_mollie_mistercash'] = "Bancontact/MisterCash"; -$_['name_mollie_paypal'] = "PayPal"; -$_['name_mollie_paysafecard'] = "paysafecard"; -$_['name_mollie_sofort'] = "SOFORT Banking"; - -// Text -$_['text_edit'] = "Éditer Mollie"; -$_['text_payment'] = "Paiement"; -$_['text_success'] = "Succès: Vous avez réussi à modifier les paramètres Mollie!"; -$_['text_missing_api_key'] = "Remplir votre clé API ci-dessous."; -$_['text_activate_payment_method'] = 'Activer ce mode de paiement via le Mollie dashboard.'; -$_['text_no_status_id'] = '- Ne pas mettre à jour le statut (non recommandé) -'; - -// Entry -$_['entry_payment_method'] = "Procédé de paiement"; -$_['entry_activate'] = "Activate"; -$_['entry_sort_order'] = "Ordre de triage"; -$_['entry_status'] = "État"; -$_['entry_api_key'] = "Clé API"; -$_['entry_description'] = "Description"; -$_['entry_show_icons'] = "Afficher des icônes"; -$_['entry_show_order_canceled_page'] = "Afficher un message si le paiement est annulé"; - -// Help -$_['help_view_profile'] = 'Vous pouvez trouver votre clé API dans vos profils de site à Mollie.'; -$_['help_status'] = "Activer le module"; -$_['help_api_key'] = 'Entrer ici le api_key du profil que vous souhaitez utiliser. Le clé API commence par test_ ou live_.'; -$_['help_description'] = 'Cette description apparaîtra sur le relevé bancaire de votre client. Vous pouvez utiliser un maximum de 29 caractères. ASTUCE: Utilisez le %, il sera remplacé par l\'id de la commande du paiement. N\'oubliez pas que %/code> peut devenir plusieurs caractères!'; -$_['help_show_icons'] = 'Afficher les icônes à côté des méthodes de paiement Mollie sur la page de paiement.'; -$_['help_show_order_canceled_page'] = 'Afficher un message au client si un paiement est annulé, avant de rediriger le client vers leur panier.'; - -// Info -$_['entry_module'] = "Module"; -$_['entry_mod_status'] = "État du module"; -$_['entry_comm_status'] = "État de la communication"; -$_['entry_support'] = "Assistance"; - -$_['entry_version'] = 'MollieOpenCart'; - -// Error -$_['error_permission'] = "Attention: Vous n'avez pas l'autorisation de modifier les méthodes de paiement Mollie."; -$_['error_api_key'] = "La clé API est nécessaire!"; -$_['error_api_key_invalid'] = "La clé API est invalide!"; -$_['error_description'] = "Description est nécessaire!"; -$_['error_file_missing'] = "Fichier ne existe pas"; - -// Status -$_['entry_pending_status'] = "État de paiement attente"; -$_['entry_failed_status'] = "État de paiement échoué"; -$_['entry_canceled_status'] = "État de paiement annulé"; -$_['entry_expired_status'] = "État de paiement expiré"; -$_['entry_processing_status'] = "État de paiement traitement"; + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/admin/language/fr-fr/extension/payment/mollie_bancontact.php b/admin/language/fr-fr/extension/payment/mollie_bancontact.php new file mode 100644 index 00000000..4d68cb30 --- /dev/null +++ b/admin/language/fr-fr/extension/payment/mollie_bancontact.php @@ -0,0 +1,2 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +// These are called automatically by the Payment modules list - do not change the names +$method_list_logo = 'Mollie'; +$_['text_mollie_banktransfer'] = $method_list_logo; +$_['text_mollie_belfius'] = $method_list_logo; +$_['text_mollie_creditcard'] = $method_list_logo; +$_['text_mollie_directdebit'] = $method_list_logo; +$_['text_mollie_ideal'] = $method_list_logo; +$_['text_mollie_kbc'] = $method_list_logo; +$_['text_mollie_bancontact'] = $method_list_logo; +$_['text_mollie_paypal'] = $method_list_logo; +$_['text_mollie_paysafecard'] = $method_list_logo; +$_['text_mollie_sofort'] = $method_list_logo; +$_['text_mollie_giftcard'] = $method_list_logo; +$_['text_mollie_inghomepay'] = $method_list_logo; +$_['text_mollie_eps'] = $method_list_logo; +$_['text_mollie_giropay'] = $method_list_logo; +$_['text_mollie_klarnapaylater'] = $method_list_logo; +$_['text_mollie_klarnasliceit'] = $method_list_logo; +$_['text_mollie_przelewy24'] = $method_list_logo; + +// Heading +$_['heading_title'] = "Mollie"; +$_['title_global_options'] = "Paramètres"; +$_['title_payment_status'] = "États de paiement"; +$_['title_mod_about'] = "Sur ce module"; +$_['footer_text'] = "Services paiement"; + +// Module names +$_['name_mollie_banktransfer'] = "Virement bancaire"; +$_['name_mollie_belfius'] = "Belfius Direct Net"; +$_['name_mollie_creditcard'] = "Creditcard"; +$_['name_mollie_directdebit'] = "Débit direct"; +$_['name_mollie_ideal'] = "iDEAL"; +$_['name_mollie_kbc'] = "Bouton de paiement KBC/CBC"; +$_['name_mollie_bancontact'] = "Bancontact"; +$_['name_mollie_paypal'] = "PayPal"; +$_['name_mollie_paysafecard'] = "paysafecard"; +$_['name_mollie_sofort'] = "SOFORT Banking"; +$_['name_mollie_giftcard'] = 'Giftcard'; +$_['name_mollie_inghomepay'] = 'ING Home\'pay'; +$_['name_mollie_eps'] = 'EPS'; +$_['name_mollie_giropay'] = 'Giropay'; +$_['name_mollie_klarnapaylater'] = 'Klarna Pay Later'; +$_['name_mollie_klarnasliceit'] = 'Klarna Slice It'; +$_['name_mollie_przelewy24'] = 'P24'; + +// Text +$_['text_edit'] = "Éditer Mollie"; +$_['text_payment'] = "Paiement"; +$_['text_success'] = "Succès: Vous avez réussi à modifier les paramètres Mollie!"; +$_['text_missing_api_key'] = "S'il vous plaît remplir votre clé API dans l'onglet Paramètres."; +$_['text_activate_payment_method'] = 'Activer ce mode de paiement via le Mollie dashboard.'; +$_['text_no_status_id'] = '- Ne pas mettre à jour le statut (non recommandé) -'; + +// Entry +$_['entry_payment_method'] = "Procédé de paiement"; +$_['entry_activate'] = "Activate"; +$_['entry_sort_order'] = "Ordre de triage"; +$_['entry_api_key'] = "Clé API"; +$_['entry_description'] = "Description"; +$_['entry_show_icons'] = "Afficher des icônes"; +$_['entry_show_order_canceled_page'] = "Afficher un message si le paiement est annulé"; + +// Help +$_['help_view_profile'] = 'Vous pouvez trouver votre clé API dans vos profils de site à Mollie.'; +$_['help_status'] = "Activer le module"; +$_['help_api_key'] = 'Entrer ici le api_key du profil que vous souhaitez utiliser. Le clé API commence par test_ ou live_.'; +$_['help_description'] = 'Cette description apparaîtra sur le relevé bancaire de votre client. Vous pouvez utiliser un maximum de 29 caractères. ASTUCE: Utilisez le %, il sera remplacé par l\'id de la commande du paiement. N\'oubliez pas que %/code> peut devenir plusieurs caractères!'; +$_['help_show_icons'] = 'Afficher les icônes à côté des méthodes de paiement Mollie sur la page de paiement.'; +$_['help_show_order_canceled_page'] = 'Afficher un message au client si un paiement est annulé, avant de rediriger le client vers leur panier.'; + +// Info +$_['entry_module'] = "Module"; +$_['entry_mod_status'] = "État du module"; +$_['entry_comm_status'] = "État de la communication"; +$_['entry_support'] = "Assistance"; + +$_['entry_version'] = 'MollieOpenCart'; + +// Error +$_['error_permission'] = "Attention: Vous n'avez pas l'autorisation de modifier les méthodes de paiement Mollie."; +$_['error_api_key'] = "La clé API est nécessaire!"; +$_['error_api_key_invalid'] = "La clé API est invalide!"; +$_['error_description'] = "Description est nécessaire!"; +$_['error_file_missing'] = "Fichier ne existe pas"; + +// Status +$_['entry_pending_status'] = "État de paiement attente"; +$_['entry_failed_status'] = "État de paiement échoué"; +$_['entry_canceled_status'] = "État de paiement annulé"; +$_['entry_expired_status'] = "État de paiement expiré"; +$_['entry_processing_status'] = "État de paiement traitement"; + +$_['entry_shipping_status'] = "Statut de la commande expédiée"; +$_['entry_shipment'] = "Créer un envoi"; +$_['entry_create_shipment_status'] = "Créer un envoi après le statut de la commande"; +$_['help_shipment'] = "Envoi (pour les méthodes klarna uniquement) sera créé juste après la création de la commande. Sélectionnez «Non» pour créer une expédition lorsque la commande atteint un statut spécifique et sélectionnez le statut de la commande ci-dessous."; + +$_['text_create_shipment_automatically'] = "Créer automatiquement l'envoi lors de la création de la commande"; +$_['text_create_shipment_on_status'] = "Créer un envoi lors du réglage de la commande à ce statut"; +$_['text_create_shipment_on_order_complete'] = "Créer une expédition lors du paramétrage de la commande pour passer à la commande"; +$_['entry_create_shipment_on_order_complete'] = "Créer une expédition à la fin de la commande"; + +//Button +$_['button_update'] = "Mettre à jour"; diff --git a/admin/language/fr-fr/payment/mollie_bancontact.php b/admin/language/fr-fr/payment/mollie_bancontact.php new file mode 100644 index 00000000..4a1a8110 --- /dev/null +++ b/admin/language/fr-fr/payment/mollie_bancontact.php @@ -0,0 +1,4 @@ + - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -// These are called automatically by the Payment modules list - do not change the names -$method_list_logo = 'Mollie'; -$_['text_mollie_banktransfer'] = $method_list_logo; -$_['text_mollie_belfius'] = $method_list_logo; -$_['text_mollie_bitcoin'] = $method_list_logo; -$_['text_mollie_creditcard'] = $method_list_logo; -$_['text_mollie_directdebit'] = $method_list_logo; -$_['text_mollie_ideal'] = $method_list_logo; -$_['text_mollie_kbc'] = $method_list_logo; -$_['text_mollie_mistercash'] = $method_list_logo; -$_['text_mollie_paypal'] = $method_list_logo; -$_['text_mollie_paysafecard'] = $method_list_logo; -$_['text_mollie_sofort'] = $method_list_logo; - -// Heading -$_['heading_title'] = "Mollie"; -$_['title_global_options'] = "Pour tous les modules Mollie"; -$_['title_payment_status'] = "États de paiement"; -$_['title_mod_about'] = "Sur ce module"; -$_['footer_text'] = "Services paiement"; - -// Module names -$_['name_mollie_banktransfer'] = "Virement bancaire"; -$_['name_mollie_belfius'] = "Belfius Direct Net"; -$_['name_mollie_bitcoin'] = "Bitcoin"; -$_['name_mollie_creditcard'] = "Creditcard"; -$_['name_mollie_directdebit'] = "Débit direct"; -$_['name_mollie_ideal'] = "iDEAL"; -$_['name_mollie_kbc'] = "Bouton de paiement KBC/CBC"; -$_['name_mollie_mistercash'] = "Bancontact/MisterCash"; -$_['name_mollie_paypal'] = "PayPal"; -$_['name_mollie_paysafecard'] = "paysafecard"; -$_['name_mollie_sofort'] = "SOFORT Banking"; - -// Text -$_['text_edit'] = "Éditer Mollie"; -$_['text_payment'] = "Paiement"; -$_['text_success'] = "Succès: Vous avez réussi à modifier les paramètres Mollie!"; -$_['text_missing_api_key'] = "Remplir votre clé API ci-dessous."; -$_['text_activate_payment_method'] = 'Activer ce mode de paiement via le Mollie dashboard.'; -$_['text_no_status_id'] = '- Ne pas mettre à jour le statut (non recommandé) -'; - -// Entry -$_['entry_payment_method'] = "Procédé de paiement"; -$_['entry_activate'] = "Activate"; -$_['entry_sort_order'] = "Ordre de triage"; -$_['entry_status'] = "État"; -$_['entry_api_key'] = "Clé API"; -$_['entry_description'] = "Description"; -$_['entry_show_icons'] = "Afficher des icônes"; -$_['entry_show_order_canceled_page'] = "Afficher un message si le paiement est annulé"; - -// Help -$_['help_view_profile'] = 'Vous pouvez trouver votre clé API dans vos profils de site à Mollie.'; -$_['help_status'] = "Activer le module"; -$_['help_api_key'] = 'Entrer ici le api_key du profil que vous souhaitez utiliser. Le clé API commence par test_ ou live_.'; -$_['help_description'] = 'Cette description apparaîtra sur le relevé bancaire de votre client. Vous pouvez utiliser un maximum de 29 caractères. ASTUCE: Utilisez le %, il sera remplacé par l\'id de la commande du paiement. N\'oubliez pas que %/code> peut devenir plusieurs caractères!'; -$_['help_show_icons'] = 'Afficher les icônes à côté des méthodes de paiement Mollie sur la page de paiement.'; -$_['help_show_order_canceled_page'] = 'Afficher un message au client si un paiement est annulé, avant de rediriger le client vers leur panier.'; - -// Info -$_['entry_module'] = "Module"; -$_['entry_mod_status'] = "État du module"; -$_['entry_comm_status'] = "État de la communication"; -$_['entry_support'] = "Assistance"; - -$_['entry_version'] = 'MollieOpenCart'; - -// Error -$_['error_permission'] = "Attention: Vous n'avez pas l'autorisation de modifier les méthodes de paiement Mollie."; -$_['error_api_key'] = "La clé API est nécessaire!"; -$_['error_api_key_invalid'] = "La clé API est invalide!"; -$_['error_description'] = "Description est nécessaire!"; -$_['error_file_missing'] = "Fichier ne existe pas"; - -// Status -$_['entry_pending_status'] = "État de paiement attente"; -$_['entry_failed_status'] = "État de paiement échoué"; -$_['entry_canceled_status'] = "État de paiement annulé"; -$_['entry_expired_status'] = "État de paiement expiré"; -$_['entry_processing_status'] = "État de paiement traitement"; + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/admin/language/french/extension/payment/mollie_bancontact.php b/admin/language/french/extension/payment/mollie_bancontact.php new file mode 100644 index 00000000..4d68cb30 --- /dev/null +++ b/admin/language/french/extension/payment/mollie_bancontact.php @@ -0,0 +1,2 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +// These are called automatically by the Payment modules list - do not change the names +$method_list_logo = 'Mollie'; +$_['text_mollie_banktransfer'] = $method_list_logo; +$_['text_mollie_belfius'] = $method_list_logo; +$_['text_mollie_creditcard'] = $method_list_logo; +$_['text_mollie_directdebit'] = $method_list_logo; +$_['text_mollie_ideal'] = $method_list_logo; +$_['text_mollie_kbc'] = $method_list_logo; +$_['text_mollie_bancontact'] = $method_list_logo; +$_['text_mollie_paypal'] = $method_list_logo; +$_['text_mollie_paysafecard'] = $method_list_logo; +$_['text_mollie_sofort'] = $method_list_logo; +$_['text_mollie_giftcard'] = $method_list_logo; +$_['text_mollie_inghomepay'] = $method_list_logo; +$_['text_mollie_eps'] = $method_list_logo; +$_['text_mollie_giropay'] = $method_list_logo; +$_['text_mollie_klarnapaylater'] = $method_list_logo; +$_['text_mollie_klarnasliceit'] = $method_list_logo; +$_['text_mollie_przelewy24'] = $method_list_logo; + +// Heading +$_['heading_title'] = "Mollie"; +$_['title_global_options'] = "Paramètres"; +$_['title_payment_status'] = "États de paiement"; +$_['title_mod_about'] = "Sur ce module"; +$_['footer_text'] = "Services paiement"; + +// Module names +$_['name_mollie_banktransfer'] = "Virement bancaire"; +$_['name_mollie_belfius'] = "Belfius Direct Net"; +$_['name_mollie_creditcard'] = "Creditcard"; +$_['name_mollie_directdebit'] = "Débit direct"; +$_['name_mollie_ideal'] = "iDEAL"; +$_['name_mollie_kbc'] = "Bouton de paiement KBC/CBC"; +$_['name_mollie_bancontact'] = "Bancontact"; +$_['name_mollie_paypal'] = "PayPal"; +$_['name_mollie_paysafecard'] = "paysafecard"; +$_['name_mollie_sofort'] = "SOFORT Banking"; +$_['name_mollie_giftcard'] = 'Giftcard'; +$_['name_mollie_inghomepay'] = 'ING Home\'pay'; +$_['name_mollie_eps'] = 'EPS'; +$_['name_mollie_giropay'] = 'Giropay'; +$_['name_mollie_klarnapaylater'] = 'Klarna Pay Later'; +$_['name_mollie_klarnasliceit'] = 'Klarna Slice It'; +$_['name_mollie_przelewy24'] = 'P24'; + +// Text +$_['text_edit'] = "Éditer Mollie"; +$_['text_payment'] = "Paiement"; +$_['text_success'] = "Succès: Vous avez réussi à modifier les paramètres Mollie!"; +$_['text_missing_api_key'] = "S'il vous plaît remplir votre clé API dans l'onglet Paramètres."; +$_['text_activate_payment_method'] = 'Activer ce mode de paiement via le Mollie dashboard.'; +$_['text_no_status_id'] = '- Ne pas mettre à jour le statut (non recommandé) -'; + +// Entry +$_['entry_payment_method'] = "Procédé de paiement"; +$_['entry_activate'] = "Activate"; +$_['entry_sort_order'] = "Ordre de triage"; +$_['entry_api_key'] = "Clé API"; +$_['entry_description'] = "Description"; +$_['entry_show_icons'] = "Afficher des icônes"; +$_['entry_show_order_canceled_page'] = "Afficher un message si le paiement est annulé"; + +// Help +$_['help_view_profile'] = 'Vous pouvez trouver votre clé API dans vos profils de site à Mollie.'; +$_['help_status'] = "Activer le module"; +$_['help_api_key'] = 'Entrer ici le api_key du profil que vous souhaitez utiliser. Le clé API commence par test_ ou live_.'; +$_['help_description'] = 'Cette description apparaîtra sur le relevé bancaire de votre client. Vous pouvez utiliser un maximum de 29 caractères. ASTUCE: Utilisez le %, il sera remplacé par l\'id de la commande du paiement. N\'oubliez pas que %/code> peut devenir plusieurs caractères!'; +$_['help_show_icons'] = 'Afficher les icônes à côté des méthodes de paiement Mollie sur la page de paiement.'; +$_['help_show_order_canceled_page'] = 'Afficher un message au client si un paiement est annulé, avant de rediriger le client vers leur panier.'; + +// Info +$_['entry_module'] = "Module"; +$_['entry_mod_status'] = "État du module"; +$_['entry_comm_status'] = "État de la communication"; +$_['entry_support'] = "Assistance"; + +$_['entry_version'] = 'MollieOpenCart'; + +// Error +$_['error_permission'] = "Attention: Vous n'avez pas l'autorisation de modifier les méthodes de paiement Mollie."; +$_['error_api_key'] = "La clé API est nécessaire!"; +$_['error_api_key_invalid'] = "La clé API est invalide!"; +$_['error_description'] = "Description est nécessaire!"; +$_['error_file_missing'] = "Fichier ne existe pas"; + +// Status +$_['entry_pending_status'] = "État de paiement attente"; +$_['entry_failed_status'] = "État de paiement échoué"; +$_['entry_canceled_status'] = "État de paiement annulé"; +$_['entry_expired_status'] = "État de paiement expiré"; +$_['entry_processing_status'] = "État de paiement traitement"; + +$_['entry_shipping_status'] = "Statut de la commande expédiée"; +$_['entry_shipment'] = "Créer un envoi"; +$_['entry_create_shipment_status'] = "Créer un envoi après le statut de la commande"; +$_['help_shipment'] = "Envoi (pour les méthodes klarna uniquement) sera créé juste après la création de la commande. Sélectionnez «Non» pour créer une expédition lorsque la commande atteint un statut spécifique et sélectionnez le statut de la commande ci-dessous."; + +$_['text_create_shipment_automatically'] = "Créer automatiquement l'envoi lors de la création de la commande"; +$_['text_create_shipment_on_status'] = "Créer un envoi lors du réglage de la commande à ce statut"; +$_['text_create_shipment_on_order_complete'] = "Créer une expédition lors du paramétrage de la commande pour passer à la commande"; +$_['entry_create_shipment_on_order_complete'] = "Créer une expédition à la fin de la commande"; + +//Button +$_['button_update'] = "Mettre à jour"; diff --git a/admin/language/french/payment/mollie_bancontact.php b/admin/language/french/payment/mollie_bancontact.php new file mode 100644 index 00000000..4a1a8110 --- /dev/null +++ b/admin/language/french/payment/mollie_bancontact.php @@ -0,0 +1,4 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +// These are called automatically by the Payment modules list - do not change the names +$method_list_logo = 'Mollie'; +$_['text_mollie_banktransfer'] = $method_list_logo; +$_['text_mollie_belfius'] = $method_list_logo; +$_['text_mollie_creditcard'] = $method_list_logo; +$_['text_mollie_directdebit'] = $method_list_logo; +$_['text_mollie_ideal'] = $method_list_logo; +$_['text_mollie_kbc'] = $method_list_logo; +$_['text_mollie_mistercash'] = $method_list_logo; +$_['text_mollie_paypal'] = $method_list_logo; +$_['text_mollie_paysafecard'] = $method_list_logo; +$_['text_mollie_sofort'] = $method_list_logo; +$_['text_mollie_giftcard'] = $method_list_logo; +$_['text_mollie_inghomepay'] = $method_list_logo; +$_['text_mollie_eps'] = $method_list_logo; +$_['text_mollie_giropay'] = $method_list_logo; +$_['text_mollie_klarnapaylater'] = $method_list_logo; +$_['text_mollie_klarnasliceit'] = $method_list_logo; +$_['text_mollie_przelewy24'] = $method_list_logo; + +// Heading +$_['heading_title'] = "Mollie"; +$_['title_global_options'] = "Einstellungen"; +$_['title_payment_status'] = "Bezahlungs-Status"; +$_['title_mod_about'] = "Über dieses Modul"; +$_['footer_text'] = "Zahlungsdienste"; + +// Module names +$_['name_mollie_banktransfer'] = "Übertragung"; +$_['name_mollie_belfius'] = "Belfius Direct Net"; +$_['name_mollie_creditcard'] = "Creditcard"; +$_['name_mollie_directdebit'] = "Einmaliges Inkasso"; +$_['name_mollie_ideal'] = "iDEAL"; +$_['name_mollie_kbc'] = "KBC/CBC-Betaalknop"; +$_['name_mollie_mistercash'] = "Bancontact/MisterCash"; +$_['name_mollie_paypal'] = "PayPal"; +$_['name_mollie_paysafecard'] = "paysafecard"; +$_['name_mollie_sofort'] = "SOFORT Banking"; +$_['name_mollie_giftcard'] = 'Giftcard'; +$_['name_mollie_inghomepay'] = 'ING Home\'Pay'; +$_['name_mollie_eps'] = 'EPS'; +$_['name_mollie_giropay'] = 'Giropay'; +$_['name_mollie_klarnapaylater'] = 'Klarna Pay Later'; +$_['name_mollie_klarnasliceit'] = 'Klarna Slice It'; +$_['name_mollie_przelewy24'] = 'P24'; + +// Text +$_['text_edit'] = "Mollie bearbeiten"; +$_['text_payment'] = "Bezahlung"; +$_['text_success'] = "Erfolg: Die Einstellungen für dieses Modul wurden angepasst!"; +$_['text_missing_api_key'] = "Bitte füllen Sie Ihren API-Schlüssel auf der Registerkarte Einstellungen aus."; +$_['text_activate_payment_method'] = 'Aktivieren Sie diese Zahlungsart über das Mollie Dashboard.'; +$_['text_no_status_id'] = "- Status nicht ändern (nicht empfohlen) -"; + +// Entry +$_['entry_payment_method'] = "Zahlungsart"; +$_['entry_activate'] = "Aktivieren"; +$_['entry_sort_order'] = "Sortierreihenfolge"; +$_['entry_api_key'] = "API Key"; +$_['entry_description'] = "Beschreibung"; +$_['entry_show_icons'] = "Icons anzeigen"; +$_['entry_show_order_canceled_page'] = "Meldung bei annullierten Bezahlungen anzeigen"; +$_['entry_geo_zone'] = "Geo Zone"; + +// Help +$_['help_view_profile'] = 'Sie können Ihren API Key auf Ihren Mollie-Webseiten-Profilen finden.'; +$_['help_status'] = "Das Modul aktivieren"; +$_['help_api_key'] = "Geben Sie hier den api_key des Webseiten-Profils ein, das Sie verwenden wollen. Der API Key beginnt mit test_ oder live_."; +$_['help_description'] = "Die Beschreibung soll auf der Banküberweisung Ihres Kunden erscheinen und Sie können sie in der Mollie Verwaltung sehen. Sie können maximal 29 Zeichen verwenden. TIPP: Verwenden Sie %, dies wird durch die Auftragsnummer ersetzt werden. Die Auftragsnummer selbst kann auch mehrere Zeichen lang sein!"; +$_['help_show_icons'] = "Icons neben den Zahlungsarten von Mollie auf der Zahlungsseite anzeigen."; +$_['help_show_order_canceled_page'] = "Eine Meldung für den Kunden anzeigen, wenn eine Zahlung annulliert wurde, bevor der Kunde zurück zum Warenkorb verwiesen wird."; + +// Info +$_['entry_module'] = "Module"; +$_['entry_mod_status'] = "Modulestatus"; +$_['entry_comm_status'] = "Kommunikationsstatus"; +$_['entry_support'] = "Support"; + +$_['entry_version'] = 'Mollie Opencart'; + +// Error +$_['error_permission'] = "Warnung: Sie haben keine Berechtigung, das Modul zu bearbeiten."; +$_['error_api_key'] = "Mollie API Key ist verpflichtend!"; +$_['error_api_key_invalid'] = "Ungültiger Mollie API Key!"; +$_['error_description'] = "Die Beschreibung ist obligatorisch!"; +$_['error_file_missing'] = "Die Datei existiert nicht"; + +// Status +$_['entry_pending_status'] = "Status Zahlung erstellt"; +$_['entry_failed_status'] = "Status Zahlung fehlgeschlagen"; +$_['entry_canceled_status'] = "Status Zahlung annulliert"; +$_['entry_expired_status'] = "Status Zahlung verstrichen"; +$_['entry_processing_status']= "Status Zahlung erfolgreich"; + +$_['entry_shipping_status'] = "Versandstatus der Bestellung"; +$_['entry_shipment'] = "Sendung erstellen"; +$_['entry_create_shipment_status'] = "Erstellen Sie eine Sendung nach dem Bestellstatus"; +$_['help_shipment'] = "Versand (nur für Klarna-Methoden) wird direkt nach dem Erstellen der Bestellung erstellt. Wählen Sie 'Nein', um die Sendung zu erstellen, wenn die Bestellung einen bestimmten Status erreicht, und wählen Sie den Bestellstatus von unten aus."; + +$_['text_create_shipment_automatically'] = "Erstellen Sie den Versand automatisch bei der Auftragserstellung"; +$_['text_create_shipment_on_status'] = "Legen Sie eine Sendung an, wenn Sie den Auftrag auf diesen Status setzen"; +$_['text_create_shipment_on_order_complete'] = "Erstellen Sie eine Sendung, nachdem Sie den Status zum Bestellen der Bestellung festgelegt haben"; +$_['entry_create_shipment_on_order_complete'] = "Erstellen Sie den Versand nach Abschluss der Bestellung"; + +//Button +$_['button_update'] = "Aktualisieren"; diff --git a/admin/language/german/payment/mollie_banktransfer.php b/admin/language/german/payment/mollie_banktransfer.php new file mode 100644 index 00000000..8a40e816 --- /dev/null +++ b/admin/language/german/payment/mollie_banktransfer.php @@ -0,0 +1,4 @@ + - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -// These are called automatically by the Payment modules list - do not change the names -$method_list_logo = 'Mollie'; -$_['text_mollie_banktransfer'] = $method_list_logo; -$_['text_mollie_belfius'] = $method_list_logo; -$_['text_mollie_bitcoin'] = $method_list_logo; -$_['text_mollie_creditcard'] = $method_list_logo; -$_['text_mollie_directdebit'] = $method_list_logo; -$_['text_mollie_ideal'] = $method_list_logo; -$_['text_mollie_kbc'] = $method_list_logo; -$_['text_mollie_mistercash'] = $method_list_logo; -$_['text_mollie_paypal'] = $method_list_logo; -$_['text_mollie_paysafecard'] = $method_list_logo; -$_['text_mollie_sofort'] = $method_list_logo; - -// Heading -$_['heading_title'] = "Mollie"; -$_['title_global_options'] = "Opties voor alle Mollie-modules"; -$_['title_payment_status'] = "Betaalstatussen"; -$_['title_mod_about'] = "Over deze module"; -$_['footer_text'] = "Betaaldiensten"; - -// Module names -$_['name_mollie_banktransfer'] = "Overboeking"; -$_['name_mollie_belfius'] = "Belfius Direct Net"; -$_['name_mollie_bitcoin'] = "Bitcoin"; -$_['name_mollie_creditcard'] = "Creditcard"; -$_['name_mollie_directdebit'] = "Eenmalige incasso"; -$_['name_mollie_ideal'] = "iDEAL"; -$_['name_mollie_kbc'] = "KBC/CBC-Betaalknop"; -$_['name_mollie_mistercash'] = "Bancontact/MisterCash"; -$_['name_mollie_paypal'] = "PayPal"; -$_['name_mollie_paysafecard'] = "paysafecard"; -$_['name_mollie_sofort'] = "SOFORT Banking"; - -// Text -$_['text_edit'] = "Bewerk Mollie"; -$_['text_payment'] = "Betaling"; -$_['text_success'] = "Gelukt: de instellingen voor de module zijn aangepast!"; -$_['text_missing_api_key'] = "Vul hieronder de API-key in."; -$_['text_activate_payment_method'] = 'Activeer deze betaalmethode via het Mollie-dashboard.'; -$_['text_no_status_id'] = "- Status niet wijzigen (niet aanbevolen) -"; - -// Entry -$_['entry_payment_method'] = "Betaalmethode"; -$_['entry_activate'] = "Activeren"; -$_['entry_sort_order'] = "Sorteervolgorde"; -$_['entry_status'] = "Status"; -$_['entry_api_key'] = "API-sleutel"; -$_['entry_description'] = "Omschrijving"; -$_['entry_show_icons'] = "Toon icoontjes"; -$_['entry_show_order_canceled_page'] = "Toon melding bij geannuleerde betalingen"; - -// Help -$_['help_view_profile'] = 'U kunt uw API-sleutel vinden bij uw Mollie-websiteprofielen.'; -$_['help_status'] = "Activeer de module"; -$_['help_api_key'] = "Voer hier de api_key van het websiteprofiel in dat u wilt gebruiken. De API-sleutel begint met test_ of live_."; -$_['help_description'] = "De omschrijving zal op het bankafschrift van uw klant verschijnen en kunt u terugvinden in het Mollie beheer. U kunt maximaal 29 tekens gebruiken. TIP: Gebruik %, dit zal vervangen worden door het ordernummer. Het ordernummer kan zelf ook meerdere tekens lang zijn!"; -$_['help_show_icons'] = "Toon icoontjes naast de betaalmethodes van Mollie op de betaalpagina."; -$_['help_show_order_canceled_page'] = "Toon een melding aan de klant als een betaling geannuleerd wordt, alvorens de klant terug naar het winkelmandje te verwijzen."; - -// Info -$_['entry_module'] = "Module"; -$_['entry_mod_status'] = "Modulestatus"; -$_['entry_comm_status'] = "Communicatiestatus"; -$_['entry_support'] = "Support"; - -$_['entry_version'] = 'Mollie Opencart'; - -// Error -$_['error_permission'] = "Waarschuwing: U heeft geen toestemming om de module aan te passen."; -$_['error_api_key'] = "Mollie API-sleutel is verplicht!"; -$_['error_api_key_invalid'] = "Ongeldige Mollie API-sleutel!"; -$_['error_description'] = "De omschrijving is verplicht!"; -$_['error_file_missing'] = "Bestand bestaat niet"; - -// Status -$_['entry_pending_status'] = "Status betaling aangemaakt"; -$_['entry_failed_status'] = "Status betaling mislukt"; -$_['entry_canceled_status'] = "Status betaling geannuleerd"; -$_['entry_expired_status'] = "Status betaling verlopen"; -$_['entry_processing_status']= "Status betaling succesvol"; + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/admin/language/nl-nl/extension/payment/mollie_bancontact.php b/admin/language/nl-nl/extension/payment/mollie_bancontact.php new file mode 100644 index 00000000..4d68cb30 --- /dev/null +++ b/admin/language/nl-nl/extension/payment/mollie_bancontact.php @@ -0,0 +1,2 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +// These are called automatically by the Payment modules list - do not change the names +$method_list_logo = 'Mollie'; +$_['text_mollie_banktransfer'] = $method_list_logo; +$_['text_mollie_belfius'] = $method_list_logo; +$_['text_mollie_creditcard'] = $method_list_logo; +$_['text_mollie_directdebit'] = $method_list_logo; +$_['text_mollie_ideal'] = $method_list_logo; +$_['text_mollie_kbc'] = $method_list_logo; +$_['text_mollie_bancontact'] = $method_list_logo; +$_['text_mollie_paypal'] = $method_list_logo; +$_['text_mollie_paysafecard'] = $method_list_logo; +$_['text_mollie_sofort'] = $method_list_logo; +$_['text_mollie_giftcard'] = $method_list_logo; +$_['text_mollie_inghomepay'] = $method_list_logo; +$_['text_mollie_eps'] = $method_list_logo; +$_['text_mollie_giropay'] = $method_list_logo; +$_['text_mollie_klarnapaylater'] = $method_list_logo; +$_['text_mollie_klarnasliceit'] = $method_list_logo; +$_['text_mollie_przelewy24'] = $method_list_logo; + +// Heading +$_['heading_title'] = "Mollie"; +$_['title_global_options'] = "Instellingen"; +$_['title_payment_status'] = "Betaalstatussen"; +$_['title_mod_about'] = "Over deze module"; +$_['footer_text'] = "Betaaldiensten"; + +// Module names +$_['name_mollie_banktransfer'] = "Overboeking"; +$_['name_mollie_belfius'] = "Belfius Direct Net"; +$_['name_mollie_creditcard'] = "Creditcard"; +$_['name_mollie_directdebit'] = "Eenmalige incasso"; +$_['name_mollie_ideal'] = "iDEAL"; +$_['name_mollie_kbc'] = "KBC/CBC-Betaalknop"; +$_['name_mollie_bancontact'] = "Bancontact"; +$_['name_mollie_paypal'] = "PayPal"; +$_['name_mollie_paysafecard'] = "paysafecard"; +$_['name_mollie_sofort'] = "SOFORT Banking"; +$_['name_mollie_giftcard'] = 'Giftcard'; +$_['name_mollie_inghomepay'] = 'ING Home\'pay'; +$_['name_mollie_eps'] = 'EPS'; +$_['name_mollie_giropay'] = 'Giropay'; +$_['name_mollie_klarnapaylater'] = 'Klarna Pay Later'; +$_['name_mollie_klarnasliceit'] = 'Klarna Slice It'; +$_['name_mollie_przelewy24'] = 'P24'; + +// Text +$_['text_edit'] = "Bewerk Mollie"; +$_['text_payment'] = "Betaling"; +$_['text_success'] = "Gelukt: de instellingen voor de module zijn aangepast!"; +$_['text_missing_api_key'] = "Vul uw API-key in bij de Instellingen."; +$_['text_activate_payment_method'] = 'Activeer deze betaalmethode via het Mollie-dashboard.'; +$_['text_no_status_id'] = "- Status niet wijzigen (niet aanbevolen) -"; + +// Entry +$_['entry_payment_method'] = "Betaalmethode"; +$_['entry_activate'] = "Activeren"; +$_['entry_sort_order'] = "Sorteervolgorde"; +$_['entry_api_key'] = "API-sleutel"; +$_['entry_description'] = "Omschrijving"; +$_['entry_show_icons'] = "Toon icoontjes"; +$_['entry_show_order_canceled_page'] = "Toon melding bij geannuleerde betalingen"; +$_['entry_geo_zone'] = "Geo Zone"; + +// Help +$_['help_view_profile'] = 'U kunt uw API-sleutel vinden bij uw Mollie-websiteprofielen.'; +$_['help_status'] = "Activeer de module"; +$_['help_api_key'] = "Voer hier de api_key van het websiteprofiel in dat u wilt gebruiken. De API-sleutel begint met test_ of live_."; +$_['help_description'] = "De omschrijving zal op het bankafschrift van uw klant verschijnen en kunt u terugvinden in het Mollie beheer. U kunt maximaal 29 tekens gebruiken. TIP: Gebruik %, dit zal vervangen worden door het ordernummer. Het ordernummer kan zelf ook meerdere tekens lang zijn!"; +$_['help_show_icons'] = "Toon icoontjes naast de betaalmethodes van Mollie op de betaalpagina."; +$_['help_show_order_canceled_page'] = "Toon een melding aan de klant als een betaling geannuleerd wordt, alvorens de klant terug naar het winkelmandje te verwijzen."; + +// Info +$_['entry_module'] = "Module"; +$_['entry_mod_status'] = "Modulestatus"; +$_['entry_comm_status'] = "Communicatiestatus"; +$_['entry_support'] = "Support"; + +$_['entry_version'] = 'Mollie Opencart'; + +// Error +$_['error_permission'] = "Waarschuwing: U heeft geen toestemming om de module aan te passen."; +$_['error_api_key'] = "Mollie API-sleutel is verplicht!"; +$_['error_api_key_invalid'] = "Ongeldige Mollie API-sleutel!"; +$_['error_description'] = "De omschrijving is verplicht!"; +$_['error_file_missing'] = "Bestand bestaat niet"; + +// Status +$_['entry_pending_status'] = "Status betaling aangemaakt"; +$_['entry_failed_status'] = "Status betaling mislukt"; +$_['entry_canceled_status'] = "Status betaling geannuleerd"; +$_['entry_expired_status'] = "Status betaling verlopen"; +$_['entry_processing_status']= "Status betaling succesvol"; + +$_['entry_shipping_status'] = "Status bestelling verzonden"; +$_['entry_shipment'] = "Maak verzending"; +$_['entry_create_shipment_status'] = "Maak verzending aan na order status"; +$_['help_shipment'] = "Verzending (alleen voor Klarna-methoden) wordt direct na het maken van de bestelling gemaakt. Selecteer 'Nee' om een ​​zending te creëren wanneer de order een specifieke status bereikt en selecteer de bestelstatus van onder."; + +$_['text_create_shipment_automatically'] = "Maak automatisch een zending bij het maken van de bestelling"; +$_['text_create_shipment_on_status'] = "Maak verzending bij het plaatsen van de bestelling naar deze status"; +$_['text_create_shipment_on_order_complete'] = "Maak verzending bij het plaatsen van bestelling om de volledige status te bestellen"; +$_['entry_create_shipment_on_order_complete'] = "Maak verzending bij bestelling compleet"; + +//Button +$_['button_update'] = "Bijwerken"; diff --git a/admin/language/nl-nl/payment/mollie_bancontact.php b/admin/language/nl-nl/payment/mollie_bancontact.php new file mode 100644 index 00000000..4a1a8110 --- /dev/null +++ b/admin/language/nl-nl/payment/mollie_bancontact.php @@ -0,0 +1,4 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +// These are called automatically by the Payment modules list - do not change the names +$method_list_logo = 'Mollie'; +$_['text_mollie_banktransfer'] = $method_list_logo; +$_['text_mollie_belfius'] = $method_list_logo; +$_['text_mollie_creditcard'] = $method_list_logo; +$_['text_mollie_directdebit'] = $method_list_logo; +$_['text_mollie_ideal'] = $method_list_logo; +$_['text_mollie_kbc'] = $method_list_logo; +$_['text_mollie_mistercash'] = $method_list_logo; +$_['text_mollie_paypal'] = $method_list_logo; +$_['text_mollie_paysafecard'] = $method_list_logo; +$_['text_mollie_sofort'] = $method_list_logo; +$_['text_mollie_giftcard'] = $method_list_logo; +$_['text_mollie_inghomepay'] = $method_list_logo; +$_['text_mollie_eps'] = $method_list_logo; +$_['text_mollie_giropay'] = $method_list_logo; +$_['text_mollie_klarnapaylater'] = $method_list_logo; +$_['text_mollie_klarnasliceit'] = $method_list_logo; +$_['text_mollie_przelewy24'] = $method_list_logo; + +// Heading +$_['heading_title'] = "Mollie"; +$_['title_global_options'] = "Ajustes"; +$_['title_payment_status'] = "Estados de pago"; +$_['title_mod_about'] = "Acerca de este módulo"; +$_['footer_text'] = "Servicios de pago"; + +// Module names +$_['name_mollie_banktransfer'] = "Transferencia bancaria"; +$_['name_mollie_belfius'] = "Belfius Direct Net"; +$_['name_mollie_creditcard'] = "Creditcard"; +$_['name_mollie_directdebit'] = "Adeudo bancario"; +$_['name_mollie_ideal'] = "iDEAL"; +$_['name_mollie_kbc'] = "KBC/CBC-Betaalknop"; +$_['name_mollie_mistercash'] = "Bancontact/MisterCash"; +$_['name_mollie_paypal'] = "PayPal"; +$_['name_mollie_paysafecard'] = "paysafecard"; +$_['name_mollie_sofort'] = "SOFORT Banking"; +$_['name_mollie_giftcard'] = 'Giftcard'; +$_['name_mollie_inghomepay'] = 'ING Home\'Pay'; +$_['name_mollie_eps'] = 'EPS'; +$_['name_mollie_giropay'] = 'Giropay'; +$_['name_mollie_klarnapaylater'] = 'Klarna Pay Later'; +$_['name_mollie_klarnasliceit'] = 'Klarna Slice It'; +$_['name_mollie_przelewy24'] = 'P24'; + +// Text +$_['text_edit'] = "Corregir Mollie"; +$_['text_payment'] = "Pago"; +$_['text_success'] = "Realizado con éxito: ¡los ajustes para el módulo han sido modificados!"; +$_['text_missing_api_key'] = "Por favor, complete su clave API en la pestaña Configuración."; +$_['text_activate_payment_method'] = 'Active esta forma de pago a través del panel de control de Mollie.'; +$_['text_no_status_id'] = "- No cambiar de estado (no recomendado) -"; + +// Entry +$_['entry_payment_method'] = "Método de pago"; +$_['entry_activate'] = "Activar"; +$_['entry_sort_order'] = "Orden de clasificación"; +$_['entry_api_key'] = "Clave API"; +$_['entry_description'] = "Descripción"; +$_['entry_show_icons'] = "Mostrar iconos"; +$_['entry_show_order_canceled_page'] = "Mostrar notificación en caso de cancelación de pagos"; +$_['entry_geo_zone'] = "Zona Geo"; + + +// Help +$_['help_view_profile'] = 'Puede encontrar su clave API en sus +perfiles de la web de Mollie.'; +$_['help_status'] = "Activar módulo"; +$_['help_api_key'] = "Introduzca aquí la clave_api del perfil de la web que desea utilizar. La clave API comienza con test_ o live_."; +$_['help_description'] = "La descripción aparecerá en el estado de cuenta de su cliente y se puede encontrar en la administración de Mollie. Puede utilizar hasta 29 caracteres. CONSEJO: Use%, que será reemplazado por el número de pedido. ¡El número de pedido puede tener algunos caracteres más!"; +$_['help_show_icons'] = "Mostrar iconos junto a los métodos de pago de Mollie en la página de pago."; +$_['help_show_order_canceled_page'] = "Mostrar una notificación al cliente si un pago es cancelado, antes de redirigir al cliente de nuevo a la cesta de la compra."; + +// Info +$_['entry_module'] = "Module"; +$_['entry_mod_status'] = "Modulestatus"; +$_['entry_comm_status'] = "Estado de comunicación"; +$_['entry_support'] = "Ayuda"; + +$_['entry_version'] = 'Mollie Opencart'; + +// Error +$_['error_permission'] = "Advertencia: no tienes permiso para modificar el módulo."; +$_['error_api_key'] = "¡La clave API de Mollie es obligatoria!"; +$_['error_api_key_invalid'] = "¡Clave inválida de Mollie API!"; +$_['error_description'] = "¡La descripción es obligatoria!"; +$_['error_file_missing'] = "El archivo no existe"; + +// Status +$_['entry_pending_status'] = "¡Clave de API Mollie inválida!"; +$_['entry_failed_status'] = "Estado de pago creado"; +$_['entry_canceled_status'] = "Estado del pago fallido"; +$_['entry_expired_status'] = "Estado del pago cancelado"; +$_['entry_processing_status']= "Estado del pago vencido"; + +$_['entry_shipping_status'] = "Estado del pedido enviado"; +$_['entry_shipment'] = "Crear envío"; +$_['entry_create_shipment_status'] = "Crear envío después del estado del pedido"; +$_['help_shipment'] = "El envío (solo para los métodos de klarna) se creará justo después de crear el pedido. Seleccione 'No' para crear el envío cuando el pedido llegue a un estado específico y seleccione el estado del pedido a continuación."; + +$_['text_create_shipment_automatically'] = "Crear envío automáticamente al crear el pedido"; +$_['text_create_shipment_on_status'] = "Crear envío al establecer orden a este estado"; +$_['text_create_shipment_on_order_complete'] = "Crear envío al establecer orden para ordenar estado completo"; +$_['entry_create_shipment_on_order_complete'] = "Crear envío al completar el pedido"; + +//Button +$_['button_update'] = "Actualizar"; diff --git a/admin/language/spanish/payment/mollie_banktransfer.php b/admin/language/spanish/payment/mollie_banktransfer.php new file mode 100644 index 00000000..8a40e816 --- /dev/null +++ b/admin/language/spanish/payment/mollie_banktransfer.php @@ -0,0 +1,4 @@ +table("mollie_payments") + ->addField("mollie_order_id", "VARCHAR(32)") + ->update(); +}; \ No newline at end of file diff --git a/admin/view/template/extension/payment/mollie(max_1.5.6.4).tpl b/admin/view/template/extension/payment/mollie(max_1.5.6.4).tpl new file mode 100644 index 00000000..b727895b --- /dev/null +++ b/admin/view/template/extension/payment/mollie(max_1.5.6.4).tpl @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/admin/view/template/extension/payment/mollie.tpl b/admin/view/template/extension/payment/mollie.tpl index a5244ed4..35bbaf01 100644 --- a/admin/view/template/extension/payment/mollie.tpl +++ b/admin/view/template/extension/payment/mollie.tpl @@ -1,359 +1,3 @@ - - - -
- - -
- -
- - - -
-
-
- -
-

-
-
- -
- -
- -
- -
- -
- - - - - - - - - - $payment_method) { ?> - - - - - - - -
- - - - - checked style="cursor:pointer; display:none" /> - - -
- -

- - - - - - - - - - - - - - - - - - - - -
* %s', $entry_api_key, $help_api_key) ?> -
- - - -
* %s', $entry_description, $help_description) ?> -
- - - -
%s', $entry_show_icons, $help_show_icons) ?> - -
%s', $entry_show_order_canceled_page, $help_show_order_canceled_page) ?> - -
- -

- - - - - - - - - - - - - - - - - - - - - -
: - -
: - -
: - -
: - -
: - -
- -

- - - - - - - - - - - - - - - - - - - - - -
:
: - "; - } - } else { - echo $entry_mstatus; - } - ?> -
: - -
: - Mollie B.V. -
- Mollie

- © 2004- Mollie B.V. -
-
-
- -
-
-
-
-
- - - - - - - - - - \ No newline at end of file + include_once(__DIR__."/../../payment/mollie.tpl"); +?> \ No newline at end of file diff --git a/admin/view/template/extension/payment/mollie_2.tpl b/admin/view/template/extension/payment/mollie_2.tpl deleted file mode 100644 index ccaa5a62..00000000 --- a/admin/view/template/extension/payment/mollie_2.tpl +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - -
- -
- - -
- -
- - -
"> - - -
- - - -
- -
- - - -
- -

-
-
-

-
-
- -
-
-
-
-
-
- - $payment_method) { ?> -
-
-
- - -
-
- - checked style="cursor:pointer; display:none" /> -
-
- -
-
- - -
- - -
- - -
- - -
- -
-
- -
- - -
- - -
- -
-
- -
- - -
- -
-
- -
- - -
- -
-
-
- -
- - -
- - -
- -
-
- -
- - -
- -
-
- -
- - -
- -
-
- -
- - -
- -
-
- -
- - -
- -
-
-
- -
- - -
- - -
-

-
-
- -
- - -
-

- ', $error_file_missing, $file); - } - } else { - echo $entry_mstatus; - } - ?> -

-
-
- -
- - -
-

-
-
- -
- - - -
- -
-
- Mollie

- © 2004- Mollie B.V. -
-
-
-
-
-
- -
-
-
-
- diff --git a/admin/view/template/payment/mollie(max_1.5.6.4).tpl b/admin/view/template/payment/mollie(max_1.5.6.4).tpl new file mode 100644 index 00000000..cc3f48fa --- /dev/null +++ b/admin/view/template/payment/mollie(max_1.5.6.4).tpl @@ -0,0 +1,474 @@ + +
+ + + + + +
+ : +
+ + + + + + +
+ +
+ + +
+
+

+
+ + +
+
+
+
+ + + +
+
+ +
+
+ + + + + Support +
+ +
+
+
+
+
+
+
+ $payment_method) { ?> +
+
+ + +
+
+ + + + + + + + + style="cursor:pointer;" /> +
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+
+ -data-payment-mollie-api-key/> +
+ +
+ +
+
+
+ +
+ + +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+

+
+
+
+ +
+

+
+
+
+
+ Mollie

+ © 2004- Mollie + B.V. +
+
+
+ +
+
+ Module by Quality Works - Technical Support +
+ +
Tel: +31(0)85 7430150
E-mail: support.mollie@qualityworks.eu
Internet: www.qualityworks.eu +
+
+ Mollie - Support +
+
+
+ +
+ Contact +
+
+
+
+
+ +
+ + + +
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/admin/view/template/payment/mollie.tpl b/admin/view/template/payment/mollie.tpl new file mode 100644 index 00000000..ba326882 --- /dev/null +++ b/admin/view/template/payment/mollie.tpl @@ -0,0 +1,477 @@ + +
+ +
+
+ + + +
+ + : + +
+ + + + + + +
+ + +
+ +
+
+

+
+
+ + +
+ +
+ + +
+
+
+
+
+
+
+
+ $payment_method) { ?> +
+
+ + +
+
+ + + + + + + + + style="cursor:pointer;" /> +
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+
+ ' : '' ;?> + -data-payment-mollie-api-key/> +
+ +
+ +
+
+
+ +
+ + +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+

+
+
+
+ +
+

+
+
+
+
+ Mollie

+ © 2004- Mollie + B.V. +
+
+
+ +
+
+ Module by Quality Works - Technical Support +
+ +
Tel: +31(0)85 7430150
E-mail: support.mollie@qualityworks.eu
Internet: www.qualityworks.eu +
+
+ Mollie - Support +
+
+
+ +
+ Contact +
+
+
+
+
+
+ +
+
+
+
+ + + +
+
+
+
+ + + diff --git a/catalog/controller/extension/payment/mollie-api-client/.travis.yml b/catalog/controller/extension/payment/mollie-api-client/.travis.yml deleted file mode 100644 index 83e9ad30..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: php -php: - - 5.6 - - 5.5 - - 5.4 - - 5.3 - - hhvm -script: "phpunit" diff --git a/catalog/controller/extension/payment/mollie-api-client/LICENSE b/catalog/controller/extension/payment/mollie-api-client/LICENSE deleted file mode 100644 index af59771a..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2013-2015, Mollie B.V. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/catalog/controller/extension/payment/mollie-api-client/README.mdown b/catalog/controller/extension/payment/mollie-api-client/README.mdown deleted file mode 100644 index 39dca2c0..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/README.mdown +++ /dev/null @@ -1,156 +0,0 @@ -![Mollie](https://www.mollie.nl/files/Mollie-Logo-Style-Small.png) - -# Mollie API client for PHP # - -Accepting [iDEAL](https://www.mollie.com/ideal/), [Bancontact/Mister Cash](https://www.mollie.com/mistercash/), [SOFORT Banking](https://www.mollie.com/sofort/), [Creditcard](https://www.mollie.com/creditcard/), [SEPA Bank transfer](https://www.mollie.com/overboeking/), [SEPA Direct debit](https://www.mollie.com/directdebit/), [Bitcoin](https://www.mollie.com/bitcoin/), [PayPal](https://www.mollie.com/paypal/), [Belfius Direct Net](https://www.mollie.com/belfiusdirectnet/) and [paysafecard](https://www.mollie.com/paysafecard/) online payments without fixed monthly costs or any punishing registration procedures. Just use the Mollie API to receive payments directly on your website or easily refund transactions to your customers. - -[![Build Status](https://travis-ci.org/mollie/mollie-api-php.png)](https://travis-ci.org/mollie/mollie-api-php) -[![Latest Stable Version](https://poser.pugx.org/mollie/mollie-api-php/v/stable)](https://packagist.org/packages/mollie/mollie-api-php) -[![Total Downloads](https://poser.pugx.org/mollie/mollie-api-php/downloads)](https://packagist.org/packages/mollie/mollie-api-php) - -## Requirements ## -To use the Mollie API client, the following things are required: - -+ Get yourself a free [Mollie account](https://www.mollie.com/aanmelden). No sign up costs. -+ Create a new [Website profile](https://www.mollie.com/beheer/account/profielen/) to generate API keys (live and test mode) and setup your webhook. -+ Now you're ready to use the Mollie API client in test mode. -+ In order to accept payments in live mode, payment methods must be activated in your account. Follow [a few of steps](https://www.mollie.com/beheer/diensten), and let us handle the rest. -+ PHP >= 5.2 -+ PHP cURL extension -+ Up-to-date OpenSSL (or other SSL/TLS toolkit) -+ SSL v3 disabled. Mollie does not support SSL v3 anymore. - -## Installation ## - -By far the easiest way to install the Mollie API client is to require it with [Composer](http://getcomposer.org/doc/00-intro.md). - - $ composer require mollie/mollie-api-php 1.4.x - - { - "require": { - "mollie/mollie-api-php": "1.4.x" - } - } - -You may also git checkout or [download all the files](https://github.com/mollie/mollie-api-php/archive/master.zip), and include the Mollie API client manually. - -## How to receive payments ## - -To successfully receive a payment, these steps should be implemented: - -1. Use the Mollie API client to create a payment with the requested amount, description and optionally, a payment method. It is important to specify a unique redirect URL where the customer is supposed to return to after the payment is completed. - -2. Immediately after the payment is completed, our platform will send an asynchronous request to the configured webhook to allow the payment details to be retrieved, so you know when exactly to start processing the customer's order. - -3. The customer returns, and should be satisfied to see that the order was paid and is now being processed. - -## Getting started ## - -Requiring the included autoloader. If you're using Composer, you can skip this step. - -```php - require "Mollie/API/Autoloader.php"; -``` - -Initializing the Mollie API client, and setting your API key. - -```php - $mollie = new Mollie_API_Client; - $mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"); -``` - -Creating a new payment. - -```php - $payment = $mollie->payments->create(array( - "amount" => 10.00, - "description" => "My first API payment", - "redirectUrl" => "https://webshop.example.org/order/12345/", - )); -``` - -_After creation, the payment id is available in the `$payment->id` property. You should store this id with your order._ - -Retrieving a payment. - -```php - $payment = $mollie->payments->get($payment->id); - - if ($payment->isPaid()) - { - echo "Payment received."; - } -``` - -### Fully integrated iDEAL payments ### - -If you want to fully integrate iDEAL payments in your web site, some additional steps are required. First, you need to -retrieve the list of issuers (banks) that support iDEAL and have your customer pick the issuer he/she wants to use for -the payment. - -Retrieve the list of issuers: - -```php - $issuers = $mollie->issuers->all(); -``` - -_`$issuers` will be a list of `Mollie_API_Object_Issuer` objects. Use the property `$id` of this object in the - API call, and the property `$name` for displaying the issuer to your customer. For a more in-depth example, see [Example 4](https://github.com/mollie/mollie-api-php/blob/master/examples/04-ideal-payment.php)._ - -Create a payment with the selected issuer: - -```php - $payment = $mollie->payments->create(array( - "amount" => 10.00, - "description" => "My first API payment", - "redirectUrl" => "https://webshop.example.org/order/12345/", - "method" => Mollie_API_Object_Method::IDEAL, - "issuer" => $selected_issuer_id, // e.g. "ideal_INGBNL2A" - )); -``` - -_The `links` property of the `$payment` object will contain a string `paymentUrl`, which is a URL that points directly to the online banking environment of the selected issuer._ - -### Refunding payments ### - -The API also supports refunding payments. Note that there is no confirmation and that all refunds are immediate and -definitive. Refunds are only supported for iDEAL, credit card, Bancontact/Mister Cash, SOFORT Banking and bank transfer payments. Other types of payments cannot -be refunded through our API at the moment. - -```php - $payment = $mollie->payments->get($payment->id); - - // Refund € 15 of this payment - $refund = $mollie->payments->refund($payment, 15.00); -``` - -## How to use OAuth2 to connect Mollie accounts to your application? ## - -The resources `permissions`, `organizations`, `profiles` and `settlements` are only available with an OAuth2 access token. This is because an API key is linked to a website profile, and those resources are linked to an Mollie account. Visit our [API documentation](https://www.mollie.com/en/docs/oauth/overview) for more information about how to get an OAuth2 access token. For an example of how to use those resources, see [Example 8](https://github.com/mollie/mollie-api-php/blob/master/examples/08-oauth-list-profiles.php), [Example 9](https://github.com/mollie/mollie-api-php/blob/master/examples/09-oauth-list-settlements.php) and [Example 10](https://github.com/mollie/mollie-api-php/blob/master/examples/10-oauth-new-payment.php). - -## API documentation ## -If you wish to learn more about our API, please visit the [Mollie Developer Portal](https://www.mollie.com/developer/). API Documentation is available in both Dutch and English. - -## Want to help us make our API client even better? ## - -Want to help us make our API client even better? We take [pull requests](https://github.com/mollie/mollie-api-php/pulls?utf8=%E2%9C%93&q=is%3Apr), sure. But how would you like to contribute to a [technology oriented organization](https://www.mollie.com/nl/blog/post/werken-bij-mollie-sfeer-kansen-en-mogelijkheden/)? Mollie is hiring developers and system engineers. [Check out our vacancies](https://www.mollie.com/nl/jobs) or [get in touch](mailto:personeel@mollie.com). - -## License ## -[BSD (Berkeley Software Distribution) License](http://www.opensource.org/licenses/bsd-license.php). -Copyright (c) 2013-2015, Mollie B.V. - -## Support ## -Contact: [www.mollie.com](https://www.mollie.com) — info@mollie.com — +31 20-612 88 55 - -+ [More information about iDEAL via Mollie](https://www.mollie.com/ideal/) -+ [More information about credit card via Mollie](https://www.mollie.com/creditcard/) -+ [More information about Bancontact/Mister Cash via Mollie](https://www.mollie.com/mistercash/) -+ [More information about SOFORT Banking via Mollie](https://www.mollie.com/sofort/) -+ [More information about SEPA Bank transfer via Mollie](https://www.mollie.com/banktransfer/) -+ [More information about SEPA Direct debit via Mollie](https://www.mollie.com/directdebit/) -+ [More information about Bitcoin via Mollie](https://www.mollie.com/bitcoin/) -+ [More information about PayPal via Mollie](https://www.mollie.com/paypal/) -+ [More information about Belfius Direct Net via Mollie](https://www.mollie.com/belfiusdirectnet/) -+ [More information about paysafecard via Mollie](https://www.mollie.com/paysafecard/) - -![Powered By Mollie](https://www.mollie.com/images/badge-betaling-medium.png) diff --git a/catalog/controller/extension/payment/mollie-api-client/build.xml b/catalog/controller/extension/payment/mollie-api-client/build.xml deleted file mode 100644 index 33bc2fb9..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/build.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/catalog/controller/extension/payment/mollie-api-client/composer.json b/catalog/controller/extension/payment/mollie-api-client/composer.json deleted file mode 100644 index 57500754..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/composer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "mollie/mollie-api-php", - "description": "Mollie API client library for PHP", - "version": "1.4.1", - "homepage": "https://github.com/mollie/mollie-api-php", - "license": "BSD-2-Clause", - "authors": [ - { - "name": "Mollie B.V.", - "email": "info@mollie.com" - } - ], - "keywords": [ - "mollie", "payment", "service", "ideal", "creditcard", "mistercash", "bancontact", "sofort", "sofortbanking", - "sepa", "bitcoin", "paypal", "paysafecard", "podiumcadeaukaart", "banktransfer", "direct debit", "belfius", - "belfius direct net", "refunds", "api", "payments", "gateway" - ], - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "autoload": { - "psr-0": { - "": "src/" - } - }, - "suggest": { - "mollie/oauth2-mollie-php": "Use OAuth to authenticate with the Mollie API. This is needed for some endpoints. Visit https://mollie.com/en/docs for more information." - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/01-new-payment.php b/catalog/controller/extension/payment/mollie-api-client/examples/01-new-payment.php deleted file mode 100644 index 2a761112..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/01-new-payment.php +++ /dev/null @@ -1,71 +0,0 @@ -payments->create(array( - "amount" => 10.00, - "description" => "My first API payment", - "redirectUrl" => "{$protocol}://{$hostname}{$path}/03-return-page.php?order_id={$order_id}", - "webhookUrl" => "{$protocol}://{$hostname}{$path}/02-webhook-verification.php", - "metadata" => array( - "order_id" => $order_id, - ), - )); - - /* - * In this example we store the order with its payment status in a database. - */ - database_write($order_id, $payment->status); - - /* - * Send the customer off to complete the payment. - */ - header("Location: " . $payment->getPaymentUrl()); -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} - - -/* - * NOTE: This example uses a text file as a database. Please use a real database like MySQL in production code. - */ -function database_write ($order_id, $status) -{ - $order_id = intval($order_id); - $database = dirname(__FILE__) . "/orders/order-{$order_id}.txt"; - - file_put_contents($database, $status); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/02-webhook-verification.php b/catalog/controller/extension/payment/mollie-api-client/examples/02-webhook-verification.php deleted file mode 100644 index 06503d4b..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/02-webhook-verification.php +++ /dev/null @@ -1,62 +0,0 @@ -payments->get($_POST["id"]); - $order_id = $payment->metadata->order_id; - - /* - * Update the order in the database. - */ - database_write($order_id, $payment->status); - - if ($payment->isPaid() == TRUE) - { - /* - * At this point you'd probably want to start the process of delivering the product to the customer. - */ - } - elseif ($payment->isOpen() == FALSE) - { - /* - * The payment isn't paid and isn't open anymore. We can assume it was aborted. - */ - } -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} - - -/* - * NOTE: This example uses a text file as a database. Please use a real database like MySQL in production code. - */ -function database_write ($order_id, $status) -{ - $order_id = intval($order_id); - $database = dirname(__FILE__) . "/orders/order-{$order_id}.txt"; - - file_put_contents($database, $status); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/03-return-page.php b/catalog/controller/extension/payment/mollie-api-client/examples/03-return-page.php deleted file mode 100644 index 0a2319fd..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/03-return-page.php +++ /dev/null @@ -1,35 +0,0 @@ -Your payment status is '" . htmlspecialchars($status) . "'.

"; -echo "

"; -echo 'Retry example 1
'; -echo 'Retry example 4
'; -echo "

"; - - -/* - * NOTE: This example uses a text file as a database. Please use a real database like MySQL in production code. - */ -function database_read ($order_id) -{ - $order_id = intval($order_id); - $database = dirname(__FILE__) . "/orders/order-{$order_id}.txt"; - - $status = @file_get_contents($database); - - return $status ? $status : "unknown order"; -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/04-ideal-payment.php b/catalog/controller/extension/payment/mollie-api-client/examples/04-ideal-payment.php deleted file mode 100644 index 71d39273..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/04-ideal-payment.php +++ /dev/null @@ -1,96 +0,0 @@ -issuers->all(); - - echo '
Select your bank:
'; - exit; - } - - /* - * Generate a unique order id for this example. It is important to include this unique attribute - * in the redirectUrl (below) so a proper return page can be shown to the customer. - */ - $order_id = time(); - - /* - * Determine the url parts to these example files. - */ - $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; - $hostname = $_SERVER['HTTP_HOST']; - $path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']); - - /* - * Payment parameters: - * amount Amount in EUROs. This example creates a € 27.50 payment. - * method Payment method "ideal". - * description Description of the payment. - * redirectUrl Redirect location. The customer will be redirected there after the payment. - * metadata Custom metadata that is stored with the payment. - * issuer The customer's bank. If empty the customer can select it later. - */ - $payment = $mollie->payments->create(array( - "amount" => 27.50, - "method" => Mollie_API_Object_Method::IDEAL, - "description" => "My first iDEAL payment", - "redirectUrl" => "{$protocol}://{$hostname}{$path}/03-return-page.php?order_id={$order_id}", - "metadata" => array( - "order_id" => $order_id, - ), - "issuer" => !empty($_POST["issuer"]) ? $_POST["issuer"] : NULL - )); - - /* - * In this example we store the order with its payment status in a database. - */ - database_write($order_id, $payment->status); - - /* - * Send the customer off to complete the payment. - */ - header("Location: " . $payment->getPaymentUrl()); -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} - - -/* - * NOTE: This example uses a text file as a database. Please use a real database like MySQL in production code. - */ -function database_write ($order_id, $status) -{ - $order_id = intval($order_id); - $database = dirname(__FILE__) . "/orders/order-{$order_id}.txt"; - - file_put_contents($database, $status); -} - diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/05-payments-history.php b/catalog/controller/extension/payment/mollie-api-client/examples/05-payments-history.php deleted file mode 100644 index f8df91db..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/05-payments-history.php +++ /dev/null @@ -1,32 +0,0 @@ -payments->all($offset, $limit); - - foreach ($payments as $payment) - { - echo "€ " . htmlspecialchars($payment->amount) . ", status: " . htmlspecialchars($payment->status) . "
"; - } -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/06-list-activated-methods.php b/catalog/controller/extension/payment/mollie-api-client/examples/06-list-activated-methods.php deleted file mode 100644 index bfd9aed1..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/06-list-activated-methods.php +++ /dev/null @@ -1,33 +0,0 @@ -methods->all(); - - foreach ($methods as $method) - { - echo '
'; - - echo ' '; - echo htmlspecialchars($method->description) . ' (' . htmlspecialchars($method->id) . ')'; - - echo '
'; - } -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/07-refund-payment.php b/catalog/controller/extension/payment/mollie-api-client/examples/07-refund-payment.php deleted file mode 100644 index b20a0d61..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/07-refund-payment.php +++ /dev/null @@ -1,47 +0,0 @@ -payments->get($payment_id); - - // Check if this payment can be refunded - // You can also check if the payment can be partially refunded - // by using $payment->canBePartiallyRefunded() and $payment->getAmountRemaining() - if ($payment->canBeRefunded()) - { - /* - * Refund € 15,00 of the payment. - * - * https://www.mollie.com/en/docs/refunds#refund-create - */ - $refund = $mollie->payments->refund($payment, 15.00); - - echo "€ 15,00 of payment {$payment_id} refunded.", PHP_EOL; - } - else - { - echo "Payment {$payment_id} can not be refunded.", PHP_EOL; - } - - /* - * Retrieve all refunds on a payment. - */ - var_dump($mollie->payments_refunds->with($payment)->all()); -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/08-oauth-list-profiles.php b/catalog/controller/extension/payment/mollie-api-client/examples/08-oauth-list-profiles.php deleted file mode 100644 index fbe363c0..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/08-oauth-list-profiles.php +++ /dev/null @@ -1,32 +0,0 @@ -profiles->all(); - - foreach ($profiles as $profile) - { - echo '
'; - - echo htmlspecialchars($profile->name) . - ' - ' . htmlspecialchars($profile->website) . - ' (' . htmlspecialchars($profile->id) . ')'; - - echo '
'; - } -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/09-oauth-list-settlements.php b/catalog/controller/extension/payment/mollie-api-client/examples/09-oauth-list-settlements.php deleted file mode 100644 index 5aae931e..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/09-oauth-list-settlements.php +++ /dev/null @@ -1,70 +0,0 @@ -settlements->all(); - - echo '
    '; - foreach ($settlements as $settlement) - { - echo '
  • Settlement ' . htmlspecialchars($settlement->reference) . ': (' . htmlspecialchars($settlement->settledDatetime) . ')'; - echo ''; - - // Convert from stdClass to array - $settlement_periods = json_decode(json_encode($settlement->periods), TRUE); - - foreach ($settlement_periods as $year => $months) - { - foreach ($months as $month => $monthly_settlement) - { - foreach ($monthly_settlement['revenue'] as $revenue) - { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - } - foreach ($monthly_settlement['costs'] as $revenue) - { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - } - } - } - - echo ''; - - echo '
    MonthDescriptionCountNetVATGross
    ' . htmlspecialchars($year . '-' . $month) . '' . htmlspecialchars($revenue['description']) . '' . htmlspecialchars($revenue['count']) . ' x' . htmlspecialchars($revenue['amount']['net'] ?: '-') . '' . htmlspecialchars($revenue['amount']['vat'] ?: '-') . '' . htmlspecialchars($revenue['amount']['gross'] ?: '-') . '
    ' . htmlspecialchars($year . '-' . $month) . '' . htmlspecialchars($revenue['description']) . '' . htmlspecialchars($revenue['count']) . ' x' . htmlspecialchars(-$revenue['amount']['net'] ?: '-') . '' . htmlspecialchars(-$revenue['amount']['vat'] ?: '-') . '' . htmlspecialchars(-$revenue['amount']['gross'] ?: '-') . '
    TOTAL' . htmlspecialchars($settlement->amount) . '
    '; - echo '
  • '; - } - echo '
'; - - $settlement = $mollie->settlements->get("open"); - - echo "Open amount: €{$settlement->amount}\n"; -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/10-oauth-new-payment.php b/catalog/controller/extension/payment/mollie-api-client/examples/10-oauth-new-payment.php deleted file mode 100644 index f5a10978..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/10-oauth-new-payment.php +++ /dev/null @@ -1,84 +0,0 @@ -profiles->all(); - $profile = reset($profiles); - - /* - * Payment parameters: - * amount Amount in EUROs. This example creates a € 10,- payment. - * description Description of the payment. - * redirectUrl Redirect location. The customer will be redirected there after the payment. - * webhookUrl Webhook location, used to report when the payment changes state. - * metadata Custom metadata that is stored with the payment. - */ - $payment = $mollie->payments->create(array( - "amount" => 10.00, - "description" => "My first API payment", - "redirectUrl" => "{$protocol}://{$hostname}{$path}/03-return-page.php?order_id={$order_id}", - "webhookUrl" => "{$protocol}://{$hostname}{$path}/02-webhook-verification.php", - "metadata" => array( - "order_id" => $order_id, - ), - "profileId" => $profile->id // This is specifically necessary for payment resources via OAuth access. - )); - - /* - * In this example we store the order with its payment status in a database. - */ - database_write($order_id, $payment->status); - - /* - * Send the customer off to complete the payment. - */ - if (PHP_SAPI === "cli") - { - echo "Redirect to: " . $payment->getPaymentUrl() . PHP_EOL; - return; - } - - header("Location: " . $payment->getPaymentUrl()); -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} - - -/* - * NOTE: This example uses a text file as a database. Please use a real database like MySQL in production code. - */ -function database_write ($order_id, $status) -{ - $order_id = intval($order_id); - $database = dirname(__FILE__) . "/orders/order-{$order_id}.txt"; - - file_put_contents($database, $status); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/11-new-customer.php b/catalog/controller/extension/payment/mollie-api-client/examples/11-new-customer.php deleted file mode 100644 index 6b225f76..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/11-new-customer.php +++ /dev/null @@ -1,31 +0,0 @@ -customers->create(array( - "name" => "Luke Skywalker", - "email" => "luke@example.org", - "metadata" => array( - "isJedi" => TRUE, - ), - )); - - echo "

New customer created " . htmlspecialchars($customer->id) . " (" . htmlspecialchars($customer->name) . ").

"; -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/12-new-customer-payment.php b/catalog/controller/extension/payment/mollie-api-client/examples/12-new-customer-payment.php deleted file mode 100644 index 5deeca2b..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/12-new-customer-payment.php +++ /dev/null @@ -1,69 +0,0 @@ -customers->all(0, 1)->data[0]; - - /* - * Generate a unique order id for this example. It is important to include this unique attribute - * in the redirectUrl (below) so a proper return page can be shown to the customer. - */ - $order_id = time(); - - /* - * Determine the url parts to these example files. - */ - $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; - $hostname = $_SERVER['HTTP_HOST']; - $path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']); - - /* - * Customer Payment creation parameters. - * - * See: https://www.mollie.com/en/docs/reference/customers/create-payment - */ - $payment = $mollie->customers_payments->with($customer)->create(array( - "amount" => 10.00, - "description" => "My first Customer payment", - "redirectUrl" => "{$protocol}://{$hostname}{$path}/03-return-page.php?order_id={$order_id}", - "webhookUrl" => "{$protocol}://{$hostname}{$path}/02-webhook-verification.php" - )); - - /* - * In this example we store the order with its payment status in a database. - */ - database_write($order_id, $payment->status); - - /* - * Send the customer off to complete the payment. - */ - header("Location: " . $payment->getPaymentUrl()); -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} - - -/* - * NOTE: This example uses a text file as a database. Please use a real database like MySQL in production code. - */ -function database_write ($order_id, $status) -{ - $order_id = intval($order_id); - $database = dirname(__FILE__) . "/orders/order-{$order_id}.txt"; - - file_put_contents($database, $status); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/13-customer-payments-history.php b/catalog/controller/extension/payment/mollie-api-client/examples/13-customer-payments-history.php deleted file mode 100644 index 62cfecfb..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/13-customer-payments-history.php +++ /dev/null @@ -1,38 +0,0 @@ -customers->all(0, 1)->data[0]; - - // Pagination - $offset = 0; - $limit = 25; - - /* - * Get the all payments for this API key ordered by newest. - */ - $payments = $mollie->customers_payments->with($customer)->all($offset, $limit); - - foreach ($payments as $payment) - { - echo "€ " . htmlspecialchars($payment->amount) . ", status: " . htmlspecialchars($payment->status) . "
"; - } -} -catch (Mollie_API_Exception $e) -{ - echo "API call failed: " . htmlspecialchars($e->getMessage()); -} diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/initialize.php b/catalog/controller/extension/payment/mollie-api-client/examples/initialize.php deleted file mode 100644 index 4229c8f7..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/initialize.php +++ /dev/null @@ -1,11 +0,0 @@ -setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"); diff --git a/catalog/controller/extension/payment/mollie-api-client/examples/initialize_with_oauth.php b/catalog/controller/extension/payment/mollie-api-client/examples/initialize_with_oauth.php deleted file mode 100644 index dea40bd5..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/examples/initialize_with_oauth.php +++ /dev/null @@ -1,11 +0,0 @@ -setAccessToken("access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ"); diff --git a/catalog/controller/extension/payment/mollie-api-client/phpunit.xml b/catalog/controller/extension/payment/mollie-api-client/phpunit.xml deleted file mode 100644 index 1bd1367a..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/phpunit.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - tests/ - - - - - - - \ No newline at end of file diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Autoloader.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Autoloader.php deleted file mode 100755 index b9e6350e..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Autoloader.php +++ /dev/null @@ -1,68 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Autoloader -{ - /** - * @param string $class_name - */ - public static function autoload ($class_name) - { - if (strpos($class_name, "Mollie_") === 0) - { - $file_name = str_replace("_", "/", $class_name); - $file_name = realpath(dirname(__FILE__) . "/../../{$file_name}.php"); - - if ($file_name !== false) - { - require $file_name; - } - } - } - - /** - * @return bool - */ - public static function register () - { - return spl_autoload_register(array(__CLASS__, "autoload")); - } - - /** - * @return bool - */ - public static function unregister () - { - return spl_autoload_unregister(array(__CLASS__, "autoload")); - } -} - -Mollie_API_Autoloader::register(); diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Client.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Client.php deleted file mode 100755 index 906b65a3..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Client.php +++ /dev/null @@ -1,442 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Client -{ - /** - * Version of our client. - */ - const CLIENT_VERSION = "1.7.1"; - - /** - * Endpoint of the remote API. - */ - const API_ENDPOINT = "https://api.mollie.nl"; - - /** - * Version of the remote API. - */ - const API_VERSION = "v1"; - - const HTTP_GET = "GET"; - const HTTP_POST = "POST"; - const HTTP_DELETE = "DELETE"; - - /** - * @var string - */ - protected $api_endpoint = self::API_ENDPOINT; - - /** - * RESTful Payments resource. - * - * @var Mollie_API_Resource_Payments - */ - public $payments; - - /** - * RESTful Payments Refunds resource. - * - * @var Mollie_API_Resource_Payments_Refunds - */ - public $payments_refunds; - - /** - * RESTful Issuers resource. - * - * @var Mollie_API_Resource_Issuers - */ - public $issuers; - - /** - * RESTful Methods resource. - * - * @var Mollie_API_Resource_Methods - */ - public $methods; - - /** - * RESTful Permissions resource. NOTE: requires OAuth access token. - * - * @var Mollie_API_Resource_Permissions - */ - public $permissions; - - /** - * RESTful Organizations resource. NOTE: requires OAuth access token. - * - * @var Mollie_API_Resource_Organizations - */ - public $organizations; - - /** - * RESTful Profiles resource. NOTE: requires OAuth access token. - * - * @var Mollie_API_Resource_Profiles - */ - public $profiles; - - /** - * RESTful refunds resource. NOTE: requires OAuth access token. - * - * If you wish to create / get / list / cancel refunds with an API key, use the payment_refunds resource - * - * @see $payments_refunds - * @var Mollie_API_Resource_Refunds - */ - public $refunds; - - /** - * RESTful Settlements resource. NOTE: requires OAuth access token. - * - * @var Mollie_API_Resource_Settlements - */ - public $settlements; - - /** - * RESTful Customers resource. - * - * @var Mollie_API_Resource_Customers - */ - public $customers; - - /** - * RESTful Customers Payments resource. - * - * @var Mollie_API_Resource_Customers_Payments - */ - public $customers_payments; - - /** - * RESTful Customers Mandates resource. - * - * @var Mollie_API_Resource_Customers_Mandates - */ - public $customers_mandates; - - /** - * RESTful Customers Subscriptions resource. - * - * @var Mollie_API_Resource_Customers_Subscriptions - */ - public $customers_subscriptions; - - /** - * @var string - */ - protected $api_key; - - /** - * True if an OAuth access token is set as API key. - * - * @var bool - */ - protected $oauth_access; - - /** - * @var array - */ - protected $version_strings = array(); - - /** - * @var resource - */ - protected $ch; - - /** - * @var string - */ - protected $pem_path; - - /** - * @throws Mollie_API_Exception_IncompatiblePlatform - */ - public function __construct () - { - $this->getCompatibilityChecker() - ->checkCompatibility(); - - $this->payments = new Mollie_API_Resource_Payments($this); - $this->payments_refunds = new Mollie_API_Resource_Payments_Refunds($this); - $this->issuers = new Mollie_API_Resource_Issuers($this); - $this->methods = new Mollie_API_Resource_Methods($this); - $this->customers = new Mollie_API_Resource_Customers($this); - $this->customers_payments = new Mollie_API_Resource_Customers_Payments($this); - $this->customers_mandates = new Mollie_API_Resource_Customers_Mandates($this); - $this->customers_subscriptions = new Mollie_API_Resource_Customers_Subscriptions($this); - - // OAuth2 endpoints - $this->permissions = new Mollie_API_Resource_Permissions($this); - $this->organizations = new Mollie_API_Resource_Organizations($this); - $this->refunds = new Mollie_API_Resource_Refunds($this); - $this->profiles = new Mollie_API_Resource_Profiles($this); - $this->settlements = new Mollie_API_Resource_Settlements($this); - - $curl_version = curl_version(); - - $this->addVersionString("Mollie/" . self::CLIENT_VERSION); - $this->addVersionString("PHP/" . phpversion()); - $this->addVersionString("cURL/" . $curl_version["version"]); - $this->addVersionString($curl_version["ssl_version"]); - - // The PEM path may be overwritten with setPemPath(). - $this->pem_path = realpath(dirname(__FILE__) . "/cacert.pem"); - } - - /** - * @param string $resource_path - * @return Mollie_API_Resource_Undefined - */ - public function __get ($resource_path) - { - $undefined_resource = new Mollie_API_Resource_Undefined($this); - $undefined_resource->setResourcePath($resource_path); - - return $undefined_resource; - } - - /** - * @param string $url - */ - public function setApiEndpoint ($url) - { - $this->api_endpoint = rtrim(trim($url), '/'); - } - - /** - * @return string - */ - public function getApiEndpoint () - { - return $this->api_endpoint; - } - - /** - * @param string $api_key The Mollie API key, starting with 'test_' or 'live_' - * @throws Mollie_API_Exception - */ - public function setApiKey ($api_key) - { - $api_key = trim($api_key); - - if (!preg_match('/^(live|test)_\w+$/', $api_key)) - { - throw new Mollie_API_Exception("Invalid API key: '{$api_key}'. An API key must start with 'test_' or 'live_'."); - } - - $this->api_key = $api_key; - $this->oauth_access = FALSE; - } - - /** - * @param string $access_token OAuth access token, starting with 'access_' - * @throws Mollie_API_Exception - */ - public function setAccessToken ($access_token) - { - $access_token = trim($access_token); - - if (!preg_match('/^access_\w+$/', $access_token)) - { - throw new Mollie_API_Exception("Invalid OAuth access token: '{$access_token}'. An access token must start with 'access_'."); - } - - $this->api_key = $access_token; - $this->oauth_access = TRUE; - } - - /** - * @return bool - */ - public function usesOAuth () - { - return $this->oauth_access; - } - - /** - * @param string $version_string - */ - public function addVersionString ($version_string) - { - $this->version_strings[] = str_replace(array(" ", "\t", "\n", "\r"), '-', $version_string); - } - - /** - * Overwrite the default path to the PEM file. Should only be used by advanced users. - * - * @param string $pem_path - */ - public function setPemPath ($pem_path) - { - $this->pem_path = strval($pem_path); - } - - /** - * Perform an http call. This method is used by the resource specific classes. Please use the $payments property to - * perform operations on payments. - * - * @see $payments - * @see $isuers - * - * @param $http_method - * @param $api_method - * @param $http_body - * - * @return string - * @throws Mollie_API_Exception - * - * @codeCoverageIgnore - */ - public function performHttpCall ($http_method, $api_method, $http_body = NULL) - { - if (empty($this->api_key)) - { - throw new Mollie_API_Exception("You have not set an API key or OAuth access token. Please use setApiKey() to set the API key."); - } - - if (empty($this->ch) || !function_exists("curl_reset")) - { - /* - * Initialize a cURL handle. - */ - $this->ch = curl_init(); - } - else - { - /* - * Reset the earlier used cURL handle. - */ - curl_reset($this->ch); - } - - $url = $this->api_endpoint . "/" . self::API_VERSION . "/" . $api_method; - - curl_setopt($this->ch, CURLOPT_URL, $url); - curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, TRUE); - curl_setopt($this->ch, CURLOPT_TIMEOUT, 10); - - $user_agent = join(' ', $this->version_strings); - - if ($this->usesOAuth()) - { - $user_agent .= " OAuth/2.0"; - } - - $request_headers = array( - "Accept: application/json", - "Authorization: Bearer {$this->api_key}", - "User-Agent: {$user_agent}", - "X-Mollie-Client-Info: " . php_uname(), - "Expect:", - ); - - curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $http_method); - - if ($http_body !== NULL) - { - $request_headers[] = "Content-Type: application/json"; - curl_setopt($this->ch, CURLOPT_POST, 1); - curl_setopt($this->ch, CURLOPT_POSTFIELDS, $http_body); - } - - curl_setopt($this->ch, CURLOPT_HTTPHEADER, $request_headers); - curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 2); - curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, TRUE); - - /* - * On some servers, the list of installed certificates is outdated or not present at all (the ca-bundle.crt - * is not installed). So we tell cURL which certificates we trust. - */ - curl_setopt($this->ch, CURLOPT_CAINFO, $this->pem_path); - - $body = curl_exec($this->ch); - - if (strpos(curl_error($this->ch), "certificate subject name 'mollie.nl' does not match target host") !== FALSE) - { - /* - * On some servers, the wildcard SSL certificate is not processed correctly. This happens with OpenSSL 0.9.7 - * from 2003. - */ - $request_headers[] = "X-Mollie-Debug: old OpenSSL found"; - curl_setopt($this->ch, CURLOPT_HTTPHEADER, $request_headers); - curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0); - $body = curl_exec($this->ch); - } - - if (curl_errno($this->ch)) - { - $message = "Unable to communicate with Mollie (".curl_errno($this->ch)."): " . curl_error($this->ch) . "."; - - curl_close($this->ch); - $this->ch = NULL; - - throw new Mollie_API_Exception($message); - } - - if (!function_exists("curl_reset")) - { - /* - * Keep it open if supported by PHP, else close the handle. - */ - curl_close($this->ch); - $this->ch = NULL; - } - - return $body; - } - - /** - * Close any cURL handles, if we have them. - */ - public function __destruct () - { - if (is_resource($this->ch)) - { - curl_close($this->ch); - } - } - - /** - * @return Mollie_API_CompatibilityChecker - * @codeCoverageIgnore - */ - protected function getCompatibilityChecker () - { - static $checker = NULL; - - if (!$checker) - { - $checker = new Mollie_API_CompatibilityChecker(); - } - - return $checker; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/CompatibilityChecker.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/CompatibilityChecker.php deleted file mode 100755 index 2fe771f0..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/CompatibilityChecker.php +++ /dev/null @@ -1,158 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_CompatibilityChecker -{ - /** - * @var string - */ - public static $MIN_PHP_VERSION = '5.2.0'; - - /** - * Used cURL functions - * - * @var array - */ - public static $REQUIRED_CURL_FUNCTIONS = array( - 'curl_init', - 'curl_setopt', - 'curl_exec', - 'curl_error', - 'curl_errno', - 'curl_close', - 'curl_version', - ); - - /** - * @throws Mollie_API_Exception_IncompatiblePlatform - * @return void - */ - public function checkCompatibility () - { - if (!$this->satisfiesPhpVersion()) - { - throw new Mollie_API_Exception_IncompatiblePlatform( - "The client requires PHP version >= " . self::$MIN_PHP_VERSION . ", you have " . PHP_VERSION . ".", - Mollie_API_Exception_IncompatiblePlatform::INCOMPATIBLE_PHP_VERSION - ); - } - - if (!$this->satisfiesJsonExtension()) - { - throw new Mollie_API_Exception_IncompatiblePlatform( - "PHP extension json is not enabled. Please make sure to enable 'json' in your PHP configuration.", - Mollie_API_Exception_IncompatiblePlatform::INCOMPATIBLE_JSON_EXTENSION - ); - } - - if (!$this->satisfiesCurlExtension()) - { - throw new Mollie_API_Exception_IncompatiblePlatform( - "PHP extension cURL is not enabled. Please make sure to enable 'curl' in your PHP configuration.", - Mollie_API_Exception_IncompatiblePlatform::INCOMPATIBLE_CURL_EXTENSION - ); - } - - if (!$this->satisfiesCurlFunctions()) - { - throw new Mollie_API_Exception_IncompatiblePlatform( - "This client requires the following cURL functions to be available: " . implode(', ', self::$REQUIRED_CURL_FUNCTIONS) . ". " . - "Please check that none of these functions are disabled in your PHP configuration.", - Mollie_API_Exception_IncompatiblePlatform::INCOMPATIBLE_CURL_FUNCTION - ); - } - } - - /** - * @return bool - * @codeCoverageIgnore - */ - public function satisfiesPhpVersion () - { - return (bool) version_compare(PHP_VERSION, self::$MIN_PHP_VERSION, ">="); - } - - /** - * @return bool - * @codeCoverageIgnore - */ - public function satisfiesJsonExtension () - { - // Check by extension_loaded - if (function_exists('extension_loaded') && extension_loaded('json')) - { - return TRUE; - } - elseif (function_exists('json_encode')) - { - return TRUE; - } - - return FALSE; - } - - /** - * @return bool - * @codeCoverageIgnore - */ - public function satisfiesCurlExtension () - { - // Check by extension_loaded - if (function_exists('extension_loaded') && extension_loaded('curl')) - { - return TRUE; - } - // Check by calling curl_version() - elseif (function_exists('curl_version') && curl_version()) - { - return TRUE; - } - - return FALSE; - } - - /** - * @return bool - * @codeCoverageIgnore - */ - public function satisfiesCurlFunctions () - { - foreach (self::$REQUIRED_CURL_FUNCTIONS as $curl_function) - { - if (!function_exists($curl_function)) - { - return FALSE; - } - } - - return TRUE; - } -} \ No newline at end of file diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Exception.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Exception.php deleted file mode 100755 index 29504475..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Exception.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Exception extends Exception -{ - /** - * @var string - */ - protected $_field; - - /** - * @return string - */ - public function getField () - { - return $this->_field; - } - - /** - * @param string $field - */ - public function setField ($field) - { - $this->_field = (string) $field; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Exception/IncompatiblePlatform.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Exception/IncompatiblePlatform.php deleted file mode 100755 index d139112d..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Exception/IncompatiblePlatform.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Exception_IncompatiblePlatform extends Mollie_API_Exception -{ - const INCOMPATIBLE_PHP_VERSION = 1000; - const INCOMPATIBLE_CURL_EXTENSION = 2000; - const INCOMPATIBLE_CURL_FUNCTION = 2500; - const INCOMPATIBLE_JSON_EXTENSION = 3000; -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Customer.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Customer.php deleted file mode 100755 index f6e94396..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Customer.php +++ /dev/null @@ -1,82 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Customer -{ - /** - * @var string - */ - public $resource; - - /** - * Id of the customer. - * - * @var string - */ - public $id; - - /** - * Either "live" or "test". Indicates this being a test or a live (verified) customer. - * - * @var string - */ - public $mode; - - /** - * @var string - */ - public $name; - - /** - * @var string - */ - public $email; - - /** - * @var string|null - */ - public $locale; - - /** - * @var object|mixed|null - */ - public $metadata; - - /** - * @var string[]|array - */ - public $recentlyUsedMethods; - - /** - * @var string - */ - public $createdDatetime; -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Customer/Mandate.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Customer/Mandate.php deleted file mode 100755 index cd0b12ca..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Customer/Mandate.php +++ /dev/null @@ -1,80 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Customer_Mandate -{ - const STATUS_PENDING = "pending"; - const STATUS_VALID = "valid"; - const STATUS_INVALID = "invalid"; - - /** - * @var string - */ - public $resource; - - /** - * @var string - */ - public $id; - - /** - * @var string - */ - public $status; - - /** - * @var string - */ - public $method; - - /** - * @var string - */ - public $customerId; - - /** - * @var object|null - */ - public $details; - - /** - * @var string - */ - public $createdDatetime; - - /** - * @return bool - */ - public function isValid () - { - return $this->status === self::STATUS_VALID; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Customer/Subscription.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Customer/Subscription.php deleted file mode 100755 index fb16121d..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Customer/Subscription.php +++ /dev/null @@ -1,132 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Customer_Subscription -{ - const STATUS_ACTIVE = "active"; - const STATUS_PENDING = "pending"; // Waiting for a valid mandate. - const STATUS_CANCELLED = "cancelled"; - const STATUS_SUSPENDED = "suspended"; // Active, but mandate became invalid. - const STATUS_COMPLETED = "completed"; - - /** - * @var string - */ - public $resource; - - /** - * @var string - */ - public $id; - - /** - * @var string - */ - public $customerId; - - /** - * Either "live" or "test" depending on the customer's mode. - * - * @var string - */ - public $mode; - - /** - * ISO 8601 format. - * - * @var string - */ - public $createdDatetime; - - /** - * @var string - */ - public $status; - - /** - * @var string - */ - public $amount; - - /** - * @var int|null - */ - public $times; - - /** - * @var string - */ - public $interval; - - /** - * @var string - */ - public $description; - - /** - * @var string|null - */ - public $method; - - /** - * ISO 8601 format. - * - * @var string|null - */ - public $cancelledDatetime; - - /** - * Contains an optional 'webhookUrl'. - * - * @var object|null - */ - public $links; - - /** - * Returns whether the Subscription is valid or not. - * - * @return bool - */ - public function isValid () - { - return $this->status === self::STATUS_ACTIVE; - } - - /** - * Returns whether the Subscription is cancelled or not. - * - * @return bool - */ - public function isCancelled () - { - return $this->status === self::STATUS_CANCELLED; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Issuer.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Issuer.php deleted file mode 100755 index a31d4d8c..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Issuer.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Issuer -{ - /** - * Id of the issuer. - * - * @var string - */ - public $id; - - /** - * Name of the issuer. - * - * @var string - */ - public $name; - - /** - * The payment method this issuer belongs to. - * - * @see Mollie_API_Object_Method - * @var string - */ - public $method; -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/List.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/List.php deleted file mode 100755 index f7666d8f..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/List.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_List extends ArrayObject -{ - /** - * Total number of available objects on the Mollie platform. - * - * @var int - */ - public $totalCount; - - /** - * Numeric offset from which this list of object was created. - * - * @var int - */ - public $offset; - - /** - * Total number of retrieved objects. - * - * @var int - */ - public $count; -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Method.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Method.php deleted file mode 100755 index 79fc666a..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Method.php +++ /dev/null @@ -1,147 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Method -{ - /** - * @link https://mollie.com/ideal - */ - const IDEAL = "ideal"; - - /** - * @link https://mollie.com/paysafecard - */ - const PAYSAFECARD = "paysafecard"; - - /** - * @link https://mollie.com/creditcard - */ - const CREDITCARD = "creditcard"; - - /** - * @link https://mollie.com/mistercash - */ - const MISTERCASH = "mistercash"; - - /** - * @link https://mollie.com/sofort - */ - const SOFORT = "sofort"; - - /** - * @link https://mollie.com/banktransfer - */ - const BANKTRANSFER = "banktransfer"; - - /** - * @link https://mollie.com/directdebit - */ - const DIRECTDEBIT = "directdebit"; - - /** - * @link https://mollie.com/paypal - */ - const PAYPAL = "paypal"; - - /** - * @link https://mollie.com/bitcoin - */ - const BITCOIN = "bitcoin"; - - /** - * @link https://mollie.com/belfiusdirectnet - */ - const BELFIUS = "belfius"; - - /** - * @link https://mollie.com/giftcards - */ - const PODIUMCADEAUKAART = "podiumcadeaukaart"; - - /** - * @link https://www.mollie.com/nl/kbccbc - */ - const KBC = "kbc"; - - /** - * Id of the payment method. - * - * @var string - */ - public $id; - - /** - * More legible description of the payment method. - * - * @var string - */ - public $description; - - /** - * The $amount->minimum and $amount->maximum supported by this method and the used API key. - * - * @var object - */ - public $amount; - - /** - * The $image->normal and $image->bigger to display the payment method logo. - * - * @var object - */ - public $image; - - /** - * @return float|null - */ - public function getMinimumAmount () - { - if (empty($this->amount)) - { - return NULL; - } - - return (float) $this->amount->minimum; - } - - /** - * @return float|null - */ - public function getMaximumAmount () - { - if (empty($this->amount)) - { - return NULL; - } - - return (float) $this->amount->maximum; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Organization.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Organization.php deleted file mode 100755 index 84410003..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Organization.php +++ /dev/null @@ -1,95 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Organization -{ - /** - * Id of the organization. - * - * @var string - */ - public $id; - - /** - * @var string - */ - public $name; - - /** - * @var string - */ - public $email; - - /** - * @var string - */ - public $address; - - /** - * @var string - */ - public $postalCode; - - /** - * @var string - */ - public $city; - - /** - * @var string - */ - public $country; - - /** - * @var string - */ - public $countryCode; - - /** - * @var string - */ - public $registrationType; - - /** - * @var string - */ - public $registrationNumber; - - /** - * @var string - */ - public $registrationDatetime; - - /** - * @var string - */ - public $verifiedDatetime; -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Payment.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Payment.php deleted file mode 100755 index c984d953..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Payment.php +++ /dev/null @@ -1,427 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Payment -{ - /** - * The payment has just been created, no action has happened on it yet. - */ - const STATUS_OPEN = "open"; - - /** - * The payment has just been started, no final confirmation yet. - */ - const STATUS_PENDING = "pending"; - - /** - * The customer has cancelled the payment. - */ - const STATUS_CANCELLED = "cancelled"; - - /** - * The payment has expired due to inaction of the customer. - */ - const STATUS_EXPIRED = "expired"; - - /** - * The payment has been paid. - */ - const STATUS_PAID = "paid"; - - /** - * The payment has been paidout and the money has been transferred to the bank account of the merchant. - */ - const STATUS_PAIDOUT = "paidout"; - - /** - * The payment has been refunded, either through Mollie or through the payment provider (in the case of PayPal). - */ - const STATUS_REFUNDED = "refunded"; - - /** - * Some payment methods provide your customers with the ability to dispute payments which could - * ultimately lead to a chargeback. - */ - const STATUS_CHARGED_BACK = "charged_back"; - - /** - * The payment has failed. - */ - const STATUS_FAILED = "failed"; - - /** - * Recurring types. - * - * @see https://www.mollie.com/en/docs/recurring - */ - const RECURRINGTYPE_NONE = NULL; - const RECURRINGTYPE_FIRST = "first"; - const RECURRINGTYPE_RECURRING = "recurring"; - - /** - * @var string - */ - public $resource; - - /** - * Id of the payment (on the Mollie platform). - * - * @var string - */ - public $id; - - /** - * Mode of the payment, either "live" or "test" depending on the API Key that was used. - * - * @var string - */ - public $mode; - - /** - * The amount of the payment in EURO with 2 decimals. - * - * @var float - */ - public $amount; - - /** - * The amount of the payment that has been refunded to the consumer, in EURO with 2 decimals. This field will be - * NULL if the payment can not be refunded. - * - * @var float|null - */ - public $amountRefunded; - - /** - * The amount of a refunded payment that can still be refunded, in EURO with 2 decimals. This field will be - * NULL if the payment can not be refunded. - * - * For some payment methods this amount can be higher than the payment amount. This is possible to reimburse - * the costs for a return shipment to your customer for example. - * - * @var float|null - */ - public $amountRemaining; - - /** - * Description of the payment that is shown to the customer during the payment, and - * possibly on the bank or credit card statement. - * - * @var string - */ - public $description; - - /** - * If method is empty/null, the customer can pick his/her preferred payment method. - * - * @see Mollie_API_Object_Method - * @var string|null - */ - public $method; - - /** - * The status of the payment. - * - * @var string - */ - public $status = self::STATUS_OPEN; - - /** - * The period after which the payment will expire in ISO-8601 format. - * - * @example P12DT11H30M45S (12 days, 11 hours, 30 minutes and 45 seconds) - * @var string|null - */ - public $expiryPeriod; - - /** - * Date and time the payment was created in ISO-8601 format. - * - * @example "2013-12-25T10:30:54.0Z" - * @var string|null - */ - public $createdDatetime; - - /** - * Date and time the payment was paid in ISO-8601 format. - * - * @var string|null - */ - public $paidDatetime; - - /** - * Date and time the payment was cancelled in ISO-8601 format. - * - * @var string|null - */ - public $cancelledDatetime; - - /** - * Date and time the payment was cancelled in ISO-8601 format. - * - * @var string|null - */ - public $expiredDatetime; - - /** - * The profile ID this payment belongs to. - * - * @example pfl_xH2kP6Nc6X - * @var string - */ - public $profileId; - - /** - * The customer ID this payment is performed by. - * - * @example cst_51EkUqla3 - * @var string|null - */ - public $customerId; - - /** - * Either "first", "recurring", or NULL for regular payments. - * - * @var string|null - */ - public $recurringType; - - /** - * The mandate ID this payment is performed with. - * - * @example mdt_pXm1g3ND - * @var string|null - */ - public $mandateId; - - /** - * The subscription ID this payment belongs to. - * - * @example sub_rVKGtNd6s3 - * @var string|null - */ - public $subscriptionId; - - /** - * The locale used for this payment. - * - * @var string|null - */ - public $locale; - - /** - * During creation of the payment you can set custom metadata that is stored with - * the payment, and given back whenever you retrieve that payment. - * - * @var object|mixed|null - */ - public $metadata; - - /** - * Details of a successfully paid payment are set here. For example, the iDEAL - * payment method will set $details->consumerName and $details->consumerAccount. - * - * @var object - */ - public $details; - - /** - * @var object - */ - public $links; - - - /** - * Is this payment cancelled? - * - * @return bool - */ - public function isCancelled () - { - return $this->status == self::STATUS_CANCELLED; - } - - - /** - * Is this payment expired? - * - * @return bool - */ - public function isExpired () - { - return $this->status == self::STATUS_EXPIRED; - } - - - /** - * Is this payment still open / ongoing? - * - * @return bool - */ - public function isOpen () - { - return $this->status == self::STATUS_OPEN; - } - - /** - * Is this payment pending? - * - * @return bool - */ - public function isPending () - { - return $this->status == self::STATUS_PENDING; - } - - /** - * Is this payment paid for? - * - * @return bool - */ - public function isPaid () - { - return !empty($this->paidDatetime); - } - - /** - * Is this payment (partially) refunded? - * - * @return bool - */ - public function isRefunded () - { - return $this->status == self::STATUS_REFUNDED; - } - - /** - * Is this payment charged back? - * - * @return bool - */ - public function isChargedBack () - { - return $this->status == self::STATUS_CHARGED_BACK; - } - - /** - * Check whether the 'recurringType' parameter has been defined for this payment. - * - * @return bool - */ - public function hasRecurringType () - { - return $this->hasRecurringTypeFirst() || $this->hasRecurringTypeRecurring(); - } - - /** - * Check whether 'recurringType' is set to 'first'. If a 'first' payment has been completed successfully, the - * consumer's account may be charged automatically using recurring payments. - * - * @return bool - */ - public function hasRecurringTypeFirst () - { - return $this->recurringType == self::RECURRINGTYPE_FIRST; - } - - /** - * Check whether 'recurringType' is set to 'recurring'. This type of payment is processed without involving - * the consumer. - * - * @return bool - */ - public function hasRecurringTypeRecurring () - { - return $this->recurringType == self::RECURRINGTYPE_RECURRING; - } - - /** - * Get the payment URL where the customer can complete the payment. - * - * @return string|null - */ - public function getPaymentUrl () - { - if (empty($this->links->paymentUrl)) - { - return NULL; - } - - return $this->links->paymentUrl; - } - - /** - * @return bool - */ - public function canBeRefunded () - { - return $this->amountRemaining !== NULL; - } - - /** - * @return bool - */ - public function canBePartiallyRefunded () - { - return $this->canBeRefunded(); - } - - /** - * Get the amount that is already refunded - * - * @return float - */ - public function getAmountRefunded () - { - if ($this->amountRefunded) - { - return floatval($this->amountRefunded); - } - - return 0; - } - - /** - * Get the remaining amount that can be refunded. For some payment methods this amount can be higher than - * the payment amount. This is possible to reimburse the costs for a return shipment to your customer for example. - * - * @return float - */ - public function getAmountRemaining () - { - if ($this->amountRemaining) - { - return floatval($this->amountRemaining); - } - - return 0; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Payment/Refund.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Payment/Refund.php deleted file mode 100755 index 34190024..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Payment/Refund.php +++ /dev/null @@ -1,120 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Payment_Refund -{ - /** - * The refund will be send to the bank on the next business day. You can still cancel the refund. - */ - const STATUS_PENDING = 'pending'; - - /** - * The refund has been sent to the bank. The refund amount will be transferred to the consumer account as soon as possible. - */ - const STATUS_PROCESSING = 'processing'; - - /** - * The refund amount has been transferred to the consumer. - */ - const STATUS_REFUNDED = 'refunded'; - - /** - * Id of the payment method. - * - * @var string - */ - public $id; - - /** - * The $amount that was refunded. - * - * @var float - */ - public $amount; - - /** - * The refund's description, if available. - * - * @var string|null - */ - public $description; - - /** - * The payment that was refunded. - * - * @var Mollie_API_Object_Payment - */ - public $payment; - - /** - * Date and time the payment was cancelled in ISO-8601 format. - * - * @var string|null - */ - public $refundedDatetime; - - /** - * The refund status - * - * @var string - */ - public $status; - - /** - * Is this refund pending? - * - * @return bool - */ - public function isPending () - { - return $this->status == self::STATUS_PENDING; - } - - /** - * Is this refund processing? - * - * @return bool - */ - public function isProcessing () - { - return $this->status == self::STATUS_PROCESSING; - } - - /** - * Is this refund transferred to consumer? - * - * @return bool - */ - public function isTransferred () - { - return $this->status == self::STATUS_REFUNDED; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Permission.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Permission.php deleted file mode 100755 index ed734d58..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Permission.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Permission -{ - /** - * Id of the permission. - * - * @var string - */ - public $id; - - /** - * Description of the permission. - * - * @var string - */ - public $description; - - /** - * Warning for the permission. - * - * @var string|NULL - */ - public $warning; - - /** - * True if this permission is granted. - * - * @var boolean - */ - public $granted; -} \ No newline at end of file diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Profile.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Profile.php deleted file mode 100755 index 4c2a2e09..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Profile.php +++ /dev/null @@ -1,109 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Profile -{ - /** - * Id of the payment profile. - * - * @var string - */ - public $id; - - /** - * Either "live" or "test". Indicates this being a test or a live (verified) profile. - * - * @var string - */ - public $mode; - - /** - * @var string - */ - public $name; - - /** - * @var string - */ - public $website; - - /** - * @var string - */ - public $email; - - /** - * @var string - */ - public $phone; - - /** - * Merchant category code. - * - * @see https://www.mollie.com/en/docs/profiles#profiles-object - * @var int - */ - public $categoryCode; - - /** - * Profile status. "unverified", "verified" or "blocked". - * - * @var string - */ - public $status; - - /** - * Review object with "status" property that's either "pending" or "rejected". - * - * @see https://www.mollie.com/en/docs/profiles#profiles-object - * - * @var object|null - */ - public $review; - - /** - * @var string - */ - public $createdDatetime; - - /** - * @var string - */ - public $updatedDatetime; - - /** - * If the App owner is also owner this profile, then links may contain a link - * to the live and test API keys of this profile. - * - * @var object - */ - public $links; -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Settlement.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Settlement.php deleted file mode 100755 index 1688d08c..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Object/Settlement.php +++ /dev/null @@ -1,74 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -class Mollie_API_Object_Settlement -{ - /** - * Id of the settlement. - * - * @var string - */ - public $id; - - /** - * The settlement reference. This corresponds to an invoice that's in your Dashboard. - * - * @var string - */ - public $reference; - - /** - * Total settlement amount in euros. - * - * @var double - */ - public $amount; - - /** - * @var string - */ - public $settledDatetime; - - /** - * Revenues and costs nested per year, per month, and per payment method. - * - * @see https://www.mollie.com/en/docs/settlements#settlements-object - * @var object - */ - public $periods; - - /** - * Payment IDs that were settled (either paid out or reversed). - * - * @var string[] - */ - public $paymentIds; -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Base.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Base.php deleted file mode 100755 index d55f2fa0..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Base.php +++ /dev/null @@ -1,406 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ -abstract class Mollie_API_Resource_Base -{ - const REST_CREATE = Mollie_API_Client::HTTP_POST; - const REST_UPDATE = Mollie_API_Client::HTTP_POST; - const REST_READ = Mollie_API_Client::HTTP_GET; - const REST_LIST = Mollie_API_Client::HTTP_GET; - const REST_DELETE = Mollie_API_Client::HTTP_DELETE; - - /** - * Default number of objects to retrieve when listing all objects. - */ - const DEFAULT_LIMIT = 50; - - /** - * @var Mollie_API_Client - */ - protected $api; - - /** - * @var string - */ - protected $resource_path; - - /** - * @var string|null - */ - protected $parent_id; - - /** - * @param Mollie_API_Client $api - */ - public function __construct(Mollie_API_Client $api) - { - $this->api = $api; - - if (empty($this->resource_path)) - { - $class_parts = explode("_", get_class($this)); - $this->resource_path = strtolower(end($class_parts)); - } - } - - /** - * @param array $filters - * @return string - * @throws Mollie_API_Exception - */ - private function buildQueryString (array $filters) - { - if (empty($filters)) - { - return ""; - } - - // Force & because of some PHP 5.3 defaults. - return "?" . http_build_query($filters, "", "&"); - } - - /** - * @param string $rest_resource - * @param $body - * @param array $filters - * @return object - * @throws Mollie_API_Exception - */ - private function rest_create($rest_resource, $body, array $filters) - { - $result = $this->performApiCall( - self::REST_CREATE, - $rest_resource . $this->buildQueryString($filters), - $body - ); - - return $this->copy($result, $this->getResourceObject()); - } - - /** - * Retrieves a single object from the REST API. - * - * @param string $rest_resource Resource name. - * @param string $id Id of the object to retrieve. - * @param array $filters - * @return object - * @throws Mollie_API_Exception - */ - private function rest_read ($rest_resource, $id, array $filters) - { - if (empty($id)) - { - throw new Mollie_API_Exception("Invalid resource id."); - } - - $id = urlencode($id); - $result = $this->performApiCall( - self::REST_READ, - "{$rest_resource}/{$id}" . $this->buildQueryString($filters) - ); - - return $this->copy($result, $this->getResourceObject()); - } - - /** - * Sends a DELETE request to a single Molle API object. - * - * @param string $rest_resource - * @param string $id - * - * @return object - * @throws Mollie_API_Exception - */ - private function rest_delete ($rest_resource, $id) - { - if (empty($id)) - { - throw new Mollie_API_Exception("Invalid resource id."); - } - - $id = urlencode($id); - $result = $this->performApiCall( - self::REST_DELETE, - "{$rest_resource}/{$id}" - ); - - return $this->copy($result, $this->getResourceObject()); - } - - /** - * Sends a POST request to a single Molle API object to update it. - * - * @param string $rest_resource - * @param string $id - * @param string $body - * - * @return object - * @throws Mollie_API_Exception - */ - protected function rest_update ($rest_resource, $id, $body) - { - if (empty($id)) - { - throw new Mollie_API_Exception("Invalid resource id."); - } - - $id = urlencode($id); - $result = $this->performApiCall( - self::REST_UPDATE, - "{$rest_resource}/{$id}", - $body - ); - - return $this->copy($result, $this->getResourceObject()); - } - - /** - * Get a collection of objects from the REST API. - * - * @param $rest_resource - * @param int $offset - * @param int $limit - * @param array $filters - * - * @return Mollie_API_Object_List - */ - private function rest_list($rest_resource, $offset = 0, $limit = self::DEFAULT_LIMIT, array $filters) - { - $filters = array_merge(array("offset" => $offset, "count" => $limit), $filters); - - $api_path = $rest_resource . $this->buildQueryString($filters); - - $result = $this->performApiCall(self::REST_LIST, $api_path); - - /** @var Mollie_API_Object_List $collection */ - $collection = $this->copy($result, new Mollie_API_Object_List); - - foreach ($result->data as $data_result) - { - $collection[] = $this->copy($data_result, $this->getResourceObject()); - } - - return $collection; - } - - /** - * Copy the results received from the API into the PHP objects that we use. - * - * @param object $api_result - * @param object $object - * - * @return object - */ - protected function copy($api_result, $object) - { - foreach ($api_result as $property => $value) - { - $object->$property = $value; - } - - return $object; - } - - /** - * Get the object that is used by this API. Every API uses one type of object. - * - * @return object - */ - abstract protected function getResourceObject(); - - /** - * Create a resource with the remote API. - * - * @param array $data An array containing details on the resource. Fields supported depend on the resource created. - * @param array $filters - * - * @return object - * @throws Mollie_API_Exception - */ - public function create(array $data = array(), array $filters = array()) - { - $encoded = json_encode($data); - - if (version_compare(phpversion(), "5.3.0", ">=")) - { - if (json_last_error() != JSON_ERROR_NONE) - { - throw new Mollie_API_Exception("Error encoding parameters into JSON: '" . json_last_error() . "'."); - } - } - else - { - if ($encoded === FALSE) - { - throw new Mollie_API_Exception("Error encoding parameters into JSON."); - } - } - - return $this->rest_create($this->getResourcePath(), $encoded, $filters); - } - - /** - * Retrieve information on a single resource from Mollie. - * - * Will throw a Mollie_API_Exception if the resource cannot be found. - * - * @param string $resource_id - * @param array $filters - * - * @return object - * @throws Mollie_API_Exception - */ - public function get ($resource_id, array $filters = array()) - { - return $this->rest_read($this->getResourcePath(), $resource_id, $filters); - } - - /** - * Delete a single resource from Mollie. - * - * Will throw a Mollie_API_Exception if the resource cannot be found. - * - * @param string $resource_id - * - * @return object - * @throws Mollie_API_Exception - */ - public function delete ($resource_id) - { - return $this->rest_delete($this->getResourcePath(), $resource_id); - } - - /** - * Retrieve all objects of a certain resource. - * - * @param int $offset - * @param int $limit - * @param array $filters - * - * @return Mollie_API_Object_List - */ - public function all ($offset = 0, $limit = 0, array $filters = array()) - { - return $this->rest_list($this->getResourcePath(), $offset, $limit, $filters); - } - - /** - * Perform an API call, and interpret the results and convert them to correct objects. - * - * @param $http_method - * @param $api_method - * @param null $http_body - * - * @return object - * @throws Mollie_API_Exception - */ - protected function performApiCall($http_method, $api_method, $http_body = NULL) - { - $body = $this->api->performHttpCall($http_method, $api_method, $http_body); - - if (empty($body)) - { - throw new Mollie_API_Exception("Unable to decode Mollie response: '{$body}'."); - } - - $object = @json_decode($body); - - if (json_last_error() != JSON_ERROR_NONE) - { - throw new Mollie_API_Exception("Unable to decode Mollie response: '{$body}'."); - } - - if (!empty($object->error)) - { - $exception = new Mollie_API_Exception("Error executing API call ({$object->error->type}): {$object->error->message}."); - - if (!empty($object->error->field)) - { - $exception->setField($object->error->field); - } - - throw $exception; - } - - return $object; - } - - /** - * @param string $resource_path - */ - public function setResourcePath ($resource_path) - { - $this->resource_path = strtolower($resource_path); - } - - /** - * @return string - * @throws Mollie_API_Exception - */ - public function getResourcePath () - { - if (strpos($this->resource_path, "_") !== FALSE) - { - list($parent_resource, $child_resource) = explode("_", $this->resource_path, 2); - - if (!strlen($this->parent_id)) - { - throw new Mollie_API_Exception("Subresource '{$this->resource_path}' used without parent '$parent_resource' ID."); - } - - return "$parent_resource/{$this->parent_id}/$child_resource"; - } - - return $this->resource_path; - } - - /** - * @param string $parent_id - * @return $this - */ - public function withParentId ($parent_id) - { - $this->parent_id = $parent_id; - - return $this; - } - - /** - * Set the resource to use a certain parent. Use this method before performing a get() or all() call. - * - * @param Mollie_API_Object_Payment|object $parent An object with an 'id' property - * @return $this - */ - public function with ($parent) - { - return $this->withParentId($parent->id); - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers.php deleted file mode 100755 index ad70e200..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Customer[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Customer get($id, array $filters = array()) - * @method Mollie_API_Object_Customer create(array $data, array $filters = array()) - */ -class Mollie_API_Resource_Customers extends Mollie_API_Resource_Base -{ - /** - * @param Mollie_API_Object_Customer $customer - * - * @return Mollie_API_Object_Customer - */ - public function update (Mollie_API_Object_Customer $customer) - { - $body = json_encode(array( - "name" => $customer->name, - "email" => $customer->email, - "locale" => $customer->locale, - "metadata" => $customer->metadata, - )); - - /** @var Mollie_API_Object_Customer $updated_customer */ - $updated_customer = $this->rest_update($this->getResourcePath(), $customer->id, $body); - - return $updated_customer; - } - - /** - * @return Mollie_API_Object_Customer - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Customer; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers/Mandates.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers/Mandates.php deleted file mode 100755 index bafbe97e..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers/Mandates.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Customer_Mandate[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Customer_Mandate get($mandate_id, array $filters = array()) - */ -class Mollie_API_Resource_Customers_Mandates extends Mollie_API_Resource_Base -{ - /** - * @var string - */ - protected $resource_path = "customers_mandates"; - - /** - * @return Mollie_API_Object_Customer_Mandate - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Customer_Mandate; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers/Payments.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers/Payments.php deleted file mode 100755 index df02efd8..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers/Payments.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Payment[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Payment create(array $data, array $filters = array()) - */ -class Mollie_API_Resource_Customers_Payments extends Mollie_API_Resource_Payments -{ - /** - * @var string - */ - protected $resource_path = "customers_payments"; -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers/Subscriptions.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers/Subscriptions.php deleted file mode 100755 index e2d0a98d..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Customers/Subscriptions.php +++ /dev/null @@ -1,62 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Customer_Subscription[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Customer_Subscription get($subscription_id, array $filters = array()) - */ -class Mollie_API_Resource_Customers_Subscriptions extends Mollie_API_Resource_Base -{ - /** - * @var string - */ - protected $resource_path = "customers_subscriptions"; - - /** - * @return Mollie_API_Object_Customer_Subscription - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Customer_Subscription; - } - - /** - * Cancel the given Subscription. This is just an alias of the 'delete' method. - * - * @param string $subscription_id - * - * @return Mollie_API_Object_Customer_Subscription - * @throws Mollie_API_Exception - */ - public function cancel ($subscription_id) - { - return $this->delete($subscription_id); - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Issuers.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Issuers.php deleted file mode 100755 index be62629f..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Issuers.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Issuer[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Issuer get($id, array $filters = array()) - */ -class Mollie_API_Resource_Issuers extends Mollie_API_Resource_Base -{ - /** - * @return Mollie_API_Object_Issuer - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Issuer; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Methods.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Methods.php deleted file mode 100755 index bacafc1a..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Methods.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Method[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Method get($id, array $filters = array()) - */ -class Mollie_API_Resource_Methods extends Mollie_API_Resource_Base -{ - /** - * @return Mollie_API_Object_Method - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Method; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Organizations.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Organizations.php deleted file mode 100755 index eee7634c..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Organizations.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Organization[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Organization get($id, array $filters = array()) - */ -class Mollie_API_Resource_Organizations extends Mollie_API_Resource_Base -{ - /** - * @return Mollie_API_Object_Organization - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Organization; - } - - /** - * Retrieve information on the currently logged in organization. - * - * Will throw a Mollie_API_Exception if the resource cannot be found. - * - * @return Mollie_API_Object_Organization - * @throws Mollie_API_Exception - */ - public function me () - { - return $this->get('me'); - } -} \ No newline at end of file diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Payments.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Payments.php deleted file mode 100755 index 3b6ba30a..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Payments.php +++ /dev/null @@ -1,116 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Payment[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Payment create(array $data, array $filters = array()) - */ -class Mollie_API_Resource_Payments extends Mollie_API_Resource_Base -{ - /** - * @var string - */ - const RESOURCE_ID_PREFIX = 'tr_'; - - /** - * @return Mollie_API_Object_Payment - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Payment; - } - - /** - * Retrieve a single payment from Mollie. - * - * Will throw a Mollie_API_Exception if the payment id is invalid or the resource cannot be found. - * - * @param string $payment_id - * @param array $filters - * @return Mollie_API_Object_Payment - * @throws Mollie_API_Exception - */ - public function get ($payment_id, array $filters = array()) - { - if (empty($payment_id) || strpos($payment_id, self::RESOURCE_ID_PREFIX) !== 0) - { - throw new Mollie_API_Exception("Invalid payment ID: '{$payment_id}'. A payment ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); - } - - return parent::get($payment_id, $filters); - } - - /** - * Issue a refund for the given payment. - * - * The $filters parameter may either be an array of endpoint parameters, a float value to - * initiate a partial refund, or empty to do a full refund. - * - * @param Mollie_API_Object_Payment $payment - * @param array|float|NULL $filters - * - * @return Mollie_API_Object_Payment_Refund - */ - public function refund (Mollie_API_Object_Payment $payment, $filters = array()) - { - $resource = "{$this->getResourcePath()}/" . urlencode($payment->id) . "/refunds"; - - if (!is_array($filters)) - { - if ((is_numeric($filters))) { - // $filters is numeric, so it must be an amount - $filters = array('amount' => $filters); - } - else - { - // $filters is not an array, but also not an amount, so reset $filters - $filters = array(); - } - } - - $body = NULL; - if (count($filters) > 0) - { - $body = json_encode($filters); - } - - $result = $this->performApiCall(self::REST_CREATE, $resource, $body); - - /* - * Update the payment with the new properties that we got from the refund. - */ - if (!empty($result->payment)) - { - $this->copy($result->payment, $payment); - } - - return $this->copy($result, new Mollie_API_Object_Payment_Refund); - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Payments/Refunds.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Payments/Refunds.php deleted file mode 100755 index d8b83886..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Payments/Refunds.php +++ /dev/null @@ -1,62 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Payment_Refund[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Payment_Refund get($resource_id, array $filters = array()) - */ -class Mollie_API_Resource_Payments_Refunds extends Mollie_API_Resource_Base -{ - /** - * @var string - */ - protected $resource_path = "payments_refunds"; - - /** - * @return Mollie_API_Object_Method - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Payment_Refund; - } - - /** - * Cancel the given Refund. This is just an alias of the 'delete' method. - * - * @param string $refund_id - * - * @return Mollie_API_Object_Payment_Refund - * @throws Mollie_API_Exception - */ - public function cancel ($refund_id) - { - return $this->delete($refund_id); - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Permissions.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Permissions.php deleted file mode 100755 index 9336e321..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Permissions.php +++ /dev/null @@ -1,62 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Permission[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Permission get($id, array $filters = array()) - */ -class Mollie_API_Resource_Permissions extends Mollie_API_Resource_Base -{ - /** - * @return Mollie_API_Object_Permission - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Permission; - } - - /** - * Returns true if the requested permission is granted, false otherwise. - * - * @param string $permission_id - * @return bool - */ - public function isGranted ($permission_id) - { - $permission = $this->get($permission_id); - - if ($permission && $permission->granted) - { - return TRUE; - } - - return FALSE; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Profiles.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Profiles.php deleted file mode 100755 index e7d267a1..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Profiles.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Profile[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Profile get($id, array $filters = array()) - */ -class Mollie_API_Resource_Profiles extends Mollie_API_Resource_Base -{ - /** - * @return Mollie_API_Object_Profile - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Profile; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Refunds.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Refunds.php deleted file mode 100755 index 5f4090d4..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Refunds.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Payment_Refund[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Payment_Refund get($resource_id, array $filters = array()) - */ -class Mollie_API_Resource_Refunds extends Mollie_API_Resource_Base -{ - /** - * @var string - */ - protected $resource_path = "refunds"; - - /** - * @return Mollie_API_Object_Method - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Payment_Refund; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Settlements.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Settlements.php deleted file mode 100755 index e547c84b..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Settlements.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method Mollie_API_Object_Settlement[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method Mollie_API_Object_Settlement get($id, array $filters = array()) - */ -class Mollie_API_Resource_Settlements extends Mollie_API_Resource_Base -{ - /** - * @return Mollie_API_Object_Settlement - */ - protected function getResourceObject () - { - return new Mollie_API_Object_Settlement; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Undefined.php b/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Undefined.php deleted file mode 100755 index f88d662a..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Resource/Undefined.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @method stdClass[]|Mollie_API_Object_List all($offset = 0, $limit = 0, array $filters = array()) - * @method stdClass get($id, array $filters = array()) - */ -class Mollie_API_Resource_Undefined extends Mollie_API_Resource_Base -{ - /** - * @return stdClass - */ - protected function getResourceObject () - { - return new stdClass; - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/tests/apiUnitTest.php b/catalog/controller/extension/payment/mollie-api-client/tests/apiUnitTest.php deleted file mode 100644 index 60ec9096..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/tests/apiUnitTest.php +++ /dev/null @@ -1,325 +0,0 @@ -compatibilityChecker = $this->getMock("Mollie_API_CompatibilityChecker", array("checkCompatibility")); - $this->api = $this->getMock("Mollie_API_Client", array("performHttpCall", "getCompatibilityChecker"), array(), '', FALSE); - - $this->api->expects($this->any()) - ->method("getCompatibilityChecker") - ->will($this->returnValue($this->compatibilityChecker)); - - // Call constructor after set expectations - $this->api->__construct(); - } - - /** - * @expectedException Mollie_API_Exception - * @expectedExceptionMessage Invalid API key: 'invalid'. An API key must start with 'test_' or 'live_'. - */ - public function testSettingInvalidApiKeyFails () - { - $api = $this->getMock("Mollie_API_Client", NULL, array(), '', FALSE); - $api->setApiKey("invalid"); - } - - /** - * @expectedException Mollie_API_Exception - * @expectedExceptionMessage You have not set an API key. Please use setApiKey() to set the API key. - */ - public function testNotSettingApiKeyGivesException() - { - $this->api = $this->getMock("Mollie_API_Client", array('getCompatibilityChecker'), array(), '', FALSE); - $this->api->expects($this->any()) - ->method("getCompatibilityChecker") - ->will($this->returnValue($this->compatibilityChecker)); - - $this->api->__construct(); - $this->api->payments->all(); - } - - /** - * @expectedException Mollie_API_Exception - * @expectedExceptionMessage Unable to decode Mollie response: ''. - */ - public function testCreatePaymentFailsEmptyHttpBody () - { - $this->api->expects($this->once()) - ->method("performHttpCall") - ->with(Mollie_API_Client::HTTP_POST, "payments?profileId=pfl_wdy%21aA6Zy", '{"amount":100,"description":"Order #1337 24 Roundhousekicks","redirectUrl":"http:\/\/www.chucknorris.rhk\/return.php"}') - ->will($this->returnValue("")); - - $this->api->payments->create(array( - "amount" => 100.00, - "description" => "Order #1337 24 Roundhousekicks", - "redirectUrl" => "http://www.chucknorris.rhk/return.php", - ), array( - "profileId" => "pfl_wdy!aA6Zy", - )); - } - - /** - * @expectedException Mollie_API_Exception - * @expectedExceptionMessage Error executing API call (request): Unauthorized request. - */ - public function testCreatePaymentFailsError () - { - $this->api->expects($this->once()) - ->method("performHttpCall") - ->with(Mollie_API_Client::HTTP_POST, "payments", '{"amount":100,"description":"Order #1337 24 Roundhousekicks","redirectUrl":"http:\/\/www.chucknorris.rhk\/return.php"}') - ->will($this->returnValue('{ "error":{ "type":"request", "message":"Unauthorized request", "links":{ "documentation":"https://www.mollie.nl/api/docs/" } } }')); - - $this->api->payments->create(array( - "amount" => 100.00, - "description" => "Order #1337 24 Roundhousekicks", - "redirectUrl" => "http://www.chucknorris.rhk/return.php", - )); - } - - /** - * @expectedException Mollie_API_Exception - * @expectedExceptionMessage Error encoding parameters into JSON: '5'. - * @requires PHP 5.3.0 - */ - public function testCreatePaymentJsonFailsPhp53 () - { - $this->api->expects($this->never()) - ->method("performHttpCall"); - - $this->api->payments->create(array( - "amount" => 100.00, - "description" => "Order #1337 24 Roundhousekicks \x80 15,-", - "redirectUrl" => "http://www.chucknorris.rhk/return.php", - )); - } - - public function testCreatePaymentWorksCorrectly () - { - $this->api->expects($this->once()) - ->method("performHttpCall") - ->with(Mollie_API_Client::HTTP_POST, "payments", '{"amount":100,"description":"Order #1337 24 Roundhousekicks","redirectUrl":"http:\/\/www.chucknorris.rhk\/return.php"}') - ->will($this->returnValue('{ "id":"tr_d0b0E3EA3v", "mode":"test", "createdDatetime":"2013-11-21T09:57:08.0Z", "status":"open", "amount":100, "description":"Order #1225", "method":null, "details":null, "links":{ "paymentUrl":"https://www.mollie.nl/payscreen/pay/d0b0E3EA3v" } }')); - - /** @var Mollie_API_Object_Payment $payment */ - $payment = $this->api->payments->create(array( - "amount" => 100.00, - "description" => "Order #1337 24 Roundhousekicks", - "redirectUrl" => "http://www.chucknorris.rhk/return.php", - )); - - $this->assertEquals("tr_d0b0E3EA3v", $payment->id); - $this->assertEquals("Order #1225", $payment->description); - $this->assertNull($payment->method); - $this->assertEquals("2013-11-21T09:57:08.0Z", $payment->createdDatetime); - - $this->assertEquals(Mollie_API_Object_Payment::STATUS_OPEN, $payment->status); - $this->assertTrue($payment->isOpen()); - $this->assertFalse($payment->isPaid()); - $this->assertFalse($payment->isExpired()); - $this->assertFalse($payment->isCancelled()); - - $this->assertEquals("https://www.mollie.nl/payscreen/pay/d0b0E3EA3v", $payment->getPaymentUrl()); - $this->assertNull($payment->metadata); - } - - /** - * @group refunds - */ - public function testCreateRefundWorksCorrectly () - { - $this->api->expects($this->once()) - ->method("performHttpCall") - ->with(Mollie_API_Client::HTTP_POST, "payments/tr_OCrlrHqKsr/refunds", '{"amount":60.33}') - ->will($this->returnValue('{"id":"re_O3UbDhODzG","payment":{"id":"tr_OCrlrHqKsr","mode":"live","createdDatetime":"2014-09-15T09:24:39.0Z","status":"refunded","expiryPeriod":"PT15M","paidDatetime":"2014-09-15T09:28:29.0Z","amount":"100.00","amountRefunded":"60.33","description":"15 Round House Kicks To The Face","method":"ideal","metadata":null,"details":{"consumerName":"Hr E G H K\u00fcppers en/of MW M.J. K\u00fcppers-Veeneman","consumerAccount":"NL53INGB0654422370","consumerBic":"INGBNL2A"},"links":{"redirectUrl":"http://www.example.org/return.php"}},"amount":"60.33","refundedDatetime":"2014-09-15T09:24:39.0Z"}')); - - $payment = new Mollie_API_Object_Payment(); - $payment->id = "tr_OCrlrHqKsr"; - - /** @var Mollie_API_Object_Payment $payment */ - $refund = $this->api->payments->refund($payment, 60.33); - - $this->assertEquals("re_O3UbDhODzG", $refund->id); - $this->assertEquals(60.33, $refund->amount); - $this->assertEquals("2014-09-15T09:24:39.0Z", $refund->refundedDatetime); - - $this->assertEquals("tr_OCrlrHqKsr", $payment->id); - $this->assertEquals("15 Round House Kicks To The Face", $payment->description); - $this->assertEquals(Mollie_API_Object_Method::IDEAL, $payment->method); - $this->assertEquals("2014-09-15T09:24:39.0Z", $payment->createdDatetime); - $this->assertEquals(Mollie_API_Object_Payment::STATUS_REFUNDED, $payment->status); - - $this->assertFalse($payment->isOpen()); - $this->assertFalse($payment->isExpired()); - $this->assertFalse($payment->isCancelled()); - $this->assertTrue($payment->isPaid()); - $this->assertTrue($payment->isRefunded()); - - $this->assertNull($payment->metadata); - } - - /** - * @dataProvider dpInvalidPaymentId - */ - public function testGetPaymentFailsWithInvalidPaymentId ($payment_id) - { - $this->setExpectedException('Mollie_API_Exception', "Invalid payment ID: '{$payment_id}'. A payment ID should start with 'tr_'."); - - $this->api->payments->get($payment_id); - } - - public function dpInvalidPaymentId () - { - return array( - array(NULL), - array(''), - array('d0b0E3EA3v') - ); - } - - public function testGetPaymentWorksCorrectly () - { - $this->api->expects($this->once()) - ->method("performHttpCall") - ->with(Mollie_API_Client::HTTP_GET, "payments/tr_d0b0E3EA3v?count=1&profileId=pfl_wdy%21aA6Zy") - ->will($this->returnValue('{ "id":"tr_d0b0E3EA3v", "mode":"test", "createdDatetime":"2013-11-21T09:57:08.0Z", "status":"open", "amount":100, "description":"Order #1225", "method":null, "details":null, "links":{ "paymentUrl":"https://www.mollie.nl/payscreen/pay/d0b0E3EA3v" } }')); - - /** @var Mollie_API_Object_Payment $payment */ - $payment = $this->api->payments->get("tr_d0b0E3EA3v", array( - "count" => "1", - "profileId" => "pfl_wdy!aA6Zy", - )); - - $this->assertEquals("tr_d0b0E3EA3v", $payment->id); - $this->assertEquals("Order #1225", $payment->description); - $this->assertNull($payment->method); - $this->assertEquals("2013-11-21T09:57:08.0Z", $payment->createdDatetime); - $this->assertEquals(Mollie_API_Object_Payment::STATUS_OPEN, $payment->status); - - $this->assertTrue($payment->isOpen()); - $this->assertFalse($payment->isPaid()); - $this->assertFalse($payment->isExpired()); - $this->assertFalse($payment->isCancelled()); - - $this->assertEquals("https://www.mollie.nl/payscreen/pay/d0b0E3EA3v", $payment->getPaymentUrl()); - $this->assertNull($payment->metadata); - } - - public function testGetPaymentsWorksCorrectly () - { - $this->api->expects($this->once()) - ->method("performHttpCall") - ->with(Mollie_API_Client::HTTP_GET, "payments?offset=0&count=0") - ->will($this->returnValue('{ - "totalCount":1, - "offset":0, - "count":1, - "data":[ - { - "id":"tr_d0b0E3EA3v", "mode":"test", "createdDatetime":"2013-11-21T09:57:08.0Z", "expiryPeriod": "P12DT11H30M45S", "status":"open", "amount":100, "description":"Order #1225", "method":null, "details":null, "links":{ "paymentUrl":"https://www.mollie.nl/payscreen/pay/d0b0E3EA3v" } - } - ], - "links":{ - "first":null, - "previous":null, - "next":null, - "last":null - } -}')); - - $collection = $this->api->payments->all(); - $this->assertCount(1, $collection); - - /** @var Mollie_API_Object_Payment $payment */ - $payment = $collection[0]; - - $this->assertEquals("tr_d0b0E3EA3v", $payment->id); - $this->assertEquals("Order #1225", $payment->description); - $this->assertNull($payment->method); - $this->assertEquals("P12DT11H30M45S", $payment->expiryPeriod); - $this->assertEquals("2013-11-21T09:57:08.0Z", $payment->createdDatetime); - $this->assertEquals(Mollie_API_Object_Payment::STATUS_OPEN, $payment->status); - $this->assertTrue($payment->isOpen()); - $this->assertFalse($payment->isPaid()); - $this->assertFalse($payment->isExpired()); - $this->assertFalse($payment->isCancelled()); - $this->assertEquals("https://www.mollie.nl/payscreen/pay/d0b0E3EA3v", $payment->getPaymentUrl()); - $this->assertNull($payment->metadata); - } - - public function testMethodsWorksCorrectly () - { - $this->api->expects($this->once()) - ->method("performHttpCall") - ->with(Mollie_API_Client::HTTP_GET, "methods?offset=0&count=0&locale=de") - ->will($this->returnValue('{"totalCount":4,"offset":0,"count":4,"data":[{"id":"sofort","description":"SOFORT \u00dcberweisung","amount":{"minimum":"0.31","maximum":"5000.00"},"image":{"normal":"https://www.mollie.com/images/payscreen/methods/sofort.png","bigger":"https://www.mollie.com/images/payscreen/methods/sofort@2x.png"}},{"id":"ideal","description":"iDEAL","amount":{"minimum":"0.55","maximum":"50000.00"},"image":{"normal":"https://www.mollie.com/images/payscreen/methods/ideal.png","bigger":"https://www.mollie.com/images/payscreen/methods/ideal@2x.png"}},{"id":"mistercash","description":"Bancontact/Mister Cash","amount":{"minimum":"0.31","maximum":"10000.00"},"image":{"normal":"https://www.mollie.com/images/payscreen/methods/mistercash.png","bigger":"https://www.mollie.com/images/payscreen/methods/mistercash@2x.png"}},{"id":"belfius","description":"Belfius Direct Net","amount":{"minimum":"0.31","maximum":"50000.00"},"image":{"normal":"https://www.mollie.com/images/payscreen/methods/belfius.png","bigger":"https://www.mollie.com/images/payscreen/methods/belfius@2x.png"}}]}')); - - $methods = $this->api->methods->all(0, 0, array("locale" => "de")); - - $this->assertCount(4, $methods); - $this->assertInstanceOf("Mollie_API_Object_List", $methods); - - foreach ($methods as $method) - { - $this->assertInstanceof("Mollie_API_Object_Method", $method); - } - } - - public function testUndefinedResourceCallsResourceEndpoint () - { - $this->api->expects($this->once()) - ->method("performHttpCall") - ->with(Mollie_API_Client::HTTP_GET, "foobars/foobar_ID?f=B") - ->will($this->returnValue("{}")); - - $this->api->FooBars->get("foobar_ID", array("f" => "B")); - } - - public function testUndefinedSubresourceRequiresParentId () - { - $this->api->expects($this->never()) - ->method("performHttpCall"); - - $this->setExpectedException("Mollie_API_Exception", "Subresource 'foos_bars' used without parent 'foos' ID."); - - $this->api->Foos_Bars->get("bar_ID", array("f" => "B")); - } - - public function testUndefinedSubesourceCallsSubresourceEndpointWithParentId () - { - $this->api->expects($this->once()) - ->method("performHttpCall") - ->with(Mollie_API_Client::HTTP_GET, "foos/foo_PARENT/bars/bar_CHILD?f=B") - ->will($this->returnValue("{}")); - - $this->api->Foos_Bars->withParentId("foo_PARENT")->get("bar_CHILD", array("f" => "B")); - } - - public function testUndefinedSubesourceCallsSubresourceEndpointWithParentObject () - { - $this->api->expects($this->once()) - ->method("performHttpCall") - ->with(Mollie_API_Client::HTTP_GET, "foos/foo_PARENT/bars/bar_CHILD?f=B") - ->will($this->returnValue("{}")); - - $parent = new stdClass; - $parent->id = "foo_PARENT"; - - $this->api->Foos_Bars->with($parent)->get("bar_CHILD", array("f" => "B")); - } -} diff --git a/catalog/controller/extension/payment/mollie-api-client/tests/bootstrap.php b/catalog/controller/extension/payment/mollie-api-client/tests/bootstrap.php deleted file mode 100644 index 186ab7c9..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/tests/bootstrap.php +++ /dev/null @@ -1,5 +0,0 @@ -checker = $this->getMock("Mollie_API_CompatibilityChecker", array("satisfiesPhpVersion", "satisfiesJsonExtension", "satisfiesCurlExtension", "satisfiesCurlFunctions")); - } - - /** - * @expectedException Mollie_API_Exception_IncompatiblePlatform - * @expectedExceptionCode Mollie_API_Exception_IncompatiblePlatform::INCOMPATIBLE_PHP_VERSION - */ - public function testCheckCompatibilityThrowsExceptionOnPhpVersion () - { - $this->checker->expects($this->once()) - ->method("satisfiesPhpVersion") - ->will($this->returnValue(FALSE)); // Fail - - $this->checker->expects($this->never()) - ->method("satisfiesJsonExtension"); - - $this->checker->expects($this->never()) - ->method("satisfiesCurlExtension"); - - $this->checker->expects($this->never()) - ->method("satisfiesCurlFunctions"); - - $this->checker->checkCompatibility(); - } - - /** - * @expectedException Mollie_API_Exception_IncompatiblePlatform - * @expectedExceptionCode Mollie_API_Exception_IncompatiblePlatform::INCOMPATIBLE_JSON_EXTENSION - */ - public function testCheckCompatibilityThrowsExceptionOnJsonExtension () - { - $this->checker->expects($this->once()) - ->method("satisfiesPhpVersion") - ->will($this->returnValue(TRUE)); - - $this->checker->expects($this->once()) - ->method("satisfiesJsonExtension") - ->will($this->returnValue(FALSE)); // Fail - - $this->checker->expects($this->never()) - ->method("satisfiesCurlExtension"); - - $this->checker->expects($this->never()) - ->method("satisfiesCurlFunctions"); - - $this->checker->checkCompatibility(); - } - - /** - * @expectedException Mollie_API_Exception_IncompatiblePlatform - * @expectedExceptionCode Mollie_API_Exception_IncompatiblePlatform::INCOMPATIBLE_CURL_EXTENSION - */ - public function testCheckCompatibilityThrowsExceptionOnCurlExtension () - { - $this->checker->expects($this->once()) - ->method("satisfiesPhpVersion") - ->will($this->returnValue(TRUE)); - - $this->checker->expects($this->once()) - ->method("satisfiesJsonExtension") - ->will($this->returnValue(TRUE)); - - $this->checker->expects($this->once()) - ->method("satisfiesCurlExtension") - ->will($this->returnValue(FALSE)); // Fail - - $this->checker->expects($this->never()) - ->method("satisfiesCurlFunctions"); - - $this->checker->checkCompatibility(); - } - - /** - * @expectedException Mollie_API_Exception_IncompatiblePlatform - * @expectedExceptionCode Mollie_API_Exception_IncompatiblePlatform::INCOMPATIBLE_CURL_FUNCTION - */ - public function testCheckCompatibilityThrowsExceptionOnCurlFunctions () - { - $this->checker->expects($this->once()) - ->method("satisfiesPhpVersion") - ->will($this->returnValue(TRUE)); - - $this->checker->expects($this->once()) - ->method("satisfiesJsonExtension") - ->will($this->returnValue(TRUE)); - - $this->checker->expects($this->once()) - ->method("satisfiesCurlExtension") - ->will($this->returnValue(TRUE)); - - $this->checker->expects($this->once()) - ->method("satisfiesCurlFunctions") - ->will($this->returnValue(FALSE)); // Fail - - $this->checker->checkCompatibility(); - } -} \ No newline at end of file diff --git a/catalog/controller/extension/payment/mollie-api-client/tests/resourceUnitTest.php b/catalog/controller/extension/payment/mollie-api-client/tests/resourceUnitTest.php deleted file mode 100644 index 77c70d47..00000000 --- a/catalog/controller/extension/payment/mollie-api-client/tests/resourceUnitTest.php +++ /dev/null @@ -1,43 +0,0 @@ -assertSame("payments", $resource->getResourcePath()); - } - - public function testGetResourcePathSubresourceFails() - { - $this->setExpectedException("Mollie_API_Exception", "Subresource 'payments_refunds' used without parent 'payments' ID."); - - $resource = new Mollie_API_Resource_Payments_Refunds(new Mollie_API_Client); - $resource->getResourcePath(); - } - - public function testGetResourcePathSubresourceWorks() - { - $resource = new Mollie_API_Resource_Payments_Refunds(new Mollie_API_Client); - - $this->assertSame("payments/tr_1237191/refunds", $resource->withParentId("tr_1237191")->getResourcePath()); - } - - public function testSetResourcePathWorks() - { - $resource = new Mollie_API_Resource_Payments_Refunds(new Mollie_API_Client); - $resource->setResourcePath("requests_responses"); - - $this->assertSame("requests/req_8192398/responses", $resource->withParentId("req_8192398")->getResourcePath()); - } - - public function testWithWorks() - { - $resource = new Mollie_API_Resource_Payments_Refunds(new Mollie_API_Client); - $payment = new Mollie_API_Object_Payment; - $payment->id = "tr_1237191"; - - $this->assertSame("payments/tr_1237191/refunds", $resource->with($payment)->getResourcePath()); - } -} diff --git a/catalog/controller/extension/payment/mollie/base.php b/catalog/controller/extension/payment/mollie/base.php deleted file mode 100644 index 5784c033..00000000 --- a/catalog/controller/extension/payment/mollie/base.php +++ /dev/null @@ -1,710 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @property Config $config - * @property Currency $currency - * @property array $data - * @property Document $document - * @property Language $language - * @property Loader $load - * @property Log $log - * @property ModelCheckoutOrder $model_checkout_order - * @property Request $request - * @property Response $response - * @property Session $session - * @property URL $url - * - * @method render - */ -require_once(dirname(DIR_SYSTEM) . "/catalog/controller/extension/payment/mollie/helper.php"); - -class ControllerExtensionPaymentMollieBase extends Controller -{ - // Current module name - should be overwritten by subclass using one of the values below. - const MODULE_NAME = NULL; - - /** - * @return Mollie_API_Client - */ - protected function getAPIClient () - { - return MollieHelper::getAPIClient($this->config); - } - - /** - * @return ModelExtensionPaymentMollieBase - */ - protected function getModuleModel () - { - $model_name = "model_extension_payment_mollie_" . static::MODULE_NAME; - - if (!isset($this->$model_name)) - { - $this->load->model("extension/payment/mollie_" . static::MODULE_NAME); - } - - return $this->$model_name; - } - - /** - * Get the order we are processing from OpenCart. - * - * @return array - */ - protected function getOpenCartOrder () - { - $this->load->model("checkout/order"); - $order_id = 0; - - if (empty($this->session->data['order_id']) && !isset($this->request->get['order_id'])) - { - return array(); - } - else if (isset($this->request->get['order_id'])) - { - $order_id = $this->request->get['order_id']; - } - else - { - // assuming a session order_id if session order_id is not empty And no get request order_id - $order_id = $this->session->data['order_id']; - } - - // Load last order from session - return $this->model_checkout_order->getOrder($order_id); - } - - /** - * This gets called by OpenCart at the final checkout step and should generate a confirmation button. - */ - public function index () - { - $this->load->language("extension/payment/mollie"); - - // Set template data. - $data['action'] = $this->url->link("extension/payment/mollie_" . static::MODULE_NAME . "/payment", "", "SSL"); - $data['message'] = $this->language; - $data['issuers'] = $this->getIssuers(); - $data['text_issuer'] = $this->language->get("text_issuer"); - $data['set_issuer_url'] = $this->url->link("extension/payment/mollie_" . static::MODULE_NAME . "/set_issuer", "", "SSL"); - - // Return HTML output - it will get appended to confirm.tpl. - return $this->renderTemplate("mollie_checkout_form", $data, array(), FALSE); - } - - /** - * Get all issuers for the current payment method. - * - * @return array - */ - public function getIssuers () - { - $issuers = $this->getAPIClient()->issuers->all(); - $issuers_for_method = array(); - - foreach ($issuers as $issuer) - { - if ($issuer->method == static::MODULE_NAME) - { - $issuers_for_method[] = $issuer; - } - } - - return $issuers_for_method; - } - - /** - * The payment action creates the payment and redirects the customer to the selected bank. - * - * It is called when the customer submits the button generated in the mollie_checkout_form template. - */ - public function payment () - { - if ($this->request->server['REQUEST_METHOD'] == "POST") - { - try - { - $api = $this->getAPIClient(); - } - catch (Mollie_API_Exception $e) - { - $this->showErrorPage($e->getMessage()); - return; - } - - // Load essentials - $this->load->language("extension/payment/mollie"); - - $model = $this->getModuleModel(); - $order = $this->getOpenCartOrder(); - - $amount = $this->currency->convert($order['total'], $this->config->get("config_currency"), "EUR"); - - $amount = round($amount, 2); - $description = str_replace("%", $order['order_id'], html_entity_decode($this->config->get("mollie_ideal_description"), ENT_QUOTES, "UTF-8")); - $return_url = $this->url->link("extension/payment/mollie_" . static::MODULE_NAME . "/callback&order_id=".$order['order_id'], "", "SSL"); - $issuer = $this->getIssuer(); - - try - { - $data = array( - "amount" => $amount, - "description" => $description, - "redirectUrl" => $return_url, - "webhookUrl" => $this->getWebhookUrl(), - "metadata" => array("order_id" => $order['order_id']), - "method" => static::MODULE_NAME, - "issuer" => $issuer, - - /* - * This data is sent along for credit card payments / fraud checks. You can remove this but you will - * have a higher conversion if you leave it here. - */ - - "billingCity" => $order['payment_city'], - "billingRegion" => $order['payment_zone'], - "billingPostal" => $order['payment_postcode'], - "billingCountry" => $order['payment_iso_code_2'], - - "shippingAddress" => $order['shipping_address_1'] ? $order['shipping_address_1'] : NULL, - "shippingCity" => $order['shipping_city'] ? $order['shipping_city'] : $order['payment_city'], - "shippingRegion" => $order['shipping_zone'] ? $order['shipping_zone'] : $order['payment_zone'], - "shippingPostal" => $order['shipping_postcode'] ? $order['shipping_postcode'] : $order['payment_postcode'], - "shippingCountry" => $order['shipping_iso_code_2'] ? $order['shipping_iso_code_2'] : $order['payment_iso_code_2'], - ); - - // Create the payment, if succeeded confirm the order and redirect the customer to the bank - try - { - $payment = $api->payments->create($data); - } - catch (Mollie_API_Exception $e) - { - // If it fails because of the webhookUrl then clear it and retry. - if ($e->getField() == "webhookUrl") - { - unset($data['webhookUrl']); - $payment = $api->payments->create($data); - } - else - { - throw $e; - } - } - } - catch (Mollie_Api_Exception $e) - { - $this->showErrorPage($e->getMessage()); - return; - } - - // Some payment methods can't be cancelled. They need an initial order status. - if ($this->startAsPending()) - { - $this->addOrderHistory($order, $this->config->get("mollie_ideal_pending_status_id"), $this->language->get("text_redirected"), FALSE); - } - - $model->setPayment($order['order_id'], $payment->id); - - // Redirect to payment gateway. - $this->redirect($payment->links->paymentUrl); - } - } - - /** - * Some payment methods can't be cancelled. They need 'pending' as an initial order status. - * - * @return bool - */ - protected function startAsPending () - { - return FALSE; - } - - /** - * This action is getting called by Mollie to report the payment status - */ - public function webhook () - { - // Mollie called this webhook to verify if it was reachable - if (!empty($this->request->get['testByMollie'])) - { - // returns status 200 - return; - } - - $payment_id = isset($this->request->post['id']) ? $this->request->post['id'] : 0; - - if (empty($payment_id)) - { - header("HTTP/1.0 400 Bad Request"); - echo "No ID received."; - return; - } - - $payment = $this->getAPIClient()->payments->get($payment_id); - - // Load essentials - $this->load->model("checkout/order"); - $this->getModuleModel(); - $this->load->language("extension/payment/mollie"); - - //Get order_id of this transaction from db - $order = $this->model_checkout_order->getOrder($payment->metadata->order_id); - - if (!empty($order)) - { - // Only process the status if the order is stateless or in 'pending' status. - if (empty($order['order_status_id']) || $order['order_status_id'] == $this->config->get("mollie_ideal_pending_status_id")) - { - // Order paid ('processed'). - if ($payment->isPaid()) - { - $new_status_id = intval($this->config->get("mollie_ideal_processing_status_id")); - - if (!$new_status_id) - { - echo "The payment has been received. No 'processing' status ID is configured, so the order status could not be updated."; - return; - } - - $this->addOrderHistory($order, $new_status_id, $this->language->get("response_success"), TRUE); - - echo "The payment was received and the order was moved to the 'processing' status (new status ID: {$new_status_id}."; - return; - } - - // Order cancelled. - if ($payment->status == Mollie_API_Object_Payment::STATUS_CANCELLED) - { - $new_status_id = intval($this->config->get("mollie_ideal_canceled_status_id")); - - if (!$new_status_id) - { - echo "The payment was cancelled. No 'cancelled' status ID is configured, so the order status could not be updated."; - return; - } - - $this->addOrderHistory($order, $new_status_id, $this->language->get("response_cancelled"), FALSE); - - echo "The payment was cancelled and the order was moved to the 'cancelled' status (new status ID: {$new_status_id})."; - return; - } - - // Order expired. - if ($payment->status == Mollie_API_Object_Payment::STATUS_EXPIRED) - { - $new_status_id = intval($this->config->get("mollie_ideal_expired_status_id")); - - if (!$new_status_id) - { - echo "The payment expired. No 'expired' status ID is configured, so the order status could not be updated."; - return; - } - - $this->addOrderHistory($order, $new_status_id, $this->language->get("response_expired"), FALSE); - - echo "The payment expired and the order was moved to the 'expired' status (new status ID: {$new_status_id})."; - return; - } - - // Otherwise, order failed. - $new_status_id = intval($this->config->get("mollie_ideal_failed_status_id")); - - if (!$new_status_id) - { - echo "The payment failed. No 'failed' status ID is configured, so the order status could not be updated."; - return; - } - - $this->addOrderHistory($order, $new_status_id, $this->language->get("response_unknown"), FALSE); - - echo "The payment failed for an unknown reason and the order was moved to the 'failed' status (new status ID: {$new_status_id})."; - return; - } - - echo "The order was already processed before (order status ID: " . intval($order['order_status_id']) . ")."; - return; - } - - header("HTTP/1.0 404 Not Found"); - echo "Could not find order."; - } - - /** - * Gets called via AJAX from the checkout form to store the selected issuer. - */ - public function set_issuer () - { - if (!empty($this->request->post['mollie_issuer_id'])) - { - $this->session->data['mollie_issuer'] = $this->request->post['mollie_issuer_id']; - } - else - { - $this->session->data['mollie_issuer'] = NULL; - } - - echo $this->session->data['mollie_issuer']; - } - - /** - * Retrieve the issuer if one was selected. Return NULL otherwise. - * - * @return string|NULL - */ - protected function getIssuer () - { - if (!empty($this->request->post['mollie_issuer'])) - { - return $this->request->post['mollie_issuer']; - } - - if (!empty($this->session->data['mollie_issuer'])) - { - return $this->session->data['mollie_issuer']; - } - - return NULL; - } - - /** - * Customer returning from the bank with an transaction_id - * Depending on what the state of the payment is they get redirected to the corresponding page - */ - public function callback () - { - $order = $this->getOpenCartOrder(); - - // Load required translations. - $this->load->language("extension/payment/mollie"); - - // Show a 'transaction failed' page if we couldn't find the order or if the payment failed. - $failed_status_id = $this->config->get("mollie_ideal_failed_status_id"); - - if (!$order || ($failed_status_id && $order['order_status_id'] == $failed_status_id)) - { - return $this->showReturnPage( - $this->language->get("heading_failed"), - $this->language->get("msg_failed") - ); - } - - // If the order status is 'processing' (i.e. 'paid'), redirect to OpenCart's default 'success' page. - if ($order["order_status_id"] == $this->config->get("mollie_ideal_processing_status_id")) - { - if ($this->cart) - { - $this->cart->clear(); - } - - // Redirect to 'success' page. - $this->redirect($this->url->link("checkout/success", "", "SSL")); - return; - } - - // If the status is 'pending' (i.e. a bank transfer), the report is not delivered yet. - if ($order['order_status_id'] == $this->config->get("mollie_ideal_pending_status_id")) - { - if ($this->cart) - { - $this->cart->clear(); - } - - return $this->showReturnPage( - $this->language->get("heading_unknown"), - $this->language->get("msg_unknown"), - NULL, - FALSE - ); - } - - // The status is probably 'cancelled'. Allow the admin to redirect their customers back to the shopping cart directly in these cases. - if (!(bool) $this->config->get("mollie_show_order_canceled_page")) - { - $this->redirect($this->url->link("checkout/checkout", "", "SSL")); - } - - // Show a 'transaction failed' page if all else fails. - return $this->showReturnPage( - $this->language->get("heading_failed"), - $this->language->get("msg_failed") - ); - } - - /** - * @param &$data - */ - protected function setBreadcrumbs (&$data) - { - $data['breadcrumbs'] = array(); - - $data['breadcrumbs'][] = array( - "href" => $this->url->link("common/home", (isset($this->session->data['token'])) ? "token=" . $this->session->data['token'] : "", "SSL"), - "text" => $this->language->get("text_home"), - "separator" => FALSE, - ); - } - - /** - * @param $message - * - * @return string - */ - protected function showErrorPage ($message) - { - $this->load->language("extension/payment/mollie"); - - $this->log->write("Error setting up transaction with Mollie: {$message}."); - - return $this->showReturnPage( - $this->language->get("heading_error"), - $this->language->get("text_error"), - $message - ); - } - - /** - * Render a return page. - * - * @param string $title The title of the status page. - * @param string $body The status message. - * @param string|NULL $api_error Show an API error, if applicable. - * @param bool $show_retry_button Show a retry button that redirects the customer back to the checkout page. - * - * @return string - */ - protected function showReturnPage ($title, $body, $api_error = NULL, $show_retry_button = TRUE) - { - $this->load->language("extension/payment/mollie"); - - $data['message_title'] = $title; - $data['message_text'] = $body; - - if ($api_error) - { - $data['mollie_error'] = $api_error; - } - - if ($show_retry_button) - { - $data['checkout_url'] = $this->url->link("checkout/checkout", "", "SSL"); - $data['button_retry'] = $this->language->get("button_retry"); - } - - $this->document->setTitle($this->language->get("ideal_title")); - - $this->setBreadcrumbs($data); - - return $this->renderTemplate("mollie_return", $data, array( - "column_left", - "column_right", - "content_top", - "content_bottom", - "footer", - "header", - )); - } - - /** - * We check for and remove the admin url in the webhook link. - * - * @return string|null - */ - public function getWebhookUrl () - { - $system_webhook_url = $this->url->link("extension/payment/mollie_" . static::MODULE_NAME . "/webhook", "", "SSL"); - - if (strpos($system_webhook_url, $this->getAdminDirectory()) !== FALSE) - { - return str_replace($this->getAdminDirectory(), "", $system_webhook_url); - } - - return $system_webhook_url ? $system_webhook_url : NULL; - } - - /** - * Retrieves the admin directoryname from the catalog and admin urls. - * - * @return string - */ - protected function getAdminDirectory () - { - // if no default admin URL defined in the config, use the default admin directory. - if (!defined('HTTP_ADMIN')) - { - return "admin/"; - } - - return str_replace(HTTP_SERVER, "", HTTP_ADMIN); - } - - /** - * Map payment status history handling for different Opencart versions. - * - * @param array $order - * @param int|string $order_status_id - * @param string $comment - * @param bool $notify - */ - protected function addOrderHistory ($order, $order_status_id, $comment = "", $notify = FALSE) - { - if ($this->isOpencart2()) - { - $this->model_checkout_order->addOrderHistory($order['order_id'], $order_status_id, $comment, $notify); - } - else - { - if (empty($order['order_status_id'])) - { - $this->model_checkout_order->confirm($order['order_id'], $order_status_id, $comment, $notify); - } - else - { - $this->model_checkout_order->update($order['order_id'], $order_status_id, $comment, $notify); - } - } - } - - /** - * Map template handling for different Opencart versions. - * - * @param string $template - * @param array $data - * @param array $common_children - * @param bool $echo - */ - protected function renderTemplate ($template, $data, $common_children = array(), $echo = TRUE) - { - $template = $this->getTemplatePath($template); - - if ($this->isOpencart2()) - { - foreach ($common_children as $child) - { - $data[$child] = $this->load->controller("common/" . $child); - } - - $html = $this->load->view($template, $data); - } - else - { - foreach ($data as $field => $value) - { - $this->data[$field] = $value; - } - - $this->template = $template; - - $this->children = array( - // Leave this line empty so vQmod's search & replace doesn't break our code (see vqmod/xml/vqmod_custom_positions.xml). - ); - - foreach ($common_children as $child) - { - $this->children[] = "common/".$child; - } - - $html = $this->render(); - } - - if ($echo) - { - return $this->response->setOutput($html); - } - - return $html; - } - - /** - * Fetch path to a template file. Allows themes to overwrite the template. Prefers *_2.tpl for Opencart 2 specific layouts. - * - * @param string $template - * - * @return string - */ - protected function getTemplatePath ($template) - { - $theme_path = $this->config->get("config_template") . "/template/extension/payment/"; - $possible_paths = array(); - - $default_path = "extension/payment/"; - - if ($this->isOpencart2()) - { - $possible_paths[] = $theme_path . $template . "_2.tpl"; - $possible_paths[] = $default_path . $template . "_2.tpl"; - } - - $possible_paths[] = $theme_path . $template . ".tpl"; - - foreach ($possible_paths as $path) - { - if (file_exists(DIR_TEMPLATE . $path)) - { - return $path; - } - } - - return $default_path . $template . ".tpl"; - } - - /** - * @param string $url - * @param int $status - */ - protected function redirect ($url, $status = 302) - { - if ($this->isOpencart2()) - { - $this->response->redirect($url, $status); - } - else - { - parent::redirect($url, $status); - } - } - - /** - * @return bool - */ - protected function isOpencart2 () - { - return version_compare(VERSION, 2, ">="); - } - - protected function isOpencart22 () - { - return version_compare(VERSION, 2.2, ">="); - } -} diff --git a/catalog/controller/extension/payment/mollie/helper.php b/catalog/controller/extension/payment/mollie/helper.php deleted file mode 100644 index b24c57af..00000000 --- a/catalog/controller/extension/payment/mollie/helper.php +++ /dev/null @@ -1,91 +0,0 @@ -= 2.3 - const PLUGIN_VERSION = "7.0.1"; - - // All available modules. These should correspond to the Mollie_API_Object_Method constants. - const MODULE_NAME_BANKTRANSFER = "banktransfer"; - const MODULE_NAME_BELFIUS = "belfius"; - const MODULE_NAME_BITCOIN = "bitcoin"; - const MODULE_NAME_CREDITCARD = "creditcard"; - const MODULE_NAME_DIRECTDEBIT = "directdebit"; - const MODULE_NAME_IDEAL = "ideal"; - const MODULE_NAME_MISTERCASH = "mistercash"; - const MODULE_NAME_PAYPAL = "paypal"; - const MODULE_NAME_PAYSAFECARD = "paysafecard"; - const MODULE_NAME_SOFORT = "sofort"; - const MODULE_NAME_KBC = "kbc"; - - // List of all available module names. - static public $MODULE_NAMES = array( - self::MODULE_NAME_BANKTRANSFER, - self::MODULE_NAME_BELFIUS, - self::MODULE_NAME_BITCOIN, - self::MODULE_NAME_CREDITCARD, - self::MODULE_NAME_DIRECTDEBIT, - self::MODULE_NAME_IDEAL, - self::MODULE_NAME_MISTERCASH, - self::MODULE_NAME_PAYPAL, - self::MODULE_NAME_PAYSAFECARD, - self::MODULE_NAME_SOFORT, - self::MODULE_NAME_KBC, - ); - - static protected $api_client; - - /** - * @return bool - */ - public static function apiClientFound () - { - return file_exists(realpath(DIR_SYSTEM . "/..") . "/catalog/controller/extension/payment/mollie-api-client/"); - } - - /** - * Get the Mollie client. Needs the Config object to retrieve the API key. - * - * @param Config $config - * - * @return Mollie_API_Client - */ - public static function getAPIClient ($config) - { - if (!self::$api_client && self::apiClientFound()) - { - require_once(realpath(DIR_SYSTEM . "/..") . "/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Autoloader.php"); - - $mollie = new Mollie_API_Client; - - $mollie->setApiKey($config->get('mollie_api_key')); - - $mollie->addVersionString("OpenCart/" . VERSION); - $mollie->addVersionString("MollieOpenCart/" . self::PLUGIN_VERSION); - - self::$api_client = $mollie; - } - - return self::$api_client; - } - - /** - * Get the Mollie client. Needs the Config array for multishop to retrieve the API key. - * - * @param array $config - * - * @return Mollie_API_Client - */ - public static function getAPIClientAdmin ($config) - { - require_once(realpath(DIR_SYSTEM . "/..") . "/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/Autoloader.php"); - - $mollie = new Mollie_API_Client; - - $mollie->setApiKey(isset($config['mollie_api_key']) ? $config['mollie_api_key'] : null); - - $mollie->addVersionString("OpenCart/" . VERSION); - $mollie->addVersionString("MollieOpenCart/" . self::PLUGIN_VERSION); - - return $mollie; - } -} diff --git a/catalog/controller/extension/payment/mollie_bancontact.php b/catalog/controller/extension/payment/mollie_bancontact.php new file mode 100644 index 00000000..cc1d8b90 --- /dev/null +++ b/catalog/controller/extension/payment/mollie_bancontact.php @@ -0,0 +1,5 @@ +satisfiesPhpVersion()) { + throw new \Mollie\Api\Exceptions\IncompatiblePlatform("The client requires PHP version >= " . self::MIN_PHP_VERSION . ", you have " . \PHP_VERSION . ".", \Mollie\Api\Exceptions\IncompatiblePlatform::INCOMPATIBLE_PHP_VERSION); + } + if (!$this->satisfiesJsonExtension()) { + throw new \Mollie\Api\Exceptions\IncompatiblePlatform("PHP extension json is not enabled. Please make sure to enable 'json' in your PHP configuration.", \Mollie\Api\Exceptions\IncompatiblePlatform::INCOMPATIBLE_JSON_EXTENSION); + } + } + /** + * @return bool + * @codeCoverageIgnore + */ + public function satisfiesPhpVersion() + { + return (bool) \version_compare(\PHP_VERSION, self::MIN_PHP_VERSION, ">="); + } + /** + * @return bool + * @codeCoverageIgnore + */ + public function satisfiesJsonExtension() + { + // Check by extension_loaded + if (\function_exists('extension_loaded') && \extension_loaded('json')) { + return \true; + } elseif (\function_exists('json_encode')) { + return \true; + } + return \false; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/CustomerEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/CustomerEndpoint.php new file mode 100644 index 00000000..ab0e26b6 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/CustomerEndpoint.php @@ -0,0 +1,89 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return CustomerCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\CustomerCollection($this->client, $count, $_links); + } + /** + * Creates a customer in Mollie. + * + * @param array $data An array containing details on the customer. + * @param array $filters + * + * @return Customer + * @throws ApiException + */ + public function create(array $data = [], array $filters = []) + { + return $this->rest_create($data, $filters); + } + /** + * Retrieve a single customer from Mollie. + * + * Will throw a ApiException if the customer id is invalid or the resource cannot be found. + * + * @param string $customerId + * @param array $parameters + * @return Customer + * @throws ApiException + */ + public function get($customerId, array $parameters = []) + { + return $this->rest_read($customerId, $parameters); + } + /** + * Deletes the given Customer. + * + * Will throw a ApiException if the customer id is invalid or the resource cannot be found. + * Returns with HTTP status No Content (204) if successful. + * + * @param string $customerId + * + * @param array $data + * @return null + * @throws ApiException + */ + public function delete($customerId, array $data = []) + { + return $this->rest_delete($customerId, $data); + } + /** + * Retrieves a collection of Customers from Mollie. + * + * @param string $from The first customer ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return CustomerCollection + * @throws ApiException + */ + public function page($from = null, $limit = null, array $parameters = []) + { + return $this->rest_list($from, $limit, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/CustomerPaymentsEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/CustomerPaymentsEndpoint.php new file mode 100644 index 00000000..3b594e5e --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/CustomerPaymentsEndpoint.php @@ -0,0 +1,60 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return PaymentCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\PaymentCollection($this->client, $count, $_links); + } + /** + * Create a subscription for a Customer + * + * @param Customer $customer + * @param array $options + * @param array $filters + * + * @return Payment + */ + public function createFor(\Mollie\Api\Resources\Customer $customer, array $options = [], array $filters = []) + { + $this->parentId = $customer->id; + return parent::rest_create($options, $filters); + } + /** + * @param Customer $customer + * @param string $from The first resource ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return PaymentCollection + */ + public function listFor(\Mollie\Api\Resources\Customer $customer, $from = null, $limit = null, array $parameters = []) + { + $this->parentId = $customer->id; + return parent::rest_list($from, $limit, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/EndpointAbstract.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/EndpointAbstract.php new file mode 100644 index 00000000..cc484dc2 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/EndpointAbstract.php @@ -0,0 +1,180 @@ +client = $api; + } + /** + * @param array $filters + * @return string + */ + private function buildQueryString(array $filters) + { + if (empty($filters)) { + return ""; + } + foreach ($filters as $key => $value) { + if ($value === \true) { + $filters[$key] = "true"; + } + if ($value === \false) { + $filters[$key] = "false"; + } + } + return "?" . \http_build_query($filters, "", "&"); + } + /** + * @param array $body + * @param array $filters + * @return BaseResource + * @throws ApiException + */ + protected function rest_create(array $body, array $filters) + { + $result = $this->client->performHttpCall(self::REST_CREATE, $this->getResourcePath() . $this->buildQueryString($filters), $this->parseRequestBody($body)); + return \Mollie\Api\Resources\ResourceFactory::createFromApiResult($result, $this->getResourceObject()); + } + /** + * Retrieves a single object from the REST API. + * + * @param string $id Id of the object to retrieve. + * @param array $filters + * @return BaseResource + * @throws ApiException + */ + protected function rest_read($id, array $filters) + { + if (empty($id)) { + throw new \Mollie\Api\Exceptions\ApiException("Invalid resource id."); + } + $id = \urlencode($id); + $result = $this->client->performHttpCall(self::REST_READ, "{$this->getResourcePath()}/{$id}" . $this->buildQueryString($filters)); + return \Mollie\Api\Resources\ResourceFactory::createFromApiResult($result, $this->getResourceObject()); + } + /** + * Sends a DELETE request to a single Molle API object. + * + * @param string $id + * @param array $body + * + * @return BaseResource + * @throws ApiException + */ + protected function rest_delete($id, array $body = []) + { + if (empty($id)) { + throw new \Mollie\Api\Exceptions\ApiException("Invalid resource id."); + } + $id = \urlencode($id); + $result = $this->client->performHttpCall(self::REST_DELETE, "{$this->getResourcePath()}/{$id}", $this->parseRequestBody($body)); + if ($result === null) { + return null; + } + return \Mollie\Api\Resources\ResourceFactory::createFromApiResult($result, $this->getResourceObject()); + } + /** + * Get a collection of objects from the REST API. + * + * @param string $from The first resource ID you want to include in your list. + * @param int $limit + * @param array $filters + * + * @return BaseCollection + * @throws ApiException + */ + protected function rest_list($from = null, $limit = null, array $filters) + { + $filters = \array_merge(["from" => $from, "limit" => $limit], $filters); + $apiPath = $this->getResourcePath() . $this->buildQueryString($filters); + $result = $this->client->performHttpCall(self::REST_LIST, $apiPath); + /** @var BaseCollection $collection */ + $collection = $this->getResourceCollectionObject($result->count, $result->_links); + foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) { + $collection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, $this->getResourceObject()); + } + return $collection; + } + /** + * Get the object that is used by this API endpoint. Every API endpoint uses one type of object. + * + * @return BaseResource + */ + protected abstract function getResourceObject(); + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return BaseCollection + */ + protected abstract function getResourceCollectionObject($count, $_links); + /** + * @param string $resourcePath + */ + public function setResourcePath($resourcePath) + { + $this->resourcePath = \strtolower($resourcePath); + } + /** + * @return string + * @throws ApiException + */ + public function getResourcePath() + { + if (\strpos($this->resourcePath, "_") !== \false) { + list($parentResource, $childResource) = \explode("_", $this->resourcePath, 2); + if (empty($this->parentId)) { + throw new \Mollie\Api\Exceptions\ApiException("Subresource '{$this->resourcePath}' used without parent '{$parentResource}' ID."); + } + return "{$parentResource}/{$this->parentId}/{$childResource}"; + } + return $this->resourcePath; + } + /** + * @param array $body + * @return null|string + * @throws ApiException + */ + protected function parseRequestBody(array $body) + { + if (empty($body)) { + return null; + } + try { + $encoded = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\json_encode($body); + } catch (\InvalidArgumentException $e) { + throw new \Mollie\Api\Exceptions\ApiException("Error encoding parameters into JSON: '" . $e->getMessage() . "'."); + } + return $encoded; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/InvoiceEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/InvoiceEndpoint.php new file mode 100644 index 00000000..14798e4e --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/InvoiceEndpoint.php @@ -0,0 +1,72 @@ +client); + } + /** + * Get the collection object that is used by this API. Every API uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return \Mollie\Api\Resources\BaseCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\InvoiceCollection($this->client, $count, $_links); + } + /** + * Retrieve an Invoice from Mollie. + * + * Will throw a ApiException if the invoice id is invalid or the resource cannot be found. + * + * @param string $invoiceId + * @param array $parameters + * + * @return Invoice + * @throws ApiException + */ + public function get($invoiceId, array $parameters = []) + { + return $this->rest_read($invoiceId, $parameters); + } + /** + * Retrieves a collection of Invoices from Mollie. + * + * @param string $from The first invoice ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return InvoiceCollection + * @throws ApiException + */ + public function page($from = null, $limit = null, array $parameters = []) + { + return $this->rest_list($from, $limit, $parameters); + } + /** + * This is a wrapper method for page + * + * @param array|null $parameters + * + * @return \Mollie\Api\Resources\BaseCollection + */ + public function all(array $parameters = []) + { + return $this->page(null, null, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/MandateEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/MandateEndpoint.php new file mode 100644 index 00000000..840cdc5b --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/MandateEndpoint.php @@ -0,0 +1,83 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return MandateCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\MandateCollection($this->client, $count, $_links); + } + /** + * @param Customer $customer + * @param array $options + * @param array $filters + * + * @return Mandate + */ + public function createFor(\Mollie\Api\Resources\Customer $customer, array $options = [], array $filters = []) + { + $this->parentId = $customer->id; + return parent::rest_create($options, $filters); + } + /** + * @param Customer $customer + * @param string $mandateId + * @param array $parameters + * + * @return Mandate + */ + public function getFor(\Mollie\Api\Resources\Customer $customer, $mandateId, array $parameters = []) + { + $this->parentId = $customer->id; + return parent::rest_read($mandateId, $parameters); + } + /** + * @param Customer $customer + * @param string $from The first resource ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return MandateCollection + */ + public function listFor(\Mollie\Api\Resources\Customer $customer, $from = null, $limit = null, array $parameters = []) + { + $this->parentId = $customer->id; + return parent::rest_list($from, $limit, $parameters); + } + /** + * @param Customer $customer + * @param string $mandateId + * + * @param array $data + * @return null + * @throws \Mollie\Api\Exceptions\ApiException + */ + public function revokeFor(\Mollie\Api\Resources\Customer $customer, $mandateId, $data = []) + { + $this->parentId = $customer->id; + return parent::rest_delete($mandateId, $data); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/MethodEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/MethodEndpoint.php new file mode 100644 index 00000000..ec6af81a --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/MethodEndpoint.php @@ -0,0 +1,59 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return MethodCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\MethodCollection($count, $_links); + } + /** + * Retrieve a payment method from Mollie. + * + * Will throw a ApiException if the method id is invalid or the resource cannot be found. + * + * @param string $methodId + * @param array $parameters + * @return Method + * @throws ApiException + */ + public function get($methodId, array $parameters = []) + { + if (empty($methodId)) { + throw new \Mollie\Api\Exceptions\ApiException("Method ID is empty."); + } + return parent::rest_read($methodId, $parameters); + } + /** + * Retrieve all methods. + * + * @param array $parameters + * + * @return MethodCollection + * @throws ApiException + */ + public function all(array $parameters = []) + { + return parent::rest_list(null, null, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/OrderEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/OrderEndpoint.php new file mode 100644 index 00000000..99e72d46 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/OrderEndpoint.php @@ -0,0 +1,101 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API + * endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return OrderCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\OrderCollection($this->client, $count, $_links); + } + /** + * Creates a order in Mollie. + * + * @param array $data An array containing details on the order. + * @param array $filters + * + * @return Order + * @throws ApiException + */ + public function create(array $data = [], array $filters = []) + { + return $this->rest_create($data, $filters); + } + /** + * Retrieve a single order from Mollie. + * + * Will throw a ApiException if the order id is invalid or the resource cannot + * be found. + * + * @param string $paymentId + * @param array $parameters + * @return Order + * @throws ApiException + */ + public function get($orderId, array $parameters = []) + { + if (empty($orderId) || \strpos($orderId, self::RESOURCE_ID_PREFIX) !== 0) { + throw new \Mollie\Api\Exceptions\ApiException("Invalid order ID: '{$orderId}'. An order ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); + } + return parent::rest_read($orderId, $parameters); + } + /** + * Cancel the given Order. + * + * If the order was partially shipped, the status will be "completed" instead of + * "canceled". + * Will throw a ApiException if the order id is invalid or the resource cannot + * be found. + * Returns the canceled order with HTTP status 200. + * + * @param string $orderId + * + * @return Order + * @throws ApiException + */ + public function cancel($orderId) + { + return $this->rest_delete($orderId); + } + /** + * Retrieves a collection of Orders from Mollie. + * + * @param string $from The first order ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return OrderCollection + * @throws ApiException + */ + public function page($from = null, $limit = null, array $parameters = []) + { + return $this->rest_list($from, $limit, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/OrderLineEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/OrderLineEndpoint.php new file mode 100644 index 00000000..29f97d36 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/OrderLineEndpoint.php @@ -0,0 +1,61 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API + * endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return OrderLineCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\OrderLineCollection($count, $_links); + } + /** + * Cancel lines for the provided order. + * The data array must contain a lines array. + * You can pass an empty lines array if you want to cancel all eligible lines. + * Returns null if successful. + * + * @param Order $order + * @param array $data + * + * @return null + * @throws ApiException + */ + public function cancelFor(\Mollie\Api\Resources\Order $order, array $data) + { + if (!isset($data, $data['lines']) || !\is_array($data['lines'])) { + throw new \Mollie\Api\Exceptions\ApiException("A lines array is required."); + } + $this->parentId = $order->id; + $this->client->performHttpCall(self::REST_DELETE, "{$this->getResourcePath()}", $this->parseRequestBody($data)); + return null; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/OrderRefundEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/OrderRefundEndpoint.php new file mode 100644 index 00000000..249016a0 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/OrderRefundEndpoint.php @@ -0,0 +1,47 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return RefundCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\RefundCollection($this->client, $count, $_links); + } + /** + * Refund some order lines. You can provide an empty array for the + * "lines" data to refund all eligable lines for this order. + * + * @param Order $order + * @param array $data + * @param array $filters + * + * @return Refund + */ + public function createFor(\Mollie\Api\Resources\Order $order, array $data, array $filters = []) + { + $this->parentId = $order->id; + return parent::rest_create($data, $filters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/OrganizationEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/OrganizationEndpoint.php new file mode 100644 index 00000000..42c7fbfb --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/OrganizationEndpoint.php @@ -0,0 +1,73 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return OrganizationCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\OrganizationCollection($this->client, $count, $_links); + } + /** + * Retrieve an organization from Mollie. + * + * Will throw a ApiException if the organization id is invalid or the resource cannot be found. + * + * @param string $organizationId + * @param array $parameters + * @return Method + * @throws ApiException + */ + public function get($organizationId, array $parameters = []) + { + if (empty($organizationId)) { + throw new \Mollie\Api\Exceptions\ApiException("Organization ID is empty."); + } + return parent::rest_read($organizationId, $parameters); + } + /** + * Retrieve the current organization from Mollie. + * + * @param array $parameters + * @return Method + * @throws ApiException + */ + public function current(array $parameters = []) + { + return parent::rest_read('me', $parameters); + } + /** + * Retrieves a collection of Organizations from Mollie. + * + * @param string $from The first organization ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return OrganizationCollection + * @throws ApiException + */ + public function page($from = null, $limit = null, array $parameters = []) + { + return $this->rest_list($from, $limit, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentCaptureEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentCaptureEndpoint.php new file mode 100644 index 00000000..718c3cdd --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentCaptureEndpoint.php @@ -0,0 +1,43 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return CaptureCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Endpoints\CaptureCollection($this->client, $count, $_links); + } + /** + * @param Payment $payment + * @param string $captureId + * @param array $parameters + * + * @return Capture + */ + public function getFor(\Mollie\Api\Resources\Payment $payment, $captureId, array $parameters = []) + { + $this->parentId = $payment->id; + return parent::rest_read($captureId, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentChargebackEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentChargebackEndpoint.php new file mode 100644 index 00000000..b1be234c --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentChargebackEndpoint.php @@ -0,0 +1,44 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return ChargebackCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\ChargebackCollection($this->client, $count, $_links); + } + /** + * @param Payment $payment + * @param string $chargebackId + * @param array $parameters + * + * @return Chargeback + */ + public function getFor(\Mollie\Api\Resources\Payment $payment, $chargebackId, array $parameters = []) + { + $this->parentId = $payment->id; + return parent::rest_read($chargebackId, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentEndpoint.php new file mode 100644 index 00000000..69f1e793 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentEndpoint.php @@ -0,0 +1,134 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return PaymentCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\PaymentCollection($this->client, $count, $_links); + } + /** + * Creates a payment in Mollie. + * + * @param array $data An array containing details on the payment. + * @param array $filters + * + * @return Payment + * @throws ApiException + */ + public function create(array $data = [], array $filters = []) + { + return $this->rest_create($data, $filters); + } + /** + * Retrieve a single payment from Mollie. + * + * Will throw a ApiException if the payment id is invalid or the resource cannot be found. + * + * @param string $paymentId + * @param array $parameters + * @return Payment + * @throws ApiException + */ + public function get($paymentId, array $parameters = []) + { + if (empty($paymentId) || \strpos($paymentId, self::RESOURCE_ID_PREFIX) !== 0) { + throw new \Mollie\Api\Exceptions\ApiException("Invalid payment ID: '{$paymentId}'. A payment ID should start with '" . self::RESOURCE_ID_PREFIX . "'."); + } + return parent::rest_read($paymentId, $parameters); + } + /** + * Deletes the given Payment. + * + * Will throw a ApiException if the payment id is invalid or the resource cannot be found. + * Returns with HTTP status No Content (204) if successful. + * + * @param string $paymentId + * + * @param array $data + * @return Payment + * @throws ApiException + */ + public function delete($paymentId, array $data = []) + { + return $this->rest_delete($paymentId, $data); + } + /** + * Cancel the given Payment. This is just an alias of the 'delete' method. + * + * Will throw a ApiException if the payment id is invalid or the resource cannot be found. + * Returns with HTTP status No Content (204) if successful. + * + * @param string $paymentId + * + * @param array $data + * @return Payment + * @throws ApiException + */ + public function cancel($paymentId, array $data = []) + { + return $this->rest_delete($paymentId, $data); + } + /** + * Retrieves a collection of Payments from Mollie. + * + * @param string $from The first payment ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return PaymentCollection + * @throws ApiException + */ + public function page($from = null, $limit = null, array $parameters = []) + { + return $this->rest_list($from, $limit, $parameters); + } + /** + * Issue a refund for the given payment. + * + * The $data parameter may either be an array of endpoint parameters, a float value to + * initiate a partial refund, or empty to do a full refund. + * + * @param Payment $payment + * @param array|float|null $data + * + * @return Refund + * @throws ApiException + */ + public function refund(\Mollie\Api\Resources\Payment $payment, $data = []) + { + $resource = "{$this->getResourcePath()}/" . \urlencode($payment->id) . "/refunds"; + $body = null; + if (\count($data) > 0) { + $body = \json_encode($data); + } + $result = $this->client->performHttpCall(self::REST_CREATE, $resource, $body); + return \Mollie\Api\Resources\ResourceFactory::createFromApiResult($result, new \Mollie\Api\Resources\Refund($this->client)); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentRefundEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentRefundEndpoint.php new file mode 100644 index 00000000..d4080a7d --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/PaymentRefundEndpoint.php @@ -0,0 +1,44 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return RefundCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\RefundCollection($this->client, $count, $_links); + } + /** + * @param Payment $payment + * @param string $refundId + * @param array $parameters + * + * @return Refund + */ + public function getFor(\Mollie\Api\Resources\Payment $payment, $refundId, array $parameters = []) + { + $this->parentId = $payment->id; + return parent::rest_read($refundId, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/PermissionEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/PermissionEndpoint.php new file mode 100644 index 00000000..b30eaa9c --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/PermissionEndpoint.php @@ -0,0 +1,60 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API + * endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return PermissionCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\PermissionCollection($this->client, $count, $_links); + } + /** + * Retrieve a single Permission from Mollie. + * + * Will throw an ApiException if the permission id is invalid. + * + * @param string $permissionId + * @param array $parameters + * @return Permission + * @throws ApiException + */ + public function get($permissionId, array $parameters = []) + { + return $this->rest_read($permissionId, $parameters); + } + /** + * Retrieve all permissions. + * + * @param array $parameters + * + * @return PermissionCollection + * @throws ApiException + */ + public function all(array $parameters = []) + { + return parent::rest_list(null, null, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/ProfileEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/ProfileEndpoint.php new file mode 100644 index 00000000..63515c91 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/ProfileEndpoint.php @@ -0,0 +1,90 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return ProfileCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\ProfileCollection($this->client, $count, $_links); + } + /** + * Creates a Profile in Mollie. + * + * @param array $data An array containing details on the profile. + * @param array $filters + * + * @return Profile + * @throws ApiException + */ + public function create(array $data = [], array $filters = []) + { + return $this->rest_create($data, $filters); + } + /** + * Retrieve a Profile from Mollie. + * + * Will throw a ApiException if the profile id is invalid or the resource cannot be found. + * + * @param string $profileId + * @param array $parameters + * + * @return Profile + * @throws ApiException + */ + public function get($profileId, array $parameters = []) + { + return $this->rest_read($profileId, $parameters); + } + /** + * Delete a Profile from Mollie. + * + * Will throw a ApiException if the profile id is invalid or the resource cannot be found. + * Returns with HTTP status No Content (204) if successful. + * + * @param string $profileId + * + * @param array $data + * @return Profile + * @throws ApiException + */ + public function delete($profileId, array $data = []) + { + return $this->rest_delete($profileId, $data); + } + /** + * Retrieves a collection of Profiles from Mollie. + * + * @param string $from The first profile ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return ProfileCollection + * @throws ApiException + */ + public function page($from = null, $limit = null, array $parameters = []) + { + return $this->rest_list($from, $limit, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/RefundEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/RefundEndpoint.php new file mode 100644 index 00000000..318c8b8a --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/RefundEndpoint.php @@ -0,0 +1,46 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return RefundCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\RefundCollection($this->client, $count, $_links); + } + /** + * Retrieves a collection of Refunds from Mollie. + * + * @param string $from The first refund ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return RefundCollection + * @throws ApiException + */ + public function page($from = null, $limit = null, array $parameters = []) + { + return $this->rest_list($from, $limit, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/SettlementsEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/SettlementsEndpoint.php new file mode 100644 index 00000000..d17600ab --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/SettlementsEndpoint.php @@ -0,0 +1,80 @@ +client); + } + /** + * Get the collection object that is used by this API. Every API uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return \Mollie\Api\Resources\BaseCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\SettlementCollection($this->client, $count, $_links); + } + /** + * Retrieve a single settlement from Mollie. + * + * Will throw a ApiException if the settlement id is invalid or the resource cannot be found. + * + * @param string $settlementId + * @param array $parameters + * @return Settlement + * @throws ApiException + */ + public function get($settlementId, array $parameters = []) + { + return parent::rest_read($settlementId, $parameters); + } + /** + * Retrieve the details of the current settlement that has not yet been paid out. + * + * @return Settlement + * @throws ApiException + */ + public function next() + { + return parent::rest_read("next", []); + } + /** + * Retrieve the details of the open balance of the organization. + * + * @return Settlement + * @throws ApiException + */ + public function open() + { + return parent::rest_read("open", []); + } + /** + * Retrieves a collection of Settlements from Mollie. + * + * @param string $from The first settlement ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return SettlementCollection + * @throws ApiException + */ + public function page($from = null, $limit = null, array $parameters = []) + { + return $this->rest_list($from, $limit, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/ShipmentEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/ShipmentEndpoint.php new file mode 100644 index 00000000..64b95c19 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/ShipmentEndpoint.php @@ -0,0 +1,79 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API + * endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return ShipmentCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\ShipmentCollection($this->client, $count, $_links); + } + /** + * Create a shipment for some order lines. You can provide an empty array for the + * "lines" option to include all unshipped lines for this order. + * + * @param Order $order + * @param array $options + * @param array $filters + * + * @return Shipment + */ + public function createFor(\Mollie\Api\Resources\Order $order, array $options = [], array $filters = []) + { + $this->parentId = $order->id; + return parent::rest_create($options, $filters); + } + /** + * Retrieve a single shipment and the order lines shipped by a shipment’s ID. + * + * @param Order $order + * @param string $shipmentId + * @param array $parameters + * + * @return Shipment + */ + public function getFor(\Mollie\Api\Resources\Order $order, $shipmentId, array $parameters = []) + { + $this->parentId = $order->id; + return parent::rest_read($shipmentId, $parameters); + } + /** + * Return all shipments for the Order provided. + * + * @param Order $order + * @param array $parameters + * + * @return ShipmentCollection + */ + public function listFor(\Mollie\Api\Resources\Order $order, array $parameters = []) + { + $this->parentId = $order->id; + return parent::rest_list(null, null, $parameters); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Endpoints/SubscriptionEndpoint.php b/catalog/controller/payment/mollie-api-client/src/Endpoints/SubscriptionEndpoint.php new file mode 100644 index 00000000..ebb9c8ec --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Endpoints/SubscriptionEndpoint.php @@ -0,0 +1,86 @@ +client); + } + /** + * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. + * + * @param int $count + * @param object[] $_links + * + * @return SubscriptionCollection + */ + protected function getResourceCollectionObject($count, $_links) + { + return new \Mollie\Api\Resources\SubscriptionCollection($this->client, $count, $_links); + } + /** + * Create a subscription for a Customer + * + * @param Customer $customer + * @param array $options + * @param array $filters + * + * @return Subscription + */ + public function createFor(\Mollie\Api\Resources\Customer $customer, array $options = [], array $filters = []) + { + $this->parentId = $customer->id; + return parent::rest_create($options, $filters); + } + /** + * @param Customer $customer + * @param string $subscriptionId + * @param array $parameters + * + * @return Subscription + */ + public function getFor(\Mollie\Api\Resources\Customer $customer, $subscriptionId, array $parameters = []) + { + $this->parentId = $customer->id; + return parent::rest_read($subscriptionId, $parameters); + } + /** + * @param Customer $customer + * @param string $from The first resource ID you want to include in your list. + * @param int $limit + * @param array $parameters + * + * @return SubscriptionCollection + */ + public function listFor(\Mollie\Api\Resources\Customer $customer, $from = null, $limit = null, array $parameters = []) + { + $this->parentId = $customer->id; + return parent::rest_list($from, $limit, $parameters); + } + /** + * @param Customer $customer + * @param string $subscriptionId + * + * @param array $data + * @return null + * @throws \Mollie\Api\Exceptions\ApiException + */ + public function cancelFor(\Mollie\Api\Resources\Customer $customer, $subscriptionId, array $data = []) + { + $this->parentId = $customer->id; + return parent::rest_delete($subscriptionId, $data); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Exceptions/ApiException.php b/catalog/controller/payment/mollie-api-client/src/Exceptions/ApiException.php new file mode 100644 index 00000000..9eccf3cb --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Exceptions/ApiException.php @@ -0,0 +1,48 @@ +field = (string) $field; + $message .= ". Field: {$this->field}"; + } + if (!empty($documentationUrl)) { + $this->documentationUrl = (string) $documentationUrl; + $message .= ". Documentation: {$this->documentationUrl}"; + } + parent::__construct($message, $code, $previous); + } + /** + * @return string + */ + public function getField() + { + return $this->field; + } + /** + * @return string + */ + public function getDocumentationUrl() + { + return $this->documentationUrl; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Exceptions/IncompatiblePlatform.php b/catalog/controller/payment/mollie-api-client/src/Exceptions/IncompatiblePlatform.php new file mode 100644 index 00000000..908e369e --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Exceptions/IncompatiblePlatform.php @@ -0,0 +1,11 @@ +httpClient = $httpClient ? $httpClient : new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Client([\_PhpScoper5bbb1f4b001f3\GuzzleHttp\RequestOptions::VERIFY => \_PhpScoper5bbb1f4b001f3\Composer\CaBundle\CaBundle::getBundledCaBundlePath(), \_PhpScoper5bbb1f4b001f3\GuzzleHttp\RequestOptions::TIMEOUT => self::TIMEOUT]); + $compatibilityChecker = new \Mollie\Api\CompatibilityChecker(); + $compatibilityChecker->checkCompatibility(); + $this->initializeEndpoints(); + $this->addVersionString("Mollie/" . self::CLIENT_VERSION); + $this->addVersionString("PHP/" . \phpversion()); + $this->addVersionString("Guzzle/" . \_PhpScoper5bbb1f4b001f3\GuzzleHttp\ClientInterface::VERSION); + } + public function initializeEndpoints() + { + $this->payments = new \Mollie\Api\Endpoints\PaymentEndpoint($this); + $this->methods = new \Mollie\Api\Endpoints\MethodEndpoint($this); + $this->customers = new \Mollie\Api\Endpoints\CustomerEndpoint($this); + $this->settlements = new \Mollie\Api\Endpoints\SettlementsEndpoint($this); + $this->subscriptions = new \Mollie\Api\Endpoints\SubscriptionEndpoint($this); + $this->customerPayments = new \Mollie\Api\Endpoints\CustomerPaymentsEndpoint($this); + $this->mandates = new \Mollie\Api\Endpoints\MandateEndpoint($this); + $this->invoices = new \Mollie\Api\Endpoints\InvoiceEndpoint($this); + $this->permissions = new \Mollie\Api\Endpoints\PermissionEndpoint($this); + $this->profiles = new \Mollie\Api\Endpoints\ProfileEndpoint($this); + $this->organizations = new \Mollie\Api\Endpoints\OrganizationEndpoint($this); + $this->orders = new \Mollie\Api\Endpoints\OrderEndpoint($this); + $this->orderLines = new \Mollie\Api\Endpoints\OrderLineEndpoint($this); + $this->orderRefunds = new \Mollie\Api\Endpoints\OrderRefundEndpoint($this); + $this->shipments = new \Mollie\Api\Endpoints\ShipmentEndpoint($this); + $this->refunds = new \Mollie\Api\Endpoints\RefundEndpoint($this); + $this->paymentRefunds = new \Mollie\Api\Endpoints\PaymentRefundEndpoint($this); + $this->paymentCaptures = new \Mollie\Api\Endpoints\PaymentCaptureEndpoint($this); + $this->paymentChargebacks = new \Mollie\Api\Endpoints\PaymentChargebackEndpoint($this); + } + /** + * @param string $url + * + * @return MollieApiClient + */ + public function setApiEndpoint($url) + { + $this->apiEndpoint = \rtrim(\trim($url), '/'); + return $this; + } + /** + * @return string + */ + public function getApiEndpoint() + { + return $this->apiEndpoint; + } + /** + * @param string $apiKey The Mollie API key, starting with 'test_' or 'live_' + * + * @return MollieApiClient + * @throws ApiException + */ + public function setApiKey($apiKey) + { + $apiKey = \trim($apiKey); + if (!\preg_match('/^(live|test)_\\w{30,}$/', $apiKey)) { + throw new \Mollie\Api\Exceptions\ApiException("Invalid API key: '{$apiKey}'. An API key must start with 'test_' or 'live_' and must be at least 30 characters long."); + } + $this->apiKey = $apiKey; + $this->oauthAccess = \false; + return $this; + } + /** + * @param string $accessToken OAuth access token, starting with 'access_' + * + * @return MollieApiClient + * @throws ApiException + */ + public function setAccessToken($accessToken) + { + $accessToken = \trim($accessToken); + if (!\preg_match('/^access_\\w+$/', $accessToken)) { + throw new \Mollie\Api\Exceptions\ApiException("Invalid OAuth access token: '{$accessToken}'. An access token must start with 'access_'."); + } + $this->apiKey = $accessToken; + $this->oauthAccess = \true; + return $this; + } + /** + * Returns null if no API key has been set yet. + * + * @return bool|null + */ + public function usesOAuth() + { + return $this->oauthAccess; + } + /** + * @param string $versionString + * + * @return MollieApiClient + */ + public function addVersionString($versionString) + { + $this->versionStrings[] = \str_replace([" ", "\t", "\n", "\r"], '-', $versionString); + return $this; + } + /** + * Perform an http call. This method is used by the resource specific classes. Please use the $payments property to + * perform operations on payments. + * + * @see $payments + * @see $isuers + * + * @param string $httpMethod + * @param string $apiMethod + * @param string|null|resource|StreamInterface $httpBody + * + * @return object + * @throws ApiException + * + * @codeCoverageIgnore + */ + public function performHttpCall($httpMethod, $apiMethod, $httpBody = null) + { + $url = $this->apiEndpoint . "/" . self::API_VERSION . "/" . $apiMethod; + return $this->performHttpCallToFullUrl($httpMethod, $url, $httpBody); + } + /** + * Perform an http call to a full url. This method is used by the resource specific classes. + * + * @see $payments + * @see $isuers + * + * @param string $httpMethod + * @param string $url + * @param string|null|resource|StreamInterface $httpBody + * + * @return object|null + * @throws ApiException + * + * @codeCoverageIgnore + */ + public function performHttpCallToFullUrl($httpMethod, $url, $httpBody = null) + { + if (empty($this->apiKey)) { + throw new \Mollie\Api\Exceptions\ApiException("You have not set an API key or OAuth access token. Please use setApiKey() to set the API key."); + } + $userAgent = \implode(' ', $this->versionStrings); + if ($this->usesOAuth()) { + $userAgent .= " OAuth/2.0"; + } + $headers = ['Accept' => "application/json", 'Authorization' => "Bearer {$this->apiKey}", 'User-Agent' => $userAgent]; + if (\function_exists("php_uname")) { + $headers['X-Mollie-Client-Info'] = \php_uname(); + } + $request = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Request($httpMethod, $url, $headers, $httpBody); + try { + $response = $this->httpClient->send($request, ['http_errors' => \false]); + } catch (\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\GuzzleException $e) { + throw new \Mollie\Api\Exceptions\ApiException($e->getMessage(), $e->getCode(), $e); + } + if (!$response) { + throw new \Mollie\Api\Exceptions\ApiException("Did not receive API response."); + } + return $this->parseResponseBody($response); + } + /** + * Parse the PSR-7 Response body + * + * @param ResponseInterface $response + * @return object|null + * @throws ApiException + */ + private function parseResponseBody(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response) + { + $body = (string) $response->getBody(); + if (empty($body)) { + if ($response->getStatusCode() === self::HTTP_NO_CONTENT) { + return null; + } + throw new \Mollie\Api\Exceptions\ApiException("No response body found."); + } + $object = @\json_decode($body); + if (\json_last_error() !== \JSON_ERROR_NONE) { + throw new \Mollie\Api\Exceptions\ApiException("Unable to decode Mollie response: '{$body}'."); + } + if ($response->getStatusCode() >= 400) { + $field = null; + if (!empty($object->field)) { + $field = $object->field; + } + $documentationUrl = null; + if (!empty($object->_links) && !empty($object->_links->documentation)) { + $documentationUrl = $object->_links->documentation->href; + } + throw new \Mollie\Api\Exceptions\ApiException("Error executing API call ({$object->status}: {$object->title}): {$object->detail}", $response->getStatusCode(), $field, $documentationUrl); + } + return $object; + } + /** + * Serialization can be used for caching. Of course doing so can be dangerous but some like to live dangerously. + * + * \serialize() should be called on the collections or object you want to cache. + * + * We don't need any property that can be set by the constructor, only properties that are set by setters. + * + * Note that the API key is not serialized, so you need to set the key again after unserializing if you want to do + * more API calls. + * + * @deprecated + * @return string[] + */ + public function __sleep() + { + return ["apiEndpoint"]; + } + /** + * When unserializing a collection or a resource, this class should restore itself. + * + * Note that if you use a custom GuzzleClient, this client is lost. You can't re set the Client, so you should + * probably not use this feature. + * + * @throws IncompatiblePlatform If suddenly unserialized on an incompatible platform. + */ + public function __wakeup() + { + $this->__construct(); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/BaseCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/BaseCollection.php new file mode 100644 index 00000000..18385f6b --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/BaseCollection.php @@ -0,0 +1,30 @@ +count = $count; + $this->_links = $_links; + } + /** + * @return string|null + */ + public abstract function getCollectionResourceName(); +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/BaseResource.php b/catalog/controller/payment/mollie-api-client/src/Resources/BaseResource.php new file mode 100644 index 00000000..c568a9ed --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/BaseResource.php @@ -0,0 +1,19 @@ +client = $client; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Capture.php b/catalog/controller/payment/mollie-api-client/src/Resources/Capture.php new file mode 100644 index 00000000..e8e28b49 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Capture.php @@ -0,0 +1,61 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Chargeback.php b/catalog/controller/payment/mollie-api-client/src/Resources/Chargeback.php new file mode 100644 index 00000000..8af8b581 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Chargeback.php @@ -0,0 +1,48 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/CursorCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/CursorCollection.php new file mode 100644 index 00000000..5b7c4b25 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/CursorCollection.php @@ -0,0 +1,60 @@ +client = $client; + } + /** + * @return BaseResource + */ + protected abstract function createResourceObject(); + /** + * Return the next set of resources when available + * + * @return CursorCollection|null + */ + public final function next() + { + if (!isset($this->_links->next->href)) { + return null; + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->next->href); + $collection = new static($this->client, $result->count, $result->_links); + foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) { + $collection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, $this->createResourceObject()); + } + return $collection; + } + /** + * Return the previous set of resources when available + * + * @return CursorCollection|null + */ + public final function previous() + { + if (!isset($this->_links->previous->href)) { + return null; + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->previous->href); + $collection = new static($this->client, $result->count, $result->_links); + foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) { + $collection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, $this->createResourceObject()); + } + return $collection; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Customer.php b/catalog/controller/payment/mollie-api-client/src/Resources/Customer.php new file mode 100644 index 00000000..d70829f9 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Customer.php @@ -0,0 +1,187 @@ +_links->self->href)) { + return $this; + } + $body = \json_encode(array("name" => $this->name, "email" => $this->email, "locale" => $this->locale, "metadata" => $this->metadata)); + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_PATCH, $this->_links->self->href, $body); + return \Mollie\Api\Resources\ResourceFactory::createFromApiResult($result, new \Mollie\Api\Resources\Customer($this->client)); + } + /** + * @param array $options + * @param array $filters + * + * @return Payment + */ + public function createPayment(array $options = [], array $filters = []) + { + return $this->client->customerPayments->createFor($this, $options, $filters); + } + /** + * Get all payments for this customer + * + * @return PaymentCollection + */ + public function payments() + { + return $this->client->customerPayments->listFor($this, null, null, $this->getPresetOptions()); + } + /** + * @param array $options + * @param array $filters + * + * @return Subscription + */ + public function createSubscription(array $options = [], array $filters = []) + { + return $this->client->subscriptions->createFor($this, $options, $filters); + } + /** + * @param string $subscriptionId + * @param array $parameters + * + * @return Subscription + */ + public function getSubscription($subscriptionId, array $parameters = []) + { + return $this->client->subscriptions->getFor($this, $subscriptionId, $parameters); + } + /** + * @param string $subscriptionId + * + * @return null + */ + public function cancelSubscription($subscriptionId) + { + return $this->client->subscriptions->cancelFor($this, $subscriptionId, $this->getPresetOptions()); + } + /** + * Get all subscriptions for this customer + * + * @return SubscriptionCollection + */ + public function subscriptions() + { + return $this->client->subscriptions->listFor($this, null, null, $this->getPresetOptions()); + } + /** + * @param array $options + * @param array $filters + * + * @return Mandate + */ + public function createMandate(array $options = [], array $filters = []) + { + return $this->client->mandates->createFor($this, $options, $filters); + } + /** + * @param string $mandateId + * @param array $parameters + * + * @return Mandate + */ + public function getMandate($mandateId, array $parameters = []) + { + return $this->client->mandates->getFor($this, $mandateId, $parameters); + } + /** + * @param string $mandateId + * + * @return null + */ + public function revokeMandate($mandateId) + { + return $this->client->mandates->revokeFor($this, $mandateId, $this->getPresetOptions()); + } + /** + * Get all mandates for this customer + * + * @return MandateCollection + */ + public function mandates() + { + return $this->client->mandates->listFor($this, null, null, $this->getPresetOptions()); + } + /** + * Helper function to check for mandate with status valid + * + * @return bool + */ + public function hasValidMandate() + { + $mandates = $this->client->mandates->listFor($this, null, null, $this->getPresetOptions()); + foreach ($mandates as $mandate) { + if ($mandate->isValid()) { + return \true; + } + } + return \false; + } + /** + * When accessed by oAuth we want to pass the testmode by default + * + * @return array + */ + private function getPresetOptions() + { + $options = []; + if ($this->client->usesOAuth()) { + $options["testmode"] = $this->mode === "test" ? \true : \false; + } + return $options; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/CustomerCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/CustomerCollection.php new file mode 100644 index 00000000..c81edee0 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/CustomerCollection.php @@ -0,0 +1,21 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Invoice.php b/catalog/controller/payment/mollie-api-client/src/Resources/Invoice.php new file mode 100644 index 00000000..0427bdef --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Invoice.php @@ -0,0 +1,98 @@ +status == \Mollie\Api\Types\InvoiceStatus::STATUS_PAID; + } + /** + * @return bool + */ + public function isOpen() + { + return $this->status == \Mollie\Api\Types\InvoiceStatus::STATUS_OPEN; + } + /** + * @return bool + */ + public function isOverdue() + { + return $this->status == \Mollie\Api\Types\InvoiceStatus::STATUS_OVERDUE; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/InvoiceCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/InvoiceCollection.php new file mode 100644 index 00000000..46595a83 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/InvoiceCollection.php @@ -0,0 +1,21 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Issuer.php b/catalog/controller/payment/mollie-api-client/src/Resources/Issuer.php new file mode 100644 index 00000000..b270c723 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Issuer.php @@ -0,0 +1,32 @@ +status === \Mollie\Api\Types\MandateStatus::STATUS_VALID; + } + /** + * @return bool + */ + public function isPending() + { + return $this->status === \Mollie\Api\Types\MandateStatus::STATUS_PENDING; + } + /** + * @return bool + */ + public function isInvalid() + { + return $this->status === \Mollie\Api\Types\MandateStatus::STATUS_INVALID; + } + /** + * Revoke the mandate + * + * @return null + */ + public function revoke() + { + if (!isset($this->_links->self->href)) { + return $this; + } + $body = null; + if ($this->client->usesOAuth()) { + $body = \json_encode(["testmode" => $this->mode === "test" ? \true : \false]); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_DELETE, $this->_links->self->href, $body); + return $result; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/MandateCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/MandateCollection.php new file mode 100644 index 00000000..4a5349de --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/MandateCollection.php @@ -0,0 +1,21 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Method.php b/catalog/controller/payment/mollie-api-client/src/Resources/Method.php new file mode 100644 index 00000000..5d8fbf80 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Method.php @@ -0,0 +1,49 @@ +size1x and $image->size2x to display the payment method logo. + * + * @var object + */ + public $image; + /** + * The issuers available for this payment method. Only for the methods iDEAL, KBC/CBC and gift cards. + * Will only be filled when explicitly requested using the query string `include` parameter. + * + * @var array|object[] + */ + public $issuers; + /** + * @var object[] + */ + public $_links; + /** + * Get the issuer value objects + * + * @return IssuerCollection + */ + public function issuers() + { + $issuers = new \Mollie\Api\Resources\IssuerCollection(\count($this->issuers), null); + foreach ($this->issuers as $issuer) { + $issuers->append(\Mollie\Api\Resources\ResourceFactory::createFromApiResult($issuer, new \Mollie\Api\Resources\Issuer($this->client))); + } + return $issuers; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/MethodCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/MethodCollection.php new file mode 100644 index 00000000..6e59bb4b --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/MethodCollection.php @@ -0,0 +1,14 @@ +status === \Mollie\Api\Types\OrderStatus::STATUS_CREATED; + } + /** + * Is this order paid for? + * + * @return bool + */ + public function isPaid() + { + return $this->status === \Mollie\Api\Types\OrderStatus::STATUS_PAID; + } + /** + * Is this order authorized? + * + * @return bool + */ + public function isAuthorized() + { + return $this->status === \Mollie\Api\Types\OrderStatus::STATUS_AUTHORIZED; + } + /** + * Is this order canceled? + * + * @return bool + */ + public function isCanceled() + { + return $this->status === \Mollie\Api\Types\OrderStatus::STATUS_CANCELED; + } + /** + * Is this order refunded? + * + * @return bool + */ + public function isRefunded() + { + return $this->status === \Mollie\Api\Types\OrderStatus::STATUS_REFUNDED; + } + /** + * Is this order shipping? + * + * @return bool + */ + public function isShipping() + { + return $this->status === \Mollie\Api\Types\OrderStatus::STATUS_SHIPPING; + } + /** + * Is this order completed? + * + * @return bool + */ + public function isCompleted() + { + return $this->status === \Mollie\Api\Types\OrderStatus::STATUS_COMPLETED; + } + /** + * Is this order expired? + * + * @return bool + */ + public function isExpired() + { + return $this->status === \Mollie\Api\Types\OrderStatus::STATUS_EXPIRED; + } + /** + * Cancels this order. + * If the order was partially shipped, the status will be "completed" instead of + * "canceled". + * Will throw a ApiException if the order id is invalid or the resource cannot + * be found. + * + * @return Order + * @throws ApiException + */ + public function cancel() + { + return $this->client->orders->cancel($this->id); + } + /** + * Cancel a line for this order. + * The data array must contain a lines array. + * You can pass an empty lines array if you want to cancel all eligible lines. + * Returns null if successful. + * + * @param array|null $data + * @return null + */ + public function cancelLines(array $data) + { + return $this->client->orderLines->cancelFor($this, $data); + } + /** + * Cancels all eligible lines for this order. + * Returns null if successful. + * + * @param array|null $data + * @return null + */ + public function cancelAllLines($data = []) + { + $data['lines'] = []; + return $this->client->orderLines->cancelFor($this, $data); + } + /** + * Get the line value objects + * + * @return OrderLineCollection + */ + public function lines() + { + $lines = new \Mollie\Api\Resources\OrderLineCollection(\count($this->lines), null); + foreach ($this->lines as $line) { + $lines->append(\Mollie\Api\Resources\ResourceFactory::createFromApiResult($line, new \Mollie\Api\Resources\OrderLine($this->client))); + } + return $lines; + } + /** + * Create a shipment for some order lines. You can provide an empty array for the + * "lines" option to include all unshipped lines for this order. + * + * @param array $options + * + * @return Shipment + */ + public function createShipment(array $options = []) + { + return $this->client->shipments->createFor($this, $options); + } + /** + * Create a shipment for all unshipped order lines. + * + * @param array $options + * + * @return Shipment + */ + public function shipAll(array $options = []) + { + $options['lines'] = []; + return $this->createShipment($options); + } + /** + * Retrieve a specific shipment for this order. + * + * @param string $shipmentId + * @param array $parameters + * + * @return Shipment + */ + public function getShipment($shipmentId, array $parameters = []) + { + return $this->client->shipments->getFor($this, $shipmentId, $parameters); + } + /** + * Get all shipments for this order. + * + * @param array $parameters + * + * @return ShipmentCollection + */ + public function shipments(array $parameters = []) + { + return $this->client->shipments->listFor($this, $parameters); + } + /** + * Get the checkout URL where the customer can complete the payment. + * + * @return string|null + */ + public function getCheckoutUrl() + { + if (empty($this->_links->checkout)) { + return null; + } + return $this->_links->checkout->href; + } + /** + * Refund specific order lines. + * + * @param array $data + * @return Refund + */ + public function refund(array $data) + { + return $this->client->orderRefunds->createFor($this, $data); + } + /** + * Refund all eligible order lines. + * + * @param array $data + * @return Refund + */ + public function refundAll(array $data = []) + { + $data['lines'] = []; + return $this->refund($data); + } + /** + * Retrieves all refunds associated with this order + * + * @return RefundCollection + * @throws ApiException + */ + public function refunds() + { + if (!isset($this->_links->refunds->href)) { + return new \Mollie\Api\Resources\RefundCollection($this->client, 0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->refunds->href); + $resourceCollection = new \Mollie\Api\Resources\RefundCollection($this->client, $result->count, $result->_links); + foreach ($result->_embedded->refunds as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Refund($this->client)); + } + return $resourceCollection; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/OrderCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/OrderCollection.php new file mode 100644 index 00000000..ccbf529b --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/OrderCollection.php @@ -0,0 +1,21 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/OrderLine.php b/catalog/controller/payment/mollie-api-client/src/Resources/OrderLine.php new file mode 100644 index 00000000..3d4db891 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/OrderLine.php @@ -0,0 +1,245 @@ +status === \Mollie\Api\Types\OrderLineStatus::STATUS_CREATED; + } + /** + * Is this order line paid for? + * + * @return bool + */ + public function isPaid() + { + return $this->status === \Mollie\Api\Types\OrderLineStatus::STATUS_PAID; + } + /** + * Is this order line authorized? + * + * @return bool + */ + public function isAuthorized() + { + return $this->status === \Mollie\Api\Types\OrderLineStatus::STATUS_AUTHORIZED; + } + /** + * Is this order line canceled? + * + * @return bool + */ + public function isCanceled() + { + return $this->status === \Mollie\Api\Types\OrderLineStatus::STATUS_CANCELED; + } + /** + * Is this order line refunded? + * + * @return bool + */ + public function isRefunded() + { + return $this->status === \Mollie\Api\Types\OrderLineStatus::STATUS_REFUNDED; + } + /** + * Is this order line shipping? + * + * @return bool + */ + public function isShipping() + { + return $this->status === \Mollie\Api\Types\OrderLineStatus::STATUS_SHIPPING; + } + /** + * Is this order line completed? + * + * @return bool + */ + public function isCompleted() + { + return $this->status === \Mollie\Api\Types\OrderLineStatus::STATUS_COMPLETED; + } + /** + * Is this order line for a physical product? + * + * @return bool + */ + public function isPhysical() + { + return $this->type === \Mollie\Api\Types\OrderLineType::TYPE_PHYSICAL; + } + /** + * Is this order line for applying a discount? + * + * @return bool + */ + public function isDiscount() + { + return $this->type === \Mollie\Api\Types\OrderLineType::TYPE_DISCOUNT; + } + /** + * Is this order line for a digital product? + * + * @return bool + */ + public function isDigital() + { + return $this->type === \Mollie\Api\Types\OrderLineType::TYPE_DIGITAL; + } + /** + * Is this order line for applying a shipping fee? + * + * @return bool + */ + public function isShippingFee() + { + return $this->type === \Mollie\Api\Types\OrderLineType::TYPE_SHIPPING_FEE; + } + /** + * Is this order line for store credit? + * + * @return bool + */ + public function isStoreCredit() + { + return $this->type === \Mollie\Api\Types\OrderLineType::TYPE_STORE_CREDIT; + } + /** + * Is this order line for a gift card? + * + * @return bool + */ + public function isGiftCard() + { + return $this->type === \Mollie\Api\Types\OrderLineType::TYPE_GIFT_CARD; + } + /** + * Is this order line for a surcharge? + * + * @return bool + */ + public function isSurcharge() + { + return $this->type === \Mollie\Api\Types\OrderLineType::TYPE_SURCHARGE; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/OrderLineCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/OrderLineCollection.php new file mode 100644 index 00000000..74b7ee93 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/OrderLineCollection.php @@ -0,0 +1,30 @@ +id === $lineId) { + return $line; + } + } + return null; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Organization.php b/catalog/controller/payment/mollie-api-client/src/Resources/Organization.php new file mode 100644 index 00000000..588661c4 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Organization.php @@ -0,0 +1,43 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Payment.php b/catalog/controller/payment/mollie-api-client/src/Resources/Payment.php new file mode 100644 index 00000000..5fe1ced2 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Payment.php @@ -0,0 +1,457 @@ +consumerName and $details->consumerAccount. + * + * @var object + */ + public $details; + /** + * @var object[] + */ + public $_links; + /** + * Whether or not this payment can be canceled. + * + * @var bool|null + */ + public $isCancelable; + /** + * Is this payment canceled? + * + * @return bool + */ + public function isCanceled() + { + return $this->status === \Mollie\Api\Types\PaymentStatus::STATUS_CANCELED; + } + /** + * Is this payment expired? + * + * @return bool + */ + public function isExpired() + { + return $this->status === \Mollie\Api\Types\PaymentStatus::STATUS_EXPIRED; + } + /** + * Is this payment still open / ongoing? + * + * @return bool + */ + public function isOpen() + { + return $this->status === \Mollie\Api\Types\PaymentStatus::STATUS_OPEN; + } + /** + * Is this payment pending? + * + * @return bool + */ + public function isPending() + { + return $this->status === \Mollie\Api\Types\PaymentStatus::STATUS_PENDING; + } + /** + * Is this payment authorized? + * + * @return bool + */ + public function isAuthorized() + { + return $this->status === \Mollie\Api\Types\PaymentStatus::STATUS_AUTHORIZED; + } + /** + * Is this payment paid for? + * + * @return bool + */ + public function isPaid() + { + return !empty($this->paidAt); + } + /** + * Does the payment have refunds + * + * @return bool + */ + public function hasRefunds() + { + return !empty($this->_links->refunds); + } + /** + * Does this payment has chargebacks + * + * @return bool + */ + public function hasChargebacks() + { + return !empty($this->_links->chargebacks); + } + /** + * Is this payment failing? + * + * @return bool + */ + public function isFailed() + { + return $this->status === \Mollie\Api\Types\PaymentStatus::STATUS_FAILED; + } + /** + * Check whether 'sequenceType' is set to 'first'. If a 'first' payment has been + * completed successfully, the consumer's account may be charged automatically + * using recurring payments. + * + * @return bool + */ + public function hasSequenceTypeFirst() + { + return $this->sequenceType === \Mollie\Api\Types\SequenceType::SEQUENCETYPE_FIRST; + } + /** + * Check whether 'sequenceType' is set to 'recurring'. This type of payment is + * processed without involving + * the consumer. + * + * @return bool + */ + public function hasSequenceTypeRecurring() + { + return $this->sequenceType === \Mollie\Api\Types\SequenceType::SEQUENCETYPE_RECURRING; + } + /** + * Get the checkout URL where the customer can complete the payment. + * + * @return string|null + */ + public function getCheckoutUrl() + { + if (empty($this->_links->checkout)) { + return null; + } + return $this->_links->checkout->href; + } + /** + * @return bool + */ + public function canBeRefunded() + { + return $this->amountRemaining !== null; + } + /** + * @return bool + */ + public function canBePartiallyRefunded() + { + return $this->canBeRefunded(); + } + /** + * Get the amount that is already refunded + * + * @return float + */ + public function getAmountRefunded() + { + if ($this->amountRefunded) { + return (double) $this->amountRefunded->value; + } + return 0.0; + } + /** + * Get the remaining amount that can be refunded. For some payment methods this + * amount can be higher than the payment amount. This is possible to reimburse + * the costs for a return shipment to your customer for example. + * + * @return float + */ + public function getAmountRemaining() + { + if ($this->amountRemaining) { + return (double) $this->amountRemaining->value; + } + return 0.0; + } + /** + * Retrieves all refunds associated with this payment + * + * @return RefundCollection + * @throws ApiException + */ + public function refunds() + { + if (!isset($this->_links->refunds->href)) { + return new \Mollie\Api\Resources\RefundCollection($this->client, 0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->refunds->href); + $resourceCollection = new \Mollie\Api\Resources\RefundCollection($this->client, $result->count, $result->_links); + foreach ($result->_embedded->refunds as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Refund($this->client)); + } + return $resourceCollection; + } + /** + * @param string $refundId + * @param array $parameters + * + * @return Refund + */ + public function getRefund($refundId, array $parameters = []) + { + return $this->client->paymentRefunds->getFor($this, $refundId, $parameters); + } + /** + * Retrieves all captures associated with this payment + * + * @return CaptureCollection + * @throws ApiException + */ + public function captures() + { + if (!isset($this->_links->captures->href)) { + return new \Mollie\Api\Resources\CaptureCollection($this->client, 0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->captures->href); + $resourceCollection = new \Mollie\Api\Resources\CaptureCollection($this->client, $result->count, $result->_links); + foreach ($result->_embedded->captures as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Capture($this->client)); + } + return $resourceCollection; + } + /** + * @param string $captureId + * @param array $parameters + * + * @return Capture + */ + public function getCapture($captureId, array $parameters = []) + { + return $this->client->paymentCaptures->getFor($this, $captureId, $parameters); + } + /** + * Retrieves all chargebacks associated with this payment + * + * @return ChargebackCollection + * @throws ApiException + */ + public function chargebacks() + { + if (!isset($this->_links->chargebacks->href)) { + return new \Mollie\Api\Resources\ChargebackCollection($this->client, 0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->chargebacks->href); + $resourceCollection = new \Mollie\Api\Resources\ChargebackCollection($this->client, $result->count, $result->_links); + foreach ($result->_embedded->chargebacks as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Chargeback($this->client)); + } + return $resourceCollection; + } + /** + * Retrieves a specific chargeback for this payment. + * + * @param string $chargebackId + * @param array $parameters + * + * @return Chargeback + */ + public function getChargeback($chargebackId, array $parameters = []) + { + return $this->client->paymentChargebacks->getFor($this, $chargebackId, $parameters); + } + /** + * Issue a refund for this payment. + * + * The $data parameter may either be an array of endpoint parameters or empty to + * do a full refund. + * + * @param array|null $data + * + * @return BaseResource + * @throws ApiException + */ + public function refund($data = []) + { + $resource = "payments/" . \urlencode($this->id) . "/refunds"; + $body = null; + if (\count($data) > 0) { + $body = \json_encode($data); + } + $result = $this->client->performHttpCall(\Mollie\Api\MollieApiClient::HTTP_POST, $resource, $body); + return \Mollie\Api\Resources\ResourceFactory::createFromApiResult($result, new \Mollie\Api\Resources\Refund($this->client)); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/PaymentCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/PaymentCollection.php new file mode 100644 index 00000000..93c9b56f --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/PaymentCollection.php @@ -0,0 +1,21 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Permission.php b/catalog/controller/payment/mollie-api-client/src/Resources/Permission.php new file mode 100644 index 00000000..b8379010 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Permission.php @@ -0,0 +1,28 @@ +status == \Mollie\Api\Types\ProfileStatus::STATUS_UNVERIFIED; + } + /** + * @return bool + */ + public function isVerified() + { + return $this->status == \Mollie\Api\Types\ProfileStatus::STATUS_VERIFIED; + } + /** + * @return bool + */ + public function isBlocked() + { + return $this->status == \Mollie\Api\Types\ProfileStatus::STATUS_BLOCKED; + } + /** + * @return Profile + */ + public function update() + { + if (!isset($this->_links->self->href)) { + return $this; + } + $body = \json_encode(array("name" => $this->name, "website" => $this->website, "email" => $this->email, "phone" => $this->phone, "categoryCode" => $this->categoryCode, "mode" => $this->mode)); + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_PATCH, $this->_links->self->href, $body); + return \Mollie\Api\Resources\ResourceFactory::createFromApiResult($result, new \Mollie\Api\Resources\Profile($this->client)); + } + /** + * Retrieves all chargebacks associated with this profile + * + * @return ChargebackCollection + * @throws ApiException + */ + public function chargebacks() + { + if (!isset($this->_links->chargebacks->href)) { + return new \Mollie\Api\Resources\ChargebackCollection($this->client, 0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->chargebacks->href); + $resourceCollection = new \Mollie\Api\Resources\ChargebackCollection($this->client, $result->count, $result->_links); + foreach ($result->_embedded->chargebacks as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Chargeback($this->client)); + } + return $resourceCollection; + } + /** + * Retrieves all methods activated on this profile + * + * @return MethodCollection + * @throws ApiException + */ + public function methods() + { + if (!isset($this->_links->methods->href)) { + return new \Mollie\Api\Resources\MethodCollection(0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->methods->href); + $resourceCollection = new \Mollie\Api\Resources\MethodCollection($result->count, $result->_links); + foreach ($result->_embedded->methods as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Method($this->client)); + } + return $resourceCollection; + } + /** + * Retrieves all payments associated with this profile + * + * @return PaymentCollection + * @throws ApiException + */ + public function payments() + { + if (!isset($this->_links->payments->href)) { + return new \Mollie\Api\Resources\PaymentCollection($this->client, 0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->payments->href); + $resourceCollection = new \Mollie\Api\Resources\PaymentCollection($this->client, $result->count, $result->_links); + foreach ($result->_embedded->payments as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Payment($this->client)); + } + return $resourceCollection; + } + /** + * Retrieves all refunds associated with this profile + * + * @return RefundCollection + * @throws ApiException + */ + public function refunds() + { + if (!isset($this->_links->refunds->href)) { + return new \Mollie\Api\Resources\RefundCollection($this->client, 0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->refunds->href); + $resourceCollection = new \Mollie\Api\Resources\RefundCollection($this->client, $result->count, $result->_links); + foreach ($result->_embedded->refunds as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Refund($this->client)); + } + return $resourceCollection; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/ProfileCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/ProfileCollection.php new file mode 100644 index 00000000..0d207d30 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/ProfileCollection.php @@ -0,0 +1,21 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Refund.php b/catalog/controller/payment/mollie-api-client/src/Resources/Refund.php new file mode 100644 index 00000000..c86f35ba --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Refund.php @@ -0,0 +1,122 @@ +status === \Mollie\Api\Types\RefundStatus::STATUS_QUEUED; + } + /** + * Is this refund pending? + * + * @return bool + */ + public function isPending() + { + return $this->status === \Mollie\Api\Types\RefundStatus::STATUS_PENDING; + } + /** + * Is this refund processing? + * + * @return bool + */ + public function isProcessing() + { + return $this->status === \Mollie\Api\Types\RefundStatus::STATUS_PROCESSING; + } + /** + * Is this refund transferred to consumer? + * + * @return bool + */ + public function isTransferred() + { + return $this->status === \Mollie\Api\Types\RefundStatus::STATUS_REFUNDED; + } + /** + * Cancel the refund. + * Returns null if successful. + * + * @return null + * @throws ApiException + */ + public function cancel() + { + $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_DELETE, $this->_links->self->href); + return null; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/RefundCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/RefundCollection.php new file mode 100644 index 00000000..26e053de --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/RefundCollection.php @@ -0,0 +1,21 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/ResourceFactory.php b/catalog/controller/payment/mollie-api-client/src/Resources/ResourceFactory.php new file mode 100644 index 00000000..f722c52a --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/ResourceFactory.php @@ -0,0 +1,22 @@ + $value) { + $resource->{$property} = $value; + } + return $resource; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Settlement.php b/catalog/controller/payment/mollie-api-client/src/Resources/Settlement.php new file mode 100644 index 00000000..b38fe912 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Settlement.php @@ -0,0 +1,151 @@ +status === \Mollie\Api\Types\SettlementStatus::STATUS_OPEN; + } + /** + * Is this settlement pending? + * + * @return bool + */ + public function isPending() + { + return $this->status === \Mollie\Api\Types\SettlementStatus::STATUS_PENDING; + } + /** + * Is this settlement paidout? + * + * @return bool + */ + public function isPaidout() + { + return $this->status === \Mollie\Api\Types\SettlementStatus::STATUS_PAIDOUT; + } + /** + * Is this settlement failed? + * + * @return bool + */ + public function isFailed() + { + return $this->status === \Mollie\Api\Types\SettlementStatus::STATUS_FAILED; + } + /** + * Retrieves all payments associated with this settlement + * + * @return PaymentCollection + * @throws ApiException + */ + public function payments() + { + if (!isset($this->_links->payments->href)) { + return new \Mollie\Api\Resources\PaymentCollection($this->client, 0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->payments->href); + $resourceCollection = new \Mollie\Api\Resources\PaymentCollection($this->client, $result->count, $result->_links); + foreach ($result->_embedded->payments as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Payment($this->client)); + } + return $resourceCollection; + } + /** + * Retrieves all refunds associated with this settlement + * + * @return RefundCollection + * @throws ApiException + */ + public function refunds() + { + if (!isset($this->_links->refunds->href)) { + return new \Mollie\Api\Resources\RefundCollection($this->client, 0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->refunds->href); + $resourceCollection = new \Mollie\Api\Resources\RefundCollection($this->client, $result->count, $result->_links); + foreach ($result->_embedded->refunds as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Refund($this->client)); + } + return $resourceCollection; + } + /** + * Retrieves all chargebacks associated with this settlement + * + * @return ChargebackCollection + * @throws ApiException + */ + public function chargebacks() + { + if (!isset($this->_links->chargebacks->href)) { + return new \Mollie\Api\Resources\ChargebackCollection($this->client, 0, null); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_GET, $this->_links->chargebacks->href); + $resourceCollection = new \Mollie\Api\Resources\ChargebackCollection($this->client, $result->count, $result->_links); + foreach ($result->_embedded->chargebacks as $dataResult) { + $resourceCollection[] = \Mollie\Api\Resources\ResourceFactory::createFromApiResult($dataResult, new \Mollie\Api\Resources\Chargeback($this->client)); + } + return $resourceCollection; + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/SettlementCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/SettlementCollection.php new file mode 100644 index 00000000..a2b0ffbc --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/SettlementCollection.php @@ -0,0 +1,21 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/Shipment.php b/catalog/controller/payment/mollie-api-client/src/Resources/Shipment.php new file mode 100644 index 00000000..f877c78e --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/Shipment.php @@ -0,0 +1,115 @@ +tracking !== null; + } + /** + * Does this shipment offer a track and trace code? + * + * @return bool + */ + public function hasTrackingUrl() + { + return $this->hasTracking() && !empty($this->tracking->url); + } + /** + * Retrieve the track and trace url. Returns null if there is no url available. + * + * @return string|null + */ + public function getTrackingUrl() + { + if (!$this->hasTrackingUrl()) { + return null; + } + return $this->tracking->url; + } + /** + * Get the line value objects + * + * @return OrderLineCollection + */ + public function lines() + { + $lines = new \Mollie\Api\Resources\OrderLineCollection(\count($this->lines), null); + foreach ($this->lines as $line) { + $lines->append(\Mollie\Api\Resources\ResourceFactory::createFromApiResult($line, new \Mollie\Api\Resources\OrderLine($this->client))); + } + return $lines; + } + /** + * Get the Order object for this shipment + * + * @return Order + */ + public function order() + { + return $this->client->orders->get($this->orderId); + } + /** + * Save changes made to this shipment. + * + * @return BaseResource|Shipment + * @throws \Mollie\Api\Exceptions\ApiException + */ + public function update() + { + if (!isset($this->_links->self->href)) { + return $this; + } + $body = \json_encode(["tracking" => $this->tracking]); + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_PATCH, $this->_links->self->href, $body); + return \Mollie\Api\Resources\ResourceFactory::createFromApiResult($result, new \Mollie\Api\Resources\Shipment($this->client)); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/ShipmentCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/ShipmentCollection.php new file mode 100644 index 00000000..3029c84f --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/ShipmentCollection.php @@ -0,0 +1,14 @@ +_links->self->href)) { + return $this; + } + $body = \json_encode(["amount" => $this->amount, "times" => $this->times, "startDate" => $this->startDate, "webhookUrl" => $this->webhookUrl, "description" => $this->description, "mandateId" => $this->mandateId]); + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_PATCH, $this->_links->self->href, $body); + return \Mollie\Api\Resources\ResourceFactory::createFromApiResult($result, new \Mollie\Api\Resources\Subscription($this->client)); + } + /** + * Returns whether the Subscription is active or not. + * + * @return bool + */ + public function isActive() + { + return $this->status === \Mollie\Api\Types\SubscriptionStatus::STATUS_ACTIVE; + } + /** + * Returns whether the Subscription is pending or not. + * + * @return bool + */ + public function isPending() + { + return $this->status === \Mollie\Api\Types\SubscriptionStatus::STATUS_PENDING; + } + /** + * Returns whether the Subscription is canceled or not. + * + * @return bool + */ + public function isCanceled() + { + return $this->status === \Mollie\Api\Types\SubscriptionStatus::STATUS_CANCELED; + } + /** + * Returns whether the Subscription is suspended or not. + * + * @return bool + */ + public function isSuspended() + { + return $this->status === \Mollie\Api\Types\SubscriptionStatus::STATUS_SUSPENDED; + } + /** + * Returns whether the Subscription is completed or not. + * + * @return bool + */ + public function isCompleted() + { + return $this->status === \Mollie\Api\Types\SubscriptionStatus::STATUS_COMPLETED; + } + /** + * Cancels this subscription + * + * @return Subscription + */ + public function cancel() + { + if (!isset($this->_links->self->href)) { + return $this; + } + $body = null; + if ($this->client->usesOAuth()) { + $body = \json_encode(["testmode" => $this->mode === "test" ? \true : \false]); + } + $result = $this->client->performHttpCallToFullUrl(\Mollie\Api\MollieApiClient::HTTP_DELETE, $this->_links->self->href, $body); + return \Mollie\Api\Resources\ResourceFactory::createFromApiResult($result, new \Mollie\Api\Resources\Subscription($this->client)); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Resources/SubscriptionCollection.php b/catalog/controller/payment/mollie-api-client/src/Resources/SubscriptionCollection.php new file mode 100644 index 00000000..83159d1d --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Resources/SubscriptionCollection.php @@ -0,0 +1,21 @@ +client); + } +} diff --git a/catalog/controller/payment/mollie-api-client/src/Types/InvoiceStatus.php b/catalog/controller/payment/mollie-api-client/src/Types/InvoiceStatus.php new file mode 100644 index 00000000..8384c053 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/src/Types/InvoiceStatus.php @@ -0,0 +1,19 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/LICENSE b/catalog/controller/payment/mollie-api-client/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_classmap.php b/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..35090058 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_classmap.php @@ -0,0 +1,195 @@ + $baseDir . '/src/CompatibilityChecker.php', + 'Mollie\\Api\\Endpoints\\CustomerEndpoint' => $baseDir . '/src/Endpoints/CustomerEndpoint.php', + 'Mollie\\Api\\Endpoints\\CustomerPaymentsEndpoint' => $baseDir . '/src/Endpoints/CustomerPaymentsEndpoint.php', + 'Mollie\\Api\\Endpoints\\EndpointAbstract' => $baseDir . '/src/Endpoints/EndpointAbstract.php', + 'Mollie\\Api\\Endpoints\\InvoiceEndpoint' => $baseDir . '/src/Endpoints/InvoiceEndpoint.php', + 'Mollie\\Api\\Endpoints\\MandateEndpoint' => $baseDir . '/src/Endpoints/MandateEndpoint.php', + 'Mollie\\Api\\Endpoints\\MethodEndpoint' => $baseDir . '/src/Endpoints/MethodEndpoint.php', + 'Mollie\\Api\\Endpoints\\OrderEndpoint' => $baseDir . '/src/Endpoints/OrderEndpoint.php', + 'Mollie\\Api\\Endpoints\\OrderLineEndpoint' => $baseDir . '/src/Endpoints/OrderLineEndpoint.php', + 'Mollie\\Api\\Endpoints\\OrderRefundEndpoint' => $baseDir . '/src/Endpoints/OrderRefundEndpoint.php', + 'Mollie\\Api\\Endpoints\\OrganizationEndpoint' => $baseDir . '/src/Endpoints/OrganizationEndpoint.php', + 'Mollie\\Api\\Endpoints\\PaymentCaptureEndpoint' => $baseDir . '/src/Endpoints/PaymentCaptureEndpoint.php', + 'Mollie\\Api\\Endpoints\\PaymentChargebackEndpoint' => $baseDir . '/src/Endpoints/PaymentChargebackEndpoint.php', + 'Mollie\\Api\\Endpoints\\PaymentEndpoint' => $baseDir . '/src/Endpoints/PaymentEndpoint.php', + 'Mollie\\Api\\Endpoints\\PaymentRefundEndpoint' => $baseDir . '/src/Endpoints/PaymentRefundEndpoint.php', + 'Mollie\\Api\\Endpoints\\PermissionEndpoint' => $baseDir . '/src/Endpoints/PermissionEndpoint.php', + 'Mollie\\Api\\Endpoints\\ProfileEndpoint' => $baseDir . '/src/Endpoints/ProfileEndpoint.php', + 'Mollie\\Api\\Endpoints\\RefundEndpoint' => $baseDir . '/src/Endpoints/RefundEndpoint.php', + 'Mollie\\Api\\Endpoints\\SettlementsEndpoint' => $baseDir . '/src/Endpoints/SettlementsEndpoint.php', + 'Mollie\\Api\\Endpoints\\ShipmentEndpoint' => $baseDir . '/src/Endpoints/ShipmentEndpoint.php', + 'Mollie\\Api\\Endpoints\\SubscriptionEndpoint' => $baseDir . '/src/Endpoints/SubscriptionEndpoint.php', + 'Mollie\\Api\\Exceptions\\ApiException' => $baseDir . '/src/Exceptions/ApiException.php', + 'Mollie\\Api\\Exceptions\\IncompatiblePlatform' => $baseDir . '/src/Exceptions/IncompatiblePlatform.php', + 'Mollie\\Api\\MollieApiClient' => $baseDir . '/src/MollieApiClient.php', + 'Mollie\\Api\\Resources\\BaseCollection' => $baseDir . '/src/Resources/BaseCollection.php', + 'Mollie\\Api\\Resources\\BaseResource' => $baseDir . '/src/Resources/BaseResource.php', + 'Mollie\\Api\\Resources\\Capture' => $baseDir . '/src/Resources/Capture.php', + 'Mollie\\Api\\Resources\\CaptureCollection' => $baseDir . '/src/Resources/CaptureCollection.php', + 'Mollie\\Api\\Resources\\Chargeback' => $baseDir . '/src/Resources/Chargeback.php', + 'Mollie\\Api\\Resources\\ChargebackCollection' => $baseDir . '/src/Resources/ChargebackCollection.php', + 'Mollie\\Api\\Resources\\CursorCollection' => $baseDir . '/src/Resources/CursorCollection.php', + 'Mollie\\Api\\Resources\\Customer' => $baseDir . '/src/Resources/Customer.php', + 'Mollie\\Api\\Resources\\CustomerCollection' => $baseDir . '/src/Resources/CustomerCollection.php', + 'Mollie\\Api\\Resources\\Invoice' => $baseDir . '/src/Resources/Invoice.php', + 'Mollie\\Api\\Resources\\InvoiceCollection' => $baseDir . '/src/Resources/InvoiceCollection.php', + 'Mollie\\Api\\Resources\\Issuer' => $baseDir . '/src/Resources/Issuer.php', + 'Mollie\\Api\\Resources\\IssuerCollection' => $baseDir . '/src/Resources/IssuerCollection.php', + 'Mollie\\Api\\Resources\\Mandate' => $baseDir . '/src/Resources/Mandate.php', + 'Mollie\\Api\\Resources\\MandateCollection' => $baseDir . '/src/Resources/MandateCollection.php', + 'Mollie\\Api\\Resources\\Method' => $baseDir . '/src/Resources/Method.php', + 'Mollie\\Api\\Resources\\MethodCollection' => $baseDir . '/src/Resources/MethodCollection.php', + 'Mollie\\Api\\Resources\\Order' => $baseDir . '/src/Resources/Order.php', + 'Mollie\\Api\\Resources\\OrderCollection' => $baseDir . '/src/Resources/OrderCollection.php', + 'Mollie\\Api\\Resources\\OrderLine' => $baseDir . '/src/Resources/OrderLine.php', + 'Mollie\\Api\\Resources\\OrderLineCollection' => $baseDir . '/src/Resources/OrderLineCollection.php', + 'Mollie\\Api\\Resources\\Organization' => $baseDir . '/src/Resources/Organization.php', + 'Mollie\\Api\\Resources\\OrganizationCollection' => $baseDir . '/src/Resources/OrganizationCollection.php', + 'Mollie\\Api\\Resources\\Payment' => $baseDir . '/src/Resources/Payment.php', + 'Mollie\\Api\\Resources\\PaymentCollection' => $baseDir . '/src/Resources/PaymentCollection.php', + 'Mollie\\Api\\Resources\\Permission' => $baseDir . '/src/Resources/Permission.php', + 'Mollie\\Api\\Resources\\PermissionCollection' => $baseDir . '/src/Resources/PermissionCollection.php', + 'Mollie\\Api\\Resources\\Profile' => $baseDir . '/src/Resources/Profile.php', + 'Mollie\\Api\\Resources\\ProfileCollection' => $baseDir . '/src/Resources/ProfileCollection.php', + 'Mollie\\Api\\Resources\\Refund' => $baseDir . '/src/Resources/Refund.php', + 'Mollie\\Api\\Resources\\RefundCollection' => $baseDir . '/src/Resources/RefundCollection.php', + 'Mollie\\Api\\Resources\\ResourceFactory' => $baseDir . '/src/Resources/ResourceFactory.php', + 'Mollie\\Api\\Resources\\Settlement' => $baseDir . '/src/Resources/Settlement.php', + 'Mollie\\Api\\Resources\\SettlementCollection' => $baseDir . '/src/Resources/SettlementCollection.php', + 'Mollie\\Api\\Resources\\Shipment' => $baseDir . '/src/Resources/Shipment.php', + 'Mollie\\Api\\Resources\\ShipmentCollection' => $baseDir . '/src/Resources/ShipmentCollection.php', + 'Mollie\\Api\\Resources\\Subscription' => $baseDir . '/src/Resources/Subscription.php', + 'Mollie\\Api\\Resources\\SubscriptionCollection' => $baseDir . '/src/Resources/SubscriptionCollection.php', + 'Mollie\\Api\\Types\\InvoiceStatus' => $baseDir . '/src/Types/InvoiceStatus.php', + 'Mollie\\Api\\Types\\MandateMethod' => $baseDir . '/src/Types/MandateMethod.php', + 'Mollie\\Api\\Types\\MandateStatus' => $baseDir . '/src/Types/MandateStatus.php', + 'Mollie\\Api\\Types\\OrderLineStatus' => $baseDir . '/src/Types/OrderLineStatus.php', + 'Mollie\\Api\\Types\\OrderLineType' => $baseDir . '/src/Types/OrderLineType.php', + 'Mollie\\Api\\Types\\OrderStatus' => $baseDir . '/src/Types/OrderStatus.php', + 'Mollie\\Api\\Types\\PaymentMethod' => $baseDir . '/src/Types/PaymentMethod.php', + 'Mollie\\Api\\Types\\PaymentStatus' => $baseDir . '/src/Types/PaymentStatus.php', + 'Mollie\\Api\\Types\\ProfileStatus' => $baseDir . '/src/Types/ProfileStatus.php', + 'Mollie\\Api\\Types\\RefundStatus' => $baseDir . '/src/Types/RefundStatus.php', + 'Mollie\\Api\\Types\\SequenceType' => $baseDir . '/src/Types/SequenceType.php', + 'Mollie\\Api\\Types\\SettlementStatus' => $baseDir . '/src/Types/SettlementStatus.php', + 'Mollie\\Api\\Types\\SubscriptionStatus' => $baseDir . '/src/Types/SubscriptionStatus.php', + '_PhpScoper5bbb1f4b001f3\\Composer\\CaBundle\\CaBundle' => $vendorDir . '/composer/ca-bundle/src/CaBundle.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Client' => $vendorDir . '/guzzlehttp/guzzle/src/Client.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\ClientInterface' => $vendorDir . '/guzzlehttp/guzzle/src/ClientInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Cookie\\CookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Cookie\\CookieJarInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Cookie\\FileCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Cookie\\SessionCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Cookie\\SetCookie' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\BadResponseException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\ClientException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ClientException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\ConnectException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ConnectException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\GuzzleException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\RequestException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/RequestException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\SeekException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/SeekException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\ServerException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ServerException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\TooManyRedirectsException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\TransferException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TransferException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\HandlerStack' => $vendorDir . '/guzzlehttp/guzzle/src/HandlerStack.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\CurlFactory' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\CurlFactoryInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\CurlHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\CurlMultiHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\EasyHandle' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\MockHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/MockHandler.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\Proxy' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/Proxy.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\StreamHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\MessageFormatter' => $vendorDir . '/guzzlehttp/guzzle/src/MessageFormatter.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Middleware' => $vendorDir . '/guzzlehttp/guzzle/src/Middleware.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Pool' => $vendorDir . '/guzzlehttp/guzzle/src/Pool.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\PrepareBodyMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\AggregateException' => $vendorDir . '/guzzlehttp/promises/src/AggregateException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\CancellationException' => $vendorDir . '/guzzlehttp/promises/src/CancellationException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\Coroutine' => $vendorDir . '/guzzlehttp/promises/src/Coroutine.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\EachPromise' => $vendorDir . '/guzzlehttp/promises/src/EachPromise.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\FulfilledPromise' => $vendorDir . '/guzzlehttp/promises/src/FulfilledPromise.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\Promise' => $vendorDir . '/guzzlehttp/promises/src/Promise.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\PromiseInterface' => $vendorDir . '/guzzlehttp/promises/src/PromiseInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\PromisorInterface' => $vendorDir . '/guzzlehttp/promises/src/PromisorInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\RejectedPromise' => $vendorDir . '/guzzlehttp/promises/src/RejectedPromise.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\RejectionException' => $vendorDir . '/guzzlehttp/promises/src/RejectionException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\TaskQueue' => $vendorDir . '/guzzlehttp/promises/src/TaskQueue.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\TaskQueueInterface' => $vendorDir . '/guzzlehttp/promises/src/TaskQueueInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\AppendStream' => $vendorDir . '/guzzlehttp/psr7/src/AppendStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\BufferStream' => $vendorDir . '/guzzlehttp/psr7/src/BufferStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\CachingStream' => $vendorDir . '/guzzlehttp/psr7/src/CachingStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\DroppingStream' => $vendorDir . '/guzzlehttp/psr7/src/DroppingStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\FnStream' => $vendorDir . '/guzzlehttp/psr7/src/FnStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\InflateStream' => $vendorDir . '/guzzlehttp/psr7/src/InflateStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\LazyOpenStream' => $vendorDir . '/guzzlehttp/psr7/src/LazyOpenStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\LimitStream' => $vendorDir . '/guzzlehttp/psr7/src/LimitStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\MessageTrait' => $vendorDir . '/guzzlehttp/psr7/src/MessageTrait.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\MultipartStream' => $vendorDir . '/guzzlehttp/psr7/src/MultipartStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\NoSeekStream' => $vendorDir . '/guzzlehttp/psr7/src/NoSeekStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\PumpStream' => $vendorDir . '/guzzlehttp/psr7/src/PumpStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\Request' => $vendorDir . '/guzzlehttp/psr7/src/Request.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\Response' => $vendorDir . '/guzzlehttp/psr7/src/Response.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\ServerRequest' => $vendorDir . '/guzzlehttp/psr7/src/ServerRequest.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\Stream' => $vendorDir . '/guzzlehttp/psr7/src/Stream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\StreamDecoratorTrait' => $vendorDir . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\StreamWrapper' => $vendorDir . '/guzzlehttp/psr7/src/StreamWrapper.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\UploadedFile' => $vendorDir . '/guzzlehttp/psr7/src/UploadedFile.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\Uri' => $vendorDir . '/guzzlehttp/psr7/src/Uri.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\UriNormalizer' => $vendorDir . '/guzzlehttp/psr7/src/UriNormalizer.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\UriResolver' => $vendorDir . '/guzzlehttp/psr7/src/UriResolver.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\RedirectMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RedirectMiddleware.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\RequestOptions' => $vendorDir . '/guzzlehttp/guzzle/src/RequestOptions.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\RetryMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RetryMiddleware.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\TransferStats' => $vendorDir . '/guzzlehttp/guzzle/src/TransferStats.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\UriTemplate' => $vendorDir . '/guzzlehttp/guzzle/src/UriTemplate.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\MessageInterface' => $vendorDir . '/psr/http-message/src/MessageInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\RequestInterface' => $vendorDir . '/psr/http-message/src/RequestInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\ResponseInterface' => $vendorDir . '/psr/http-message/src/ResponseInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\ServerRequestInterface' => $vendorDir . '/psr/http-message/src/ServerRequestInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\StreamInterface' => $vendorDir . '/psr/http-message/src/StreamInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\UploadedFileInterface' => $vendorDir . '/psr/http-message/src/UploadedFileInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\CompatibilityCheckerTest' => $baseDir . '/tests/Mollie/API/CompatibilityCheckerTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\BaseEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/BaseEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\ChargebackEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/PaymentChargebackEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\CustomerEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/CustomerEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\CustomerPaymentEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/CustomerPaymentEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\InvoiceEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/InvoiceEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\MandateEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/MandateEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\MethodEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/MethodEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\OrderEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/OrderEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\OrderLineEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/OrderLineEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\OrderRefundEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/OrderRefundEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\OrganizationEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/OrganizationEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\PaymentCaptureEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/PaymentCaptureEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\PaymentEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/PaymentEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\PaymentRefundEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/PaymentRefundEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\PermissionEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/PermissionEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\ProfileEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/ProfileEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\RefundEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/RefundEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\SettlementEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/SettlementEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\ShipmentEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/ShipmentEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\SubscriptionEndpointTest' => $baseDir . '/tests/Mollie/API/Endpoints/SubscriptionEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\MollieApiClientTest' => $baseDir . '/tests/Mollie/API/MollieApiClientTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\InvoiceTest' => $baseDir . '/tests/Mollie/API/Resources/InvoiceTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\OrderLineCollectionTest' => $baseDir . '/tests/Mollie/API/Resources/OrderLineCollectionTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\OrderLineTest' => $baseDir . '/tests/Mollie/API/Resources/OrderLineTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\OrderTest' => $baseDir . '/tests/Mollie/API/Resources/OrderTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\PaymentTest' => $baseDir . '/tests/Mollie/API/Resources/PaymentTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\ProfileTest' => $baseDir . '/tests/Mollie/API/Resources/ProfileTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\RefundTest' => $baseDir . '/tests/Mollie/API/Resources/RefundTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\ResourceFactoryTest' => $baseDir . '/tests/Mollie/API/Resources/ResourceFactoryTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\SettlementTest' => $baseDir . '/tests/Mollie/API/Resources/SettlementTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\ShipmentTest' => $baseDir . '/tests/Mollie/API/Resources/ShipmentTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\SubscriptionTest' => $baseDir . '/tests/Mollie/API/Resources/SubscriptionTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\TestHelpers\\AmountObjectTestHelpers' => $baseDir . '/tests/Mollie/TestHelpers/AmountObjectTestHelpers.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\TestHelpers\\LinkObjectTestHelpers' => $baseDir . '/tests/Mollie/TestHelpers/LinkObjectTestHelpers.php', +); diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_files.php b/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_files.php new file mode 100644 index 00000000..dd37d858 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_files.php @@ -0,0 +1,12 @@ + $vendorDir . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', +); diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_namespaces.php b/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_namespaces.php new file mode 100644 index 00000000..b7fc0125 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($baseDir . '/tests'), + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), + '_PhpScoper5bbb1f4b001f3\\Composer\\CaBundle\\' => array($vendorDir . '/composer/ca-bundle/src'), + 'Mollie\\Api\\' => array($baseDir . '/src'), +); diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_real.php b/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_real.php new file mode 100644 index 00000000..a251e523 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_real.php @@ -0,0 +1,61 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInita3126e82b6f8a8825a16880fe8b70058::getInitializer($loader)); + } else { + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->setClassMapAuthoritative(true); + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInita3126e82b6f8a8825a16880fe8b70058::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequirea3126e82b6f8a8825a16880fe8b70058($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequirea3126e82b6f8a8825a16880fe8b70058($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_static.php b/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_static.php new file mode 100644 index 00000000..c540e713 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/autoload_static.php @@ -0,0 +1,260 @@ + __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', + ); + + public static $prefixLengthsPsr4 = array ( + '_' => + array ( + '_PhpScoper5bbb1f4b001f3\\Tests\\' => 30, + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\' => 41, + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\' => 40, + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\' => 43, + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\' => 35, + '_PhpScoper5bbb1f4b001f3\\Composer\\CaBundle\\' => 42, + ), + 'M' => + array ( + 'Mollie\\Api\\' => 11, + ), + ); + + public static $prefixDirsPsr4 = array ( + '_PhpScoper5bbb1f4b001f3\\Tests\\' => + array ( + 0 => __DIR__ . '/../..' . '/tests', + ), + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-message/src', + ), + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', + ), + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', + ), + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', + ), + '_PhpScoper5bbb1f4b001f3\\Composer\\CaBundle\\' => + array ( + 0 => __DIR__ . '/..' . '/composer/ca-bundle/src', + ), + 'Mollie\\Api\\' => + array ( + 0 => __DIR__ . '/../..' . '/src', + ), + ); + + public static $classMap = array ( + 'Mollie\\Api\\CompatibilityChecker' => __DIR__ . '/../..' . '/src/CompatibilityChecker.php', + 'Mollie\\Api\\Endpoints\\CustomerEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/CustomerEndpoint.php', + 'Mollie\\Api\\Endpoints\\CustomerPaymentsEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/CustomerPaymentsEndpoint.php', + 'Mollie\\Api\\Endpoints\\EndpointAbstract' => __DIR__ . '/../..' . '/src/Endpoints/EndpointAbstract.php', + 'Mollie\\Api\\Endpoints\\InvoiceEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/InvoiceEndpoint.php', + 'Mollie\\Api\\Endpoints\\MandateEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/MandateEndpoint.php', + 'Mollie\\Api\\Endpoints\\MethodEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/MethodEndpoint.php', + 'Mollie\\Api\\Endpoints\\OrderEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/OrderEndpoint.php', + 'Mollie\\Api\\Endpoints\\OrderLineEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/OrderLineEndpoint.php', + 'Mollie\\Api\\Endpoints\\OrderRefundEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/OrderRefundEndpoint.php', + 'Mollie\\Api\\Endpoints\\OrganizationEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/OrganizationEndpoint.php', + 'Mollie\\Api\\Endpoints\\PaymentCaptureEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/PaymentCaptureEndpoint.php', + 'Mollie\\Api\\Endpoints\\PaymentChargebackEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/PaymentChargebackEndpoint.php', + 'Mollie\\Api\\Endpoints\\PaymentEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/PaymentEndpoint.php', + 'Mollie\\Api\\Endpoints\\PaymentRefundEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/PaymentRefundEndpoint.php', + 'Mollie\\Api\\Endpoints\\PermissionEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/PermissionEndpoint.php', + 'Mollie\\Api\\Endpoints\\ProfileEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/ProfileEndpoint.php', + 'Mollie\\Api\\Endpoints\\RefundEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/RefundEndpoint.php', + 'Mollie\\Api\\Endpoints\\SettlementsEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/SettlementsEndpoint.php', + 'Mollie\\Api\\Endpoints\\ShipmentEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/ShipmentEndpoint.php', + 'Mollie\\Api\\Endpoints\\SubscriptionEndpoint' => __DIR__ . '/../..' . '/src/Endpoints/SubscriptionEndpoint.php', + 'Mollie\\Api\\Exceptions\\ApiException' => __DIR__ . '/../..' . '/src/Exceptions/ApiException.php', + 'Mollie\\Api\\Exceptions\\IncompatiblePlatform' => __DIR__ . '/../..' . '/src/Exceptions/IncompatiblePlatform.php', + 'Mollie\\Api\\MollieApiClient' => __DIR__ . '/../..' . '/src/MollieApiClient.php', + 'Mollie\\Api\\Resources\\BaseCollection' => __DIR__ . '/../..' . '/src/Resources/BaseCollection.php', + 'Mollie\\Api\\Resources\\BaseResource' => __DIR__ . '/../..' . '/src/Resources/BaseResource.php', + 'Mollie\\Api\\Resources\\Capture' => __DIR__ . '/../..' . '/src/Resources/Capture.php', + 'Mollie\\Api\\Resources\\CaptureCollection' => __DIR__ . '/../..' . '/src/Resources/CaptureCollection.php', + 'Mollie\\Api\\Resources\\Chargeback' => __DIR__ . '/../..' . '/src/Resources/Chargeback.php', + 'Mollie\\Api\\Resources\\ChargebackCollection' => __DIR__ . '/../..' . '/src/Resources/ChargebackCollection.php', + 'Mollie\\Api\\Resources\\CursorCollection' => __DIR__ . '/../..' . '/src/Resources/CursorCollection.php', + 'Mollie\\Api\\Resources\\Customer' => __DIR__ . '/../..' . '/src/Resources/Customer.php', + 'Mollie\\Api\\Resources\\CustomerCollection' => __DIR__ . '/../..' . '/src/Resources/CustomerCollection.php', + 'Mollie\\Api\\Resources\\Invoice' => __DIR__ . '/../..' . '/src/Resources/Invoice.php', + 'Mollie\\Api\\Resources\\InvoiceCollection' => __DIR__ . '/../..' . '/src/Resources/InvoiceCollection.php', + 'Mollie\\Api\\Resources\\Issuer' => __DIR__ . '/../..' . '/src/Resources/Issuer.php', + 'Mollie\\Api\\Resources\\IssuerCollection' => __DIR__ . '/../..' . '/src/Resources/IssuerCollection.php', + 'Mollie\\Api\\Resources\\Mandate' => __DIR__ . '/../..' . '/src/Resources/Mandate.php', + 'Mollie\\Api\\Resources\\MandateCollection' => __DIR__ . '/../..' . '/src/Resources/MandateCollection.php', + 'Mollie\\Api\\Resources\\Method' => __DIR__ . '/../..' . '/src/Resources/Method.php', + 'Mollie\\Api\\Resources\\MethodCollection' => __DIR__ . '/../..' . '/src/Resources/MethodCollection.php', + 'Mollie\\Api\\Resources\\Order' => __DIR__ . '/../..' . '/src/Resources/Order.php', + 'Mollie\\Api\\Resources\\OrderCollection' => __DIR__ . '/../..' . '/src/Resources/OrderCollection.php', + 'Mollie\\Api\\Resources\\OrderLine' => __DIR__ . '/../..' . '/src/Resources/OrderLine.php', + 'Mollie\\Api\\Resources\\OrderLineCollection' => __DIR__ . '/../..' . '/src/Resources/OrderLineCollection.php', + 'Mollie\\Api\\Resources\\Organization' => __DIR__ . '/../..' . '/src/Resources/Organization.php', + 'Mollie\\Api\\Resources\\OrganizationCollection' => __DIR__ . '/../..' . '/src/Resources/OrganizationCollection.php', + 'Mollie\\Api\\Resources\\Payment' => __DIR__ . '/../..' . '/src/Resources/Payment.php', + 'Mollie\\Api\\Resources\\PaymentCollection' => __DIR__ . '/../..' . '/src/Resources/PaymentCollection.php', + 'Mollie\\Api\\Resources\\Permission' => __DIR__ . '/../..' . '/src/Resources/Permission.php', + 'Mollie\\Api\\Resources\\PermissionCollection' => __DIR__ . '/../..' . '/src/Resources/PermissionCollection.php', + 'Mollie\\Api\\Resources\\Profile' => __DIR__ . '/../..' . '/src/Resources/Profile.php', + 'Mollie\\Api\\Resources\\ProfileCollection' => __DIR__ . '/../..' . '/src/Resources/ProfileCollection.php', + 'Mollie\\Api\\Resources\\Refund' => __DIR__ . '/../..' . '/src/Resources/Refund.php', + 'Mollie\\Api\\Resources\\RefundCollection' => __DIR__ . '/../..' . '/src/Resources/RefundCollection.php', + 'Mollie\\Api\\Resources\\ResourceFactory' => __DIR__ . '/../..' . '/src/Resources/ResourceFactory.php', + 'Mollie\\Api\\Resources\\Settlement' => __DIR__ . '/../..' . '/src/Resources/Settlement.php', + 'Mollie\\Api\\Resources\\SettlementCollection' => __DIR__ . '/../..' . '/src/Resources/SettlementCollection.php', + 'Mollie\\Api\\Resources\\Shipment' => __DIR__ . '/../..' . '/src/Resources/Shipment.php', + 'Mollie\\Api\\Resources\\ShipmentCollection' => __DIR__ . '/../..' . '/src/Resources/ShipmentCollection.php', + 'Mollie\\Api\\Resources\\Subscription' => __DIR__ . '/../..' . '/src/Resources/Subscription.php', + 'Mollie\\Api\\Resources\\SubscriptionCollection' => __DIR__ . '/../..' . '/src/Resources/SubscriptionCollection.php', + 'Mollie\\Api\\Types\\InvoiceStatus' => __DIR__ . '/../..' . '/src/Types/InvoiceStatus.php', + 'Mollie\\Api\\Types\\MandateMethod' => __DIR__ . '/../..' . '/src/Types/MandateMethod.php', + 'Mollie\\Api\\Types\\MandateStatus' => __DIR__ . '/../..' . '/src/Types/MandateStatus.php', + 'Mollie\\Api\\Types\\OrderLineStatus' => __DIR__ . '/../..' . '/src/Types/OrderLineStatus.php', + 'Mollie\\Api\\Types\\OrderLineType' => __DIR__ . '/../..' . '/src/Types/OrderLineType.php', + 'Mollie\\Api\\Types\\OrderStatus' => __DIR__ . '/../..' . '/src/Types/OrderStatus.php', + 'Mollie\\Api\\Types\\PaymentMethod' => __DIR__ . '/../..' . '/src/Types/PaymentMethod.php', + 'Mollie\\Api\\Types\\PaymentStatus' => __DIR__ . '/../..' . '/src/Types/PaymentStatus.php', + 'Mollie\\Api\\Types\\ProfileStatus' => __DIR__ . '/../..' . '/src/Types/ProfileStatus.php', + 'Mollie\\Api\\Types\\RefundStatus' => __DIR__ . '/../..' . '/src/Types/RefundStatus.php', + 'Mollie\\Api\\Types\\SequenceType' => __DIR__ . '/../..' . '/src/Types/SequenceType.php', + 'Mollie\\Api\\Types\\SettlementStatus' => __DIR__ . '/../..' . '/src/Types/SettlementStatus.php', + 'Mollie\\Api\\Types\\SubscriptionStatus' => __DIR__ . '/../..' . '/src/Types/SubscriptionStatus.php', + '_PhpScoper5bbb1f4b001f3\\Composer\\CaBundle\\CaBundle' => __DIR__ . '/..' . '/composer/ca-bundle/src/CaBundle.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Client' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Client.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\ClientInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/ClientInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Cookie\\CookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Cookie\\CookieJarInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Cookie\\FileCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Cookie\\SessionCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Cookie\\SetCookie' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\BadResponseException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\ClientException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ClientException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\ConnectException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ConnectException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\GuzzleException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\RequestException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/RequestException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\SeekException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/SeekException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\ServerException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ServerException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\TooManyRedirectsException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Exception\\TransferException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TransferException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\HandlerStack' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/HandlerStack.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\CurlFactory' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\CurlFactoryInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\CurlHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\CurlMultiHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\EasyHandle' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/EasyHandle.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\MockHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/MockHandler.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\Proxy' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/Proxy.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Handler\\StreamHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/StreamHandler.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\MessageFormatter' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/MessageFormatter.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Middleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Middleware.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Pool' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Pool.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\PrepareBodyMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\AggregateException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/AggregateException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\CancellationException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/CancellationException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\Coroutine' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Coroutine.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\EachPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/EachPromise.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\FulfilledPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/FulfilledPromise.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\Promise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/Promise.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\PromiseInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromiseInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\PromisorInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/PromisorInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\RejectedPromise' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectedPromise.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\RejectionException' => __DIR__ . '/..' . '/guzzlehttp/promises/src/RejectionException.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\TaskQueue' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueue.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\TaskQueueInterface' => __DIR__ . '/..' . '/guzzlehttp/promises/src/TaskQueueInterface.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\AppendStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/AppendStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\BufferStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/BufferStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\CachingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/CachingStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\DroppingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/DroppingStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\FnStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/FnStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\InflateStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/InflateStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\LazyOpenStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LazyOpenStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\LimitStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LimitStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\MessageTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MessageTrait.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\MultipartStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MultipartStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\NoSeekStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/NoSeekStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\PumpStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/PumpStream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\Request' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Request.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\Response' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Response.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\ServerRequest' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/ServerRequest.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\Stream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Stream.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\StreamDecoratorTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\StreamWrapper' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamWrapper.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\UploadedFile' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UploadedFile.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Uri.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriNormalizer.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriResolver.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\RedirectMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RedirectMiddleware.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\RequestOptions' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RequestOptions.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\RetryMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RetryMiddleware.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\TransferStats' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/TransferStats.php', + '_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\UriTemplate' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/UriTemplate.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/..' . '/psr/http-message/src/MessageInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/RequestInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/..' . '/psr/http-message/src/ResponseInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\ServerRequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/ServerRequestInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\StreamInterface' => __DIR__ . '/..' . '/psr/http-message/src/StreamInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\UploadedFileInterface' => __DIR__ . '/..' . '/psr/http-message/src/UploadedFileInterface.php', + '_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\UriInterface' => __DIR__ . '/..' . '/psr/http-message/src/UriInterface.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\CompatibilityCheckerTest' => __DIR__ . '/../..' . '/tests/Mollie/API/CompatibilityCheckerTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\BaseEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/BaseEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\ChargebackEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/PaymentChargebackEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\CustomerEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/CustomerEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\CustomerPaymentEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/CustomerPaymentEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\InvoiceEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/InvoiceEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\MandateEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/MandateEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\MethodEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/MethodEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\OrderEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/OrderEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\OrderLineEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/OrderLineEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\OrderRefundEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/OrderRefundEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\OrganizationEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/OrganizationEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\PaymentCaptureEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/PaymentCaptureEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\PaymentEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/PaymentEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\PaymentRefundEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/PaymentRefundEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\PermissionEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/PermissionEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\ProfileEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/ProfileEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\RefundEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/RefundEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\SettlementEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/SettlementEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\ShipmentEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/ShipmentEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Endpoints\\SubscriptionEndpointTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Endpoints/SubscriptionEndpointTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\MollieApiClientTest' => __DIR__ . '/../..' . '/tests/Mollie/API/MollieApiClientTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\InvoiceTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/InvoiceTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\OrderLineCollectionTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/OrderLineCollectionTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\OrderLineTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/OrderLineTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\OrderTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/OrderTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\PaymentTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/PaymentTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\ProfileTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/ProfileTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\RefundTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/RefundTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\ResourceFactoryTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/ResourceFactoryTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\SettlementTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/SettlementTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\ShipmentTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/ShipmentTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\Api\\Resources\\SubscriptionTest' => __DIR__ . '/../..' . '/tests/Mollie/API/Resources/SubscriptionTest.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\TestHelpers\\AmountObjectTestHelpers' => __DIR__ . '/../..' . '/tests/Mollie/TestHelpers/AmountObjectTestHelpers.php', + '_PhpScoper5bbb1f4b001f3\\Tests\\Mollie\\TestHelpers\\LinkObjectTestHelpers' => __DIR__ . '/../..' . '/tests/Mollie/TestHelpers/LinkObjectTestHelpers.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInita3126e82b6f8a8825a16880fe8b70058::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInita3126e82b6f8a8825a16880fe8b70058::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInita3126e82b6f8a8825a16880fe8b70058::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/LICENSE b/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/LICENSE new file mode 100644 index 00000000..c5b5220e --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2016 Composer + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/README.md b/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/README.md new file mode 100644 index 00000000..04442f90 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/README.md @@ -0,0 +1,85 @@ +composer/ca-bundle +================== + +Small utility library that lets you find a path to the system CA bundle, +and includes a fallback to the Mozilla CA bundle. + +Originally written as part of [composer/composer](https://github.com/composer/composer), +now extracted and made available as a stand-alone library. + + +Installation +------------ + +Install the latest version with: + +```bash +$ composer require composer/ca-bundle +``` + + +Requirements +------------ + +* PHP 5.3.2 is required but using the latest version of PHP is highly recommended. + + +Basic usage +----------- + +# `Composer\CaBundle\CaBundle` + +- `CaBundle::getSystemCaRootBundlePath()`: Returns the system CA bundle path, or a path to the bundled one as fallback +- `CaBundle::getBundledCaBundlePath()`: Returns the path to the bundled CA file +- `CaBundle::validateCaFile($filename)`: Validates a CA file using opensl_x509_parse only if it is safe to use +- `CaBundle::isOpensslParseSafe()`: Test if it is safe to use the PHP function openssl_x509_parse() +- `CaBundle::reset()`: Resets the static caches + + +## To use with curl + +```php +$curl = curl_init("https://example.org/"); + +$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath(); +if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile)))) { + curl_setopt($curl, CURLOPT_CAPATH, $caPathOrFile); +} else { + curl_setopt($curl, CURLOPT_CAINFO, $caPathOrFile); +} + +$result = curl_exec($curl); +``` + +## To use with php streams + +```php +$opts = array( + 'http' => array( + 'method' => "GET" + ) +); + +$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath(); +if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile)))) { + $opts['ssl']['capath'] = $caPathOrFile; +} else { + $opts['ssl']['cafile'] = $caPathOrFile; +} + +$context = stream_context_create($opts); +$result = file_get_contents('https://example.com', false, $context); +``` + +## To use with Guzzle + +```php +$client = new \GuzzleHttp\Client([ + \GuzzleHttp\RequestOptions::VERIFY => \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath() +]); +``` + +License +------- + +composer/ca-bundle is licensed under the MIT License, see the LICENSE file for details. diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/composer.json b/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/composer.json new file mode 100644 index 00000000..2771ecf6 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/composer.json @@ -0,0 +1,54 @@ +{ + "name": "composer\/ca-bundle", + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "type": "library", + "license": "MIT", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http:\/\/seld.be" + } + ], + "support": { + "irc": "irc:\/\/irc.freenode.org\/composer", + "issues": "https:\/\/github.com\/composer\/ca-bundle\/issues" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit\/phpunit": "^4.8.35 || ^5.7 || ^6.5", + "psr\/log": "^1.0", + "symfony\/process": "^2.5 || ^3.0 || ^4.0" + }, + "autoload": { + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\Composer\\CaBundle\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\Composer\\CaBundle\\": "tests" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "config": { + "platform": { + "php": "5.3.9" + } + } +} \ No newline at end of file diff --git a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/cacert.pem b/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/res/cacert.pem old mode 100755 new mode 100644 similarity index 72% rename from catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/cacert.pem rename to catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/res/cacert.pem index 4ff19c63..ee25bee1 --- a/catalog/controller/extension/payment/mollie-api-client/src/Mollie/API/cacert.pem +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/res/cacert.pem @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Wed Nov 2 04:12:05 2016 GMT +## Certificate data from Mozilla as of: Wed Jun 20 03:12:06 2018 GMT ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates @@ -14,7 +14,7 @@ ## Just configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.27. -## SHA256: 17e2a90c8a5cfd6a675b3475d3d467e1ab1fe0d5397e907b08206182389caa08 +## SHA256: c80f571d9f4ebca4a91e0ad3a546f263153d71afffc845c6f8f52ce9d1a2e8ec ## @@ -130,30 +130,6 @@ Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp -----END CERTIFICATE----- -AddTrust Low-Value Services Root -================================ ------BEGIN CERTIFICATE----- -MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML -QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRU -cnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMwMTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQsw -CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBO -ZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEB -AQUAA4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ulCDtbKRY6 -54eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6ntGO0/7Gcrjyvd7ZWxbWr -oulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyldI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1 -Zmne3yzxbrww2ywkEtvrNTVokMsAsJchPXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJui -GMx1I4S+6+JNM3GOGvDC+Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8w -HQYDVR0OBBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8EBTAD -AQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBlMQswCQYDVQQGEwJT -RTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEw -HwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxt -ZBsfzQ3duQH6lmM0MkhHma6X7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0Ph -iVYrqW9yTkkz43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY -eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJlpz/+0WatC7xr -mYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOAWiFeIc9TVPC6b4nbqKqVz4vj -ccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk= ------END CERTIFICATE----- - AddTrust External Root ====================== -----BEGIN CERTIFICATE----- @@ -178,54 +154,6 @@ e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= -----END CERTIFICATE----- -AddTrust Public Services Root -============================= ------BEGIN CERTIFICATE----- -MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEUMBIGA1UEChML -QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSAwHgYDVQQDExdBZGRU -cnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAxMDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJ -BgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5l -dHdvcmsxIDAeBgNVBAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV6tsfSlbu -nyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nXGCwwfQ56HmIexkvA/X1i -d9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnPdzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSG -Aa2Il+tmzV7R/9x98oTaunet3IAIx6eH1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAw -HM+A+WD+eeSI8t0A65RF62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0G -A1UdDgQWBBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB -/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDELMAkGA1UEBhMCU0Ux -FDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29yazEgMB4G -A1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4 -JNojVhaTdt02KLmuG7jD8WS6IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL -+YPoRNWyQSW/iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao -GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh4SINhwBk/ox9 -Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9H -EufOX1362KqxMy3ZdvJOOjMMK7MtkAY= ------END CERTIFICATE----- - -AddTrust Qualified Certificates Root -==================================== ------BEGIN CERTIFICATE----- -MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChML -QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSMwIQYDVQQDExpBZGRU -cnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcx -CzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQ -IE5ldHdvcmsxIzAhBgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG -9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwqxBb/4Oxx -64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G87B4pfYOQnrjfxvM0PC3 -KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i2O+tCBGaKZnhqkRFmhJePp1tUvznoD1o -L/BLcHwTOK28FSXx1s6rosAx1i+f4P8UWfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GR -wVY18BTcZTYJbqukB8c10cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HU -MIHRMB0GA1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/ -BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6FrpGkwZzELMAkGA1UE -BhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29y -azEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlmaWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQAD -ggEBABmrder4i2VhlRO6aQTvhsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxG -GuoYQ992zPlmhpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X -dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3P6CxB9bpT9ze -RXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9YiQBCYz95OdBEsIJuQRno3eDB -iFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5noxqE= ------END CERTIFICATE----- - Entrust Root Certification Authority ==================================== -----BEGIN CERTIFICATE----- @@ -252,27 +180,6 @@ W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0 tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 -----END CERTIFICATE----- -RSA Security 2048 v3 -==================== ------BEGIN CERTIFICATE----- -MIIDYTCCAkmgAwIBAgIQCgEBAQAAAnwAAAAKAAAAAjANBgkqhkiG9w0BAQUFADA6MRkwFwYDVQQK -ExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJpdHkgMjA0OCBWMzAeFw0wMTAy -MjIyMDM5MjNaFw0yNjAyMjIyMDM5MjNaMDoxGTAXBgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAb -BgNVBAsTFFJTQSBTZWN1cml0eSAyMDQ4IFYzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC -AQEAt49VcdKA3XtpeafwGFAyPGJn9gqVB93mG/Oe2dJBVGutn3y+Gc37RqtBaB4Y6lXIL5F4iSj7 -Jylg/9+PjDvJSZu1pJTOAeo+tWN7fyb9Gd3AIb2E0S1PRsNO3Ng3OTsor8udGuorryGlwSMiuLgb -WhOHV4PR8CDn6E8jQrAApX2J6elhc5SYcSa8LWrg903w8bYqODGBDSnhAMFRD0xS+ARaqn1y07iH -KrtjEAMqs6FPDVpeRrc9DvV07Jmf+T0kgYim3WBU6JU2PcYJk5qjEoAAVZkZR73QpXzDuvsf9/UP -+Ky5tfQ3mBMY3oVbtwyCO4dvlTlYMNpuAWgXIszACwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/ -MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQHw1EwpKrpRa41JPr/JCwz0LGdjDAdBgNVHQ4E -FgQUB8NRMKSq6UWuNST6/yQsM9CxnYwwDQYJKoZIhvcNAQEFBQADggEBAF8+hnZuuDU8TjYcHnmY -v/3VEhF5Ug7uMYm83X/50cYVIeiKAVQNOvtUudZj1LGqlk2iQk3UUx+LEN5/Zb5gEydxiKRz44Rj -0aRV4VCT5hsOedBnvEbIvz8XDZXmxpBp3ue0L96VfdASPz0+f00/FGj1EVDVwfSQpQgdMWD/YIwj -VAqv/qFuxdF6Kmh4zx6CCiC0H63lhbJqaHVOrSU3lIW+vaHU6rcMSzyd6BIA8F+sDeGscGNz9395 -nzIlQnQFgCi/vcEkllgVsRch6YlL2weIZ/QVrXA+L02FO8K32/6YaCOJ4XQP3vTFhGMpG8zLB8kA -pKnXwiJPZ9d37CAFYd4= ------END CERTIFICATE----- - GeoTrust Global CA ================== -----BEGIN CERTIFICATE----- @@ -294,27 +201,6 @@ XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm Mw== -----END CERTIFICATE----- -GeoTrust Global CA 2 -==================== ------BEGIN CERTIFICATE----- -MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN -R2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwHhcNMDQwMzA0MDUw -MDAwWhcNMTkwMzA0MDUwMDAwWjBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j -LjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQDvPE1APRDfO1MA4Wf+lGAVPoWI8YkNkMgoI5kF6CsgncbzYEbYwbLVjDHZ3CB5JIG/ -NTL8Y2nbsSpr7iFY8gjpeMtvy/wWUsiRxP89c96xPqfCfWbB9X5SJBri1WeR0IIQ13hLTytCOb1k -LUCgsBDTOEhGiKEMuzozKmKY+wCdE1l/bztyqu6mD4b5BWHqZ38MN5aL5mkWRxHCJ1kDs6ZgwiFA -Vvqgx306E+PsV8ez1q6diYD3Aecs9pYrEw15LNnA5IZ7S4wMcoKK+xfNAGw6EzywhIdLFnopsk/b -HdQL82Y3vdj2V7teJHq4PIu5+pIaGoSe2HSPqht/XvT+RSIhAgMBAAGjYzBhMA8GA1UdEwEB/wQF -MAMBAf8wHQYDVR0OBBYEFHE4NvICMVNHK266ZUapEBVYIAUJMB8GA1UdIwQYMBaAFHE4NvICMVNH -K266ZUapEBVYIAUJMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAQEAA/e1K6tdEPx7 -srJerJsOflN4WT5CBP51o62sgU7XAotexC3IUnbHLB/8gTKY0UvGkpMzNTEv/NgdRN3ggX+d6Yvh -ZJFiCzkIjKx0nVnZellSlxG5FntvRdOW2TF9AjYPnDtuzywNA0ZF66D0f0hExghAzN4bcLUprbqL -OzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkC -x1YAzUm5s2x7UwQa4qjJqhIFI8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqF -H4z1Ir+rzoPz4iIprn2DQKi6bA== ------END CERTIFICATE----- - GeoTrust Universal CA ===================== -----BEGIN CERTIFICATE----- @@ -397,25 +283,6 @@ YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt 398znM/jra6O1I7mT1GvFpLgXPYHDw== -----END CERTIFICATE----- -Certum Root CA -============== ------BEGIN CERTIFICATE----- -MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQK -ExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBDQTAeFw0wMjA2MTExMDQ2Mzla -Fw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8u -by4xEjAQBgNVBAMTCUNlcnR1bSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6x -wS7TT3zNJc4YPk/EjG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdL -kKWoePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GIULdtlkIJ -89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapuOb7kky/ZR6By6/qmW6/K -Uz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUgAKpoC6EahQGcxEZjgoi2IrHu/qpGWX7P -NSzVttpd90gzFFS269lvzs2I1qsb2pY7HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkq -hkiG9w0BAQUFAAOCAQEAuI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+ -GXYkHAQaTOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTgxSvg -GrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1qCjqTE5s7FCMTY5w/ -0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5xO/fIR/RpbxXyEV6DHpx8Uq79AtoS -qFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs6GAqm4VKQPNriiTsBhYscw== ------END CERTIFICATE----- - Comodo AAA Services root ======================== -----BEGIN CERTIFICATE----- @@ -440,56 +307,6 @@ Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z 12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== -----END CERTIFICATE----- -Comodo Secure Services root -=========================== ------BEGIN CERTIFICATE----- -MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS -R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg -TGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAw -MDAwMFoXDTI4MTIzMTIzNTk1OVowfjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFu -Y2hlc3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAi -BgNVBAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPMcm3ye5drswfxdySRXyWP -9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3SHpR7LZQdqnXXs5jLrLxkU0C8j6ysNstc -rbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rC -oznl2yY4rYsK7hljxxwk3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3V -p6ea5EQz6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNVHQ4E -FgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w -gYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1NlY3VyZUNlcnRpZmlj -YXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRwOi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlm -aWNhdGVTZXJ2aWNlcy5jcmwwDQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm -4J4oqF7Tt/Q05qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj -Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtIgKvcnDe4IRRL -DXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6Pw -pCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1H -RR3B7Hzs/Sk= ------END CERTIFICATE----- - -Comodo Trusted Services root -============================ ------BEGIN CERTIFICATE----- -MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS -R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg -TGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEw -MDAwMDBaFw0yODEyMzEyMzU5NTlaMH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1h -bmNoZXN0ZXIxEDAOBgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUw -IwYDVQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWWfnJSoBVC21ndZHoa0Lh7 -3TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMtTGo87IvDktJTdyR0nAducPy9C1t2ul/y -/9c3S0pgePfw+spwtOpZqqPOSC+pw7ILfhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6 -juljatEPmsbS9Is6FARW1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsS -ivnkBbA7kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0GA1Ud -DgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB -/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21vZG9jYS5jb20vVHJ1c3RlZENlcnRp -ZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRodHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENl -cnRpZmljYXRlU2VydmljZXMuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8Ntw -uleGFTQQuS9/HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32 -pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxISjBc/lDb+XbDA -BHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+xqFx7D+gIIxmOom0jtTYsU0l -R+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/AtyjcndBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O -9y5Xt5hwXsjEeLBi ------END CERTIFICATE----- - QuoVadis Root CA ================ -----BEGIN CERTIFICATE----- @@ -629,86 +446,6 @@ EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH llpwrN9M -----END CERTIFICATE----- -UTN USERFirst Hardware Root CA -============================== ------BEGIN CERTIFICATE----- -MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE -BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl -IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAd -BgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgx -OTIyWjCBlzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0 -eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVz -ZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwggEiMA0GCSqGSIb3 -DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlI -wrthdBKWHTxqctU8EGc6Oe0rE81m65UJM6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFd -tqdt++BxF2uiiPsA3/4aMXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8 -i4fDidNdoI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqIDsjf -Pe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9KsyoUhbAgMBAAGjgbkw -gbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFKFyXyYbKJhDlV0HN9WF -lp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNF -UkZpcnN0LUhhcmR3YXJlLmNybDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUF -BwMGBggrBgEFBQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM -//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28GpgoiskliCE7/yMgUsogW -XecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gECJChicsZUN/KHAG8HQQZexB2 -lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kn -iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67 -nfhmqA== ------END CERTIFICATE----- - -Camerfirma Chambers of Commerce Root -==================================== ------BEGIN CERTIFICATE----- -MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe -QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i -ZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAx -NjEzNDNaFw0zNzA5MzAxNjEzNDRaMH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZp -cm1hIFNBIENJRiBBODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3Jn -MSIwIAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0BAQEFAAOC -AQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtbunXF/KGIJPov7coISjlU -xFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0dBmpAPrMMhe5cG3nCYsS4No41XQEMIwRH -NaqbYE6gZj3LJgqcQKH0XZi/caulAGgq7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jW -DA+wWFjbw2Y3npuRVDM30pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFV -d9oKDMyXroDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIGA1Ud -EwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5jaGFtYmVyc2lnbi5v -cmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p26EpW1eLTXYGduHRooowDgYDVR0P -AQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hh -bWJlcnNpZ24ub3JnMCcGA1UdEgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYD -VR0gBFEwTzBNBgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz -aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEBAAxBl8IahsAi -fJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZdp0AJPaxJRUXcLo0waLIJuvvD -L8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wN -UPf6s+xCX6ndbcj0dc97wXImsQEcXCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/n -ADydb47kMgkdTXg0eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1 -erfutGWaIZDgqtCYvDi1czyL+Nw= ------END CERTIFICATE----- - -Camerfirma Global Chambersign Root -================================== ------BEGIN CERTIFICATE----- -MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe -QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i -ZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYx -NDE4WhcNMzcwOTMwMTYxNDE4WjB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJt -YSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEg -MB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwggEgMA0GCSqGSIb3DQEBAQUAA4IBDQAw -ggEIAoIBAQCicKLQn0KuWxfH2H3PFIP8T8mhtxOviteePgQKkotgVvq0Mi+ITaFgCPS3CU6gSS9J -1tPfnZdan5QEcOw/Wdm3zGaLmFIoCQLfxS+EjXqXd7/sQJ0lcqu1PzKY+7e3/HKE5TWH+VX6ox8O -by4o3Wmg2UIQxvi1RMLQQ3/bvOSiPGpVeAp3qdjqGTK3L/5cPxvusZjsyq16aUXjlg9V9ubtdepl -6DJWk0aJqCWKZQbua795B9Dxt6/tLE2Su8CoX6dnfQTyFQhwrJLWfQTSM/tMtgsL+xrJxI0DqX5c -8lCrEqWhz0hQpe/SyBoT+rB/sYIcd2oPX9wLlY/vQ37mRQklAgEDo4IBUDCCAUwwEgYDVR0TAQH/ -BAgwBgEB/wIBDDA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3JsLmNoYW1iZXJzaWduLm9yZy9j -aGFtYmVyc2lnbnJvb3QuY3JsMB0GA1UdDgQWBBRDnDafsJ4wTcbOX60Qq+UDpfqpFDAOBgNVHQ8B -Af8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgAHMCoGA1UdEQQjMCGBH2NoYW1iZXJzaWducm9vdEBj -aGFtYmVyc2lnbi5vcmcwKgYDVR0SBCMwIYEfY2hhbWJlcnNpZ25yb290QGNoYW1iZXJzaWduLm9y -ZzBbBgNVHSAEVDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh -bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0BAQUFAAOCAQEA -PDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUMbKGKfKX0j//U2K0X1S0E0T9Y -gOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXiryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJ -PJ7oKXqJ1/6v/2j1pReQvayZzKWGVwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4 -IBHNfTIzSJRUTN3cecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREes -t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A== ------END CERTIFICATE----- - XRamp Global CA Root ==================== -----BEGIN CERTIFICATE----- @@ -781,47 +518,6 @@ KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 QBFGmh95DmK/D5fs4C8fF5Q= -----END CERTIFICATE----- -StartCom Certification Authority -================================ ------BEGIN CERTIFICATE----- -MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN -U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu -ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0 -NjM2WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk -LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMg -U3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw -ggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZkpMyONvg45iPwbm2xPN1y -o4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rfOQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/ -Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/CJi/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/d -eMotHweXMAEtcnn6RtYTKqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt -2PZE4XNiHzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMMAv+Z -6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w+2OqqGwaVLRcJXrJ -osmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/ -untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVc -UjyJthkqcwEKDwOzEmDyei+B26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT -37uMdBNSSwIDAQABo4ICUjCCAk4wDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAa4wHQYDVR0OBBYE -FE4L7xqkQFulF2mHMMo0aEPQQa7yMGQGA1UdHwRdMFswLKAqoCiGJmh0dHA6Ly9jZXJ0LnN0YXJ0 -Y29tLm9yZy9zZnNjYS1jcmwuY3JsMCugKaAnhiVodHRwOi8vY3JsLnN0YXJ0Y29tLm9yZy9zZnNj -YS1jcmwuY3JsMIIBXQYDVR0gBIIBVDCCAVAwggFMBgsrBgEEAYG1NwEBATCCATswLwYIKwYBBQUH -AgEWI2h0dHA6Ly9jZXJ0LnN0YXJ0Y29tLm9yZy9wb2xpY3kucGRmMDUGCCsGAQUFBwIBFilodHRw -Oi8vY2VydC5zdGFydGNvbS5vcmcvaW50ZXJtZWRpYXRlLnBkZjCB0AYIKwYBBQUHAgIwgcMwJxYg -U3RhcnQgQ29tbWVyY2lhbCAoU3RhcnRDb20pIEx0ZC4wAwIBARqBl0xpbWl0ZWQgTGlhYmlsaXR5 -LCByZWFkIHRoZSBzZWN0aW9uICpMZWdhbCBMaW1pdGF0aW9ucyogb2YgdGhlIFN0YXJ0Q29tIENl -cnRpZmljYXRpb24gQXV0aG9yaXR5IFBvbGljeSBhdmFpbGFibGUgYXQgaHR0cDovL2NlcnQuc3Rh -cnRjb20ub3JnL3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilT -dGFydENvbSBGcmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOC -AgEAFmyZ9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8jhvh -3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUWFjgKXlf2Ysd6AgXm -vB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJzewT4F+irsfMuXGRuczE6Eri8sxHk -fY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3 -fsNrarnDy0RLrHiQi+fHLB5LEUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZ -EoalHmdkrQYuL6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq -yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuCO3NJo2pXh5Tl -1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6Vum0ABj6y6koQOdjQK/W/7HW/ -lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkyShNOsF/5oirpt9P/FlUQqmMGqz9IgcgA38coro -g14= ------END CERTIFICATE----- - Taiwan GRCA =========== -----BEGIN CERTIFICATE----- @@ -852,38 +548,6 @@ CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy +fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS -----END CERTIFICATE----- -Swisscom Root CA 1 -================== ------BEGIN CERTIFICATE----- -MIIF2TCCA8GgAwIBAgIQXAuFXAvnWUHfV8w/f52oNjANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQG -EwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2VydGlmaWNhdGUgU2Vy -dmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3QgQ0EgMTAeFw0wNTA4MTgxMjA2MjBaFw0yNTA4 -MTgyMjA2MjBaMGQxCzAJBgNVBAYTAmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGln -aXRhbCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAxMIIC -IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0LmwqAzZuz8h+BvVM5OAFmUgdbI9m2BtRsiM -MW8Xw/qabFbtPMWRV8PNq5ZJkCoZSx6jbVfd8StiKHVFXqrWW/oLJdihFvkcxC7mlSpnzNApbjyF -NDhhSbEAn9Y6cV9Nbc5fuankiX9qUvrKm/LcqfmdmUc/TilftKaNXXsLmREDA/7n29uj/x2lzZAe -AR81sH8A25Bvxn570e56eqeqDFdvpG3FEzuwpdntMhy0XmeLVNxzh+XTF3xmUHJd1BpYwdnP2IkC -b6dJtDZd0KTeByy2dbcokdaXvij1mB7qWybJvbCXc9qukSbraMH5ORXWZ0sKbU/Lz7DkQnGMU3nn -7uHbHaBuHYwadzVcFh4rUx80i9Fs/PJnB3r1re3WmquhsUvhzDdf/X/NTa64H5xD+SpYVUNFvJbN -cA78yeNmuk6NO4HLFWR7uZToXTNShXEuT46iBhFRyePLoW4xCGQMwtI89Tbo19AOeCMgkckkKmUp -WyL3Ic6DXqTz3kvTaI9GdVyDCW4pa8RwjPWd1yAv/0bSKzjCL3UcPX7ape8eYIVpQtPM+GP+HkM5 -haa2Y0EQs3MevNP6yn0WR+Kn1dCjigoIlmJWbjTb2QK5MHXjBNLnj8KwEUAKrNVxAmKLMb7dxiNY -MUJDLXT5xp6mig/p/r+D5kNXJLrvRjSq1xIBOO0CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYw -HQYDVR0hBBYwFDASBgdghXQBUwABBgdghXQBUwABMBIGA1UdEwEB/wQIMAYBAf8CAQcwHwYDVR0j -BBgwFoAUAyUv3m+CATpcLNwroWm1Z9SM0/0wHQYDVR0OBBYEFAMlL95vggE6XCzcK6FptWfUjNP9 -MA0GCSqGSIb3DQEBBQUAA4ICAQA1EMvspgQNDQ/NwNurqPKIlwzfky9NfEBWMXrrpA9gzXrzvsMn -jgM+pN0S734edAY8PzHyHHuRMSG08NBsl9Tpl7IkVh5WwzW9iAUPWxAaZOHHgjD5Mq2eUCzneAXQ -MbFamIp1TpBcahQq4FJHgmDmHtqBsfsUC1rxn9KVuj7QG9YVHaO+htXbD8BJZLsuUBlL0iT43R4H -VtA4oJVwIHaM190e3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtl -vrsRls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ipmXeascCl -OS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HHb6D0jqTsNFFbjCYDcKF3 -1QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksfrK/7DZBaZmBwXarNeNQk7shBoJMBkpxq -nvy5JMWzFYJ+vq6VK+uxwNrjAWALXmmshFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCy -x/yP2FS1k2Kdzs9Z+z0YzirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMW -NY6E0F/6MBr1mmz0DlP5OlvRHA== ------END CERTIFICATE----- - DigiCert Assured ID Root CA =========================== -----BEGIN CERTIFICATE----- @@ -992,30 +656,6 @@ RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ -----END CERTIFICATE----- -DST ACES CA X6 -============== ------BEGIN CERTIFICATE----- -MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBbMQswCQYDVQQG -EwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QxETAPBgNVBAsTCERTVCBBQ0VT -MRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0wMzExMjAyMTE5NThaFw0xNzExMjAyMTE5NTha -MFsxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UE -CxMIRFNUIEFDRVMxFzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPuktKe1jzI -DZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7gLFViYsx+tC3dr5BPTCa -pCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZHfAjIgrrep4c9oW24MFbCswKBXy314pow -GCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4aahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPy -MjwmR/onJALJfh1biEITajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1Ud -EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rkc3Qu -Y29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjtodHRwOi8vd3d3LnRy -dXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMtaW5kZXguaHRtbDAdBgNVHQ4EFgQU -CXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZIhvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V2 -5FYrnJmQ6AgwbN99Pe7lv7UkQIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6t -Fr8hlxCBPeP/h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq -nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs -vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3 -oKfN5XozNmr6mis= ------END CERTIFICATE----- - SwissSign Gold CA - G2 ====================== -----BEGIN CERTIFICATE----- @@ -1241,33 +881,6 @@ wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey -----END CERTIFICATE----- -WellsSecure Public Root Certificate Authority -============================================= ------BEGIN CERTIFICATE----- -MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoM -F1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYw -NAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN -MDcxMjEzMTcwNzU0WhcNMjIxMjE0MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dl -bGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYD -VQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDub7S9eeKPCCGeOARBJe+rWxxTkqxtnt3CxC5FlAM1 -iGd0V+PfjLindo8796jE2yljDpFoNoqXjopxaAkH5OjUDk/41itMpBb570OYj7OeUt9tkTmPOL13 -i0Nj67eT/DBMHAGTthP796EfvyXhdDcsHqRePGj4S78NuR4uNuip5Kf4D8uCdXw1LSLWwr8L87T8 -bJVhHlfXBIEyg1J55oNjz7fLY4sR4r1e6/aN7ZVyKLSsEmLpSjPmgzKuBXWVvYSV2ypcm44uDLiB -K0HmOFafSZtsdvqKXfcBeYF8wYNABf5x/Qw/zE5gCQ5lRxAvAcAFP4/4s0HvWkJ+We/SlwxlAgMB -AAGjggE0MIIBMDAPBgNVHRMBAf8EBTADAQH/MDkGA1UdHwQyMDAwLqAsoCqGKGh0dHA6Ly9jcmwu -cGtpLndlbGxzZmFyZ28uY29tL3dzcHJjYS5jcmwwDgYDVR0PAQH/BAQDAgHGMB0GA1UdDgQWBBQm -lRkQ2eihl5H/3BnZtQQ+0nMKajCBsgYDVR0jBIGqMIGngBQmlRkQ2eihl5H/3BnZtQQ+0nMKaqGB -i6SBiDCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRww -GgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMg -Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEBALkVsUSRzCPI -K0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd/ZDJPHV3V3p9+N701NX3leZ0 -bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pBA4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSlj -qHyita04pO2t/caaH/+Xc/77szWnk4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+es -E2fDbbFwRnzVlhE9iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJ -tylv2G0xffX8oRAHh84vWdw+WNs= ------END CERTIFICATE----- - COMODO ECC Certification Authority ================================== -----BEGIN CERTIFICATE----- @@ -1285,51 +898,6 @@ FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= -----END CERTIFICATE----- -IGC/A -===== ------BEGIN CERTIFICATE----- -MIIEAjCCAuqgAwIBAgIFORFFEJQwDQYJKoZIhvcNAQEFBQAwgYUxCzAJBgNVBAYTAkZSMQ8wDQYD -VQQIEwZGcmFuY2UxDjAMBgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQTS9TR0ROMQ4wDAYDVQQLEwVE -Q1NTSTEOMAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2LmZy -MB4XDTAyMTIxMzE0MjkyM1oXDTIwMTAxNzE0MjkyMlowgYUxCzAJBgNVBAYTAkZSMQ8wDQYDVQQI -EwZGcmFuY2UxDjAMBgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQTS9TR0ROMQ4wDAYDVQQLEwVEQ1NT -STEOMAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2LmZyMIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsh/R0GLFMzvABIaIs9z4iPf930Pfeo2aSVz2 -TqrMHLmh6yeJ8kbpO0px1R2OLc/mratjUMdUC24SyZA2xtgv2pGqaMVy/hcKshd+ebUyiHDKcMCW -So7kVc0dJ5S/znIq7Fz5cyD+vfcuiWe4u0dzEvfRNWk68gq5rv9GQkaiv6GFGvm/5P9JhfejcIYy -HF2fYPepraX/z9E0+X1bF8bc1g4oa8Ld8fUzaJ1O/Id8NhLWo4DoQw1VYZTqZDdH6nfK0LJYBcNd -frGoRpAxVs5wKpayMLh35nnAvSk7/ZR3TL0gzUEl4C7HG7vupARB0l2tEmqKm0f7yd1GQOGdPDPQ -tQIDAQABo3cwdTAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBRjAVBgNVHSAEDjAMMAoGCCqB -egF5AQEBMB0GA1UdDgQWBBSjBS8YYFDCiQrdKyFP/45OqDAxNjAfBgNVHSMEGDAWgBSjBS8YYFDC -iQrdKyFP/45OqDAxNjANBgkqhkiG9w0BAQUFAAOCAQEABdwm2Pp3FURo/C9mOnTgXeQp/wYHE4RK -q89toB9RlPhJy3Q2FLwV3duJL92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3Q -MZsyK10XZZOYYLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg -Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2aNjSaTFR+FwNI -lQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R0982gaEbeC9xs/FZTEYYKKuF -0mBWWg== ------END CERTIFICATE----- - -Security Communication EV RootCA1 -================================= ------BEGIN CERTIFICATE----- -MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc -U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMhU2VjdXJpdHkgQ29tbXVuaWNh -dGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIzMloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UE -BhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNl -Y3VyaXR5IENvbW11bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSERMqm4miO -/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gOzXppFodEtZDkBp2uoQSX -WHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4z -ZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDFMxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4 -bepJz11sS6/vmsJWXMY1VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK -9U2vP9eCOKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqG -SIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HWtWS3irO4G8za+6xm -iEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZq51ihPZRwSzJIxXYKLerJRO1RuGG -Av8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDbEJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnW -mHyojf6GPgcWkuF75x3sM3Z+Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEW -T1MKZPlO9L9OVL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490 ------END CERTIFICATE----- - OISTE WISeKey Global Root GA CA =============================== -----BEGIN CERTIFICATE----- @@ -1353,46 +921,6 @@ hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= -----END CERTIFICATE----- -Microsec e-Szigno Root CA -========================= ------BEGIN CERTIFICATE----- -MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAwcjELMAkGA1UE -BhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNyb3NlYyBMdGQuMRQwEgYDVQQL -EwtlLVN6aWdubyBDQTEiMCAGA1UEAxMZTWljcm9zZWMgZS1Temlnbm8gUm9vdCBDQTAeFw0wNTA0 -MDYxMjI4NDRaFw0xNzA0MDYxMjI4NDRaMHIxCzAJBgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVz -dDEWMBQGA1UEChMNTWljcm9zZWMgTHRkLjEUMBIGA1UECxMLZS1Temlnbm8gQ0ExIjAgBgNVBAMT -GU1pY3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB -AQDtyADVgXvNOABHzNuEwSFpLHSQDCHZU4ftPkNEU6+r+ICbPHiN1I2uuO/TEdyB5s87lozWbxXG -d36hL+BfkrYn13aaHUM86tnsL+4582pnS4uCzyL4ZVX+LMsvfUh6PXX5qqAnu3jCBspRwn5mS6/N -oqdNAoI/gqyFxuEPkEeZlApxcpMqyabAvjxWTHOSJ/FrtfX9/DAFYJLG65Z+AZHCabEeHXtTRbjc -QR/Ji3HWVBTji1R4P770Yjtb9aPs1ZJ04nQw7wHb4dSrmZsqa/i9phyGI0Jf7Enemotb9HI6QMVJ -PqW+jqpx62z69Rrkav17fVVA71hu5tnVvCSrwe+3AgMBAAGjggQ3MIIEMzBnBggrBgEFBQcBAQRb -MFkwKAYIKwYBBQUHMAGGHGh0dHBzOi8vcmNhLmUtc3ppZ25vLmh1L29jc3AwLQYIKwYBBQUHMAKG -IWh0dHA6Ly93d3cuZS1zemlnbm8uaHUvUm9vdENBLmNydDAPBgNVHRMBAf8EBTADAQH/MIIBcwYD -VR0gBIIBajCCAWYwggFiBgwrBgEEAYGoGAIBAQEwggFQMCgGCCsGAQUFBwIBFhxodHRwOi8vd3d3 -LmUtc3ppZ25vLmh1L1NaU1ovMIIBIgYIKwYBBQUHAgIwggEUHoIBEABBACAAdABhAG4A+gBzAO0A -dAB2AOEAbgB5ACAA6QByAHQAZQBsAG0AZQB6AOkAcwDpAGgAZQB6ACAA6QBzACAAZQBsAGYAbwBn -AGEAZADhAHMA4QBoAG8AegAgAGEAIABTAHoAbwBsAGcA4QBsAHQAYQB0APMAIABTAHoAbwBsAGcA -4QBsAHQAYQB0AOEAcwBpACAAUwB6AGEAYgDhAGwAeQB6AGEAdABhACAAcwB6AGUAcgBpAG4AdAAg -AGsAZQBsAGwAIABlAGwAagDhAHIAbgBpADoAIABoAHQAdABwADoALwAvAHcAdwB3AC4AZQAtAHMA -egBpAGcAbgBvAC4AaAB1AC8AUwBaAFMAWgAvMIHIBgNVHR8EgcAwgb0wgbqggbeggbSGIWh0dHA6 -Ly93d3cuZS1zemlnbm8uaHUvUm9vdENBLmNybIaBjmxkYXA6Ly9sZGFwLmUtc3ppZ25vLmh1L0NO -PU1pY3Jvc2VjJTIwZS1Temlnbm8lMjBSb290JTIwQ0EsT1U9ZS1Temlnbm8lMjBDQSxPPU1pY3Jv -c2VjJTIwTHRkLixMPUJ1ZGFwZXN0LEM9SFU/Y2VydGlmaWNhdGVSZXZvY2F0aW9uTGlzdDtiaW5h -cnkwDgYDVR0PAQH/BAQDAgEGMIGWBgNVHREEgY4wgYuBEGluZm9AZS1zemlnbm8uaHWkdzB1MSMw -IQYDVQQDDBpNaWNyb3NlYyBlLVN6aWduw7MgUm9vdCBDQTEWMBQGA1UECwwNZS1TemlnbsOzIEhT -WjEWMBQGA1UEChMNTWljcm9zZWMgS2Z0LjERMA8GA1UEBxMIQnVkYXBlc3QxCzAJBgNVBAYTAkhV -MIGsBgNVHSMEgaQwgaGAFMegSXUWYYTbMUuE0vE3QJDvTtz3oXakdDByMQswCQYDVQQGEwJIVTER -MA8GA1UEBxMIQnVkYXBlc3QxFjAUBgNVBAoTDU1pY3Jvc2VjIEx0ZC4xFDASBgNVBAsTC2UtU3pp -Z25vIENBMSIwIAYDVQQDExlNaWNyb3NlYyBlLVN6aWdubyBSb290IENBghEAzLjnv04pGv2i3Gal -HCwPETAdBgNVHQ4EFgQUx6BJdRZhhNsxS4TS8TdAkO9O3PcwDQYJKoZIhvcNAQEFBQADggEBANMT -nGZjWS7KXHAM/IO8VbH0jgdsZifOwTsgqRy7RlRw7lrMoHfqaEQn6/Ip3Xep1fvj1KcExJW4C+FE -aGAHQzAxQmHl7tnlJNUb3+FKG6qfx1/4ehHqE5MAyopYse7tDk2016g2JnzgOsHVV4Lxdbb9iV/a -86g4nzUGCM4ilb7N1fy+W955a9x6qWVmvrElWl/tftOsRm1M9DKHtCAE4Gx4sHfRhUZLphK3dehK -yVZs15KrnfVJONJPU+NVkBHbmJbGSfI+9J8b4PeI3CVimUTYc78/MPMMNz7UwiiAc7EBt51alhQB -S6kRnSlqLtBdgcDPsiBDxwPgN05dCtxZICU= ------END CERTIFICATE----- - Certigna ======== -----BEGIN CERTIFICATE----- @@ -1490,86 +1018,6 @@ sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= -----END CERTIFICATE----- -T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3 -============================================================================================================================= ------BEGIN CERTIFICATE----- -MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRSMRgwFgYDVQQH -DA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJpbGltc2VsIHZlIFRla25vbG9q -aWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSwVEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ry -b25payB2ZSBLcmlwdG9sb2ppIEFyYcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNV -BAsMGkthbXUgU2VydGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUg -S8O2ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAeFw0wNzA4 -MjQxMTM3MDdaFw0xNzA4MjExMTM3MDdaMIIBKzELMAkGA1UEBhMCVFIxGDAWBgNVBAcMD0dlYnpl -IC0gS29jYWVsaTFHMEUGA1UECgw+VMO8cmtpeWUgQmlsaW1zZWwgdmUgVGVrbm9sb2ppayBBcmHF -n3TEsXJtYSBLdXJ1bXUgLSBUw5xCxLBUQUsxSDBGBgNVBAsMP1VsdXNhbCBFbGVrdHJvbmlrIHZl -IEtyaXB0b2xvamkgQXJhxZ90xLFybWEgRW5zdGl0w7xzw7wgLSBVRUtBRTEjMCEGA1UECwwaS2Ft -dSBTZXJ0aWZpa2FzeW9uIE1lcmtlemkxSjBIBgNVBAMMQVTDnELEsFRBSyBVRUtBRSBLw7ZrIFNl -cnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIC0gU8O8csO8bSAzMIIBIjANBgkqhkiG9w0B -AQEFAAOCAQ8AMIIBCgKCAQEAim1L/xCIOsP2fpTo6iBkcK4hgb46ezzb8R1Sf1n68yJMlaCQvEhO -Eav7t7WNeoMojCZG2E6VQIdhn8WebYGHV2yKO7Rm6sxA/OOqbLLLAdsyv9Lrhc+hDVXDWzhXcLh1 -xnnRFDDtG1hba+818qEhTsXOfJlfbLm4IpNQp81McGq+agV/E5wrHur+R84EpW+sky58K5+eeROR -6Oqeyjh1jmKwlZMq5d/pXpduIF9fhHpEORlAHLpVK/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL -hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQIDAQABo0IwQDAd -BgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF -MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmPNOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4 -N5EY3ATIZJkrGG2AA1nJrvhY0D7twyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLT -y9LQQfMmNkqblWwM7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYh -LBOhgLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5noN+J1q2M -dqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUsyZyQ2uypQjyttgI= ------END CERTIFICATE----- - -Buypass Class 2 CA 1 -==================== ------BEGIN CERTIFICATE----- -MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU -QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMiBDQSAxMB4XDTA2 -MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBh -c3MgQVMtOTgzMTYzMzI3MR0wGwYDVQQDDBRCdXlwYXNzIENsYXNzIDIgQ0EgMTCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAIs8B0XY9t/mx8q6jUPFR42wWsE425KEHK8T1A9vNkYgxC7M -cXA0ojTTNy7Y3Tp3L8DrKehc0rWpkTSHIln+zNvnma+WwajHQN2lFYxuyHyXA8vmIPLXl18xoS83 -0r7uvqmtqEyeIWZDO6i88wmjONVZJMHCR3axiFyCO7srpgTXjAePzdVBHfCuuCkslFJgNJQ72uA4 -0Z0zPhX0kzLFANq1KWYOOngPIVJfAuWSeyXTkh4vFZ2B5J2O6O+JzhRMVB0cgRJNcKi+EAUXfh/R -uFdV7c27UsKwHnjCTTZoy1YmwVLBvXb3WNVyfh9EdrsAiR0WnVE1703CVu9r4Iw7DekCAwEAAaNC -MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUP42aWYv8e3uco684sDntkHGA1sgwDgYDVR0P -AQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAVGn4TirnoB6NLJzKyQJHyIdFkhb5jatLPgcIV -1Xp+DCmsNx4cfHZSldq1fyOhKXdlyTKdqC5Wq2B2zha0jX94wNWZUYN/Xtm+DKhQ7SLHrQVMdvvt -7h5HZPb3J31cKA9FxVxiXqaakZG3Uxcu3K1gnZZkOb1naLKuBctN518fV4bVIJwo+28TOPX2EZL2 -fZleHwzoq0QkKXJAPTZSr4xYkHPB7GEseaHsh7U/2k3ZIQAw3pDaDtMaSKk+hQsUi4y8QZ5q9w5w -wDX3OaJdZtB7WZ+oRxKaJyOkLY4ng5IgodcVf/EuGO70SH8vf/GhGLWhC5SgYiAynB321O+/TIho ------END CERTIFICATE----- - -EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 -========================================================================== ------BEGIN CERTIFICATE----- -MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNVBAMML0VCRyBF -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMTcwNQYDVQQKDC5FQkcg -QmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXptZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAe -Fw0wNjA4MTcwMDIxMDlaFw0xNjA4MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25p -ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2lt -IFRla25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIiMA0GCSqG -SIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h4fuXd7hxlugTlkaDT7by -X3JWbhNgpQGR4lvFzVcfd2NR/y8927k/qqk153nQ9dAktiHq6yOU/im/+4mRDGSaBUorzAzu8T2b -gmmkTPiab+ci2hC6X5L8GCcKqKpE+i4stPtGmggDg3KriORqcsnlZR9uKg+ds+g75AxuetpX/dfr -eYteIAbTdgtsApWjluTLdlHRKJ2hGvxEok3MenaoDT2/F08iiFD9rrbskFBKW5+VQarKD7JK/oCZ -TqNGFav4c0JqwmZ2sQomFd2TkuzbqV9UIlKRcF0T6kjsbgNs2d1s/OsNA/+mgxKb8amTD8UmTDGy -Y5lhcucqZJnSuOl14nypqZoaqsNW2xCaPINStnuWt6yHd6i58mcLlEOzrz5z+kI2sSXFCjEmN1Zn -uqMLfdb3ic1nobc6HmZP9qBVFCVMLDMNpkGMvQQxahByCp0OLna9XvNRiYuoP1Vzv9s6xiQFlpJI -qkuNKgPlV5EQ9GooFW5Hd4RcUXSfGenmHmMWOeMRFeNYGkS9y8RsZteEBt8w9DeiQyJ50hBs37vm -ExH8nYQKE3vwO9D8owrXieqWfo1IhR5kX9tUoqzVegJ5a9KK8GfaZXINFHDk6Y54jzJ0fFfy1tb0 -Nokb+Clsi7n2l9GkLqq+CxnCRelwXQIDAJ3Zo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB -/wQEAwIBBjAdBgNVHQ4EFgQU587GT/wWZ5b6SqMHwQSny2re2kcwHwYDVR0jBBgwFoAU587GT/wW -Z5b6SqMHwQSny2re2kcwDQYJKoZIhvcNAQEFBQADggIBAJuYml2+8ygjdsZs93/mQJ7ANtyVDR2t -FcU22NU57/IeIl6zgrRdu0waypIN30ckHrMk2pGI6YNw3ZPX6bqz3xZaPt7gyPvT/Wwp+BVGoGgm -zJNSroIBk5DKd8pNSe/iWtkqvTDOTLKBtjDOWU/aWR1qeqRFsIImgYZ29fUQALjuswnoT4cCB64k -XPBfrAowzIpAoHMEwfuJJPaaHFy3PApnNgUIMbOv2AFoKuB4j3TeuFGkjGwgPaL7s9QJ/XvCgKqT -bCmYIai7FvOpEl90tYeY8pUm3zTvilORiF0alKM/fCL414i6poyWqD1SNGKfAB5UVUJnxk1Gj7sU -RT0KlhaOEKGXmdXTMIXM3rRyt7yKPBgpaP3ccQfuJDlq+u2lrDgv+R4QDgZxGhBM/nV+/x5XOULK -1+EVoVZVWRvRo68R2E7DpSvvkL/A7IITW43WciyTTo9qKd+FPNMN4KIYEsxVL0e3p5sC/kH2iExt -2qkBR4NkJ2IQgtYSe14DHzSpyZH+r11thie3I6p1GMog57AP14kOpmciY/SDQSsGS7tY1dHXt7kQ -Y9iJSrSq3RZj9W6+YKH47ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK+lvm9 -AahH3eU7QPl1K5srRmSGjR70j/sHd9DqSaIcjVIUpgqT ------END CERTIFICATE----- - certSIGN ROOT CA ================ -----BEGIN CERTIFICATE----- @@ -1590,49 +1038,6 @@ vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD -----END CERTIFICATE----- -CNNIC ROOT -========== ------BEGIN CERTIFICATE----- -MIIDVTCCAj2gAwIBAgIESTMAATANBgkqhkiG9w0BAQUFADAyMQswCQYDVQQGEwJDTjEOMAwGA1UE -ChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwHhcNMDcwNDE2MDcwOTE0WhcNMjcwNDE2MDcw -OTE0WjAyMQswCQYDVQQGEwJDTjEOMAwGA1UEChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1Qw -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTNfc/c3et6FtzF8LRb+1VvG7q6KR5smzD -o+/hn7E7SIX1mlwhIhAsxYLO2uOabjfhhyzcuQxauohV3/2q2x8x6gHx3zkBwRP9SFIhxFXf2tiz -VHa6dLG3fdfA6PZZxU3Iva0fFNrfWEQlMhkqx35+jq44sDB7R3IJMfAw28Mbdim7aXZOV/kbZKKT -VrdvmW7bCgScEeOAH8tjlBAKqeFkgjH5jCftppkA9nCTGPihNIaj3XrCGHn2emU1z5DrvTOTn1Or -czvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gNv7Sg2Ca+I19zN38m5pIEo3/PIKe38zrK -y5nLAgMBAAGjczBxMBEGCWCGSAGG+EIBAQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscC -wQ7vptU7ETAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991S -lgrHAsEO76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnKOOK5 -Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvHugDnuL8BV8F3RTIM -O/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7HgviyJA/qIYM/PmLXoXLT1tLYhFHxUV8 -BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fLbuXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2 -G8kS1sHNzYDzAgE8yGnLRUhj2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5m -mxE= ------END CERTIFICATE----- - -ApplicationCA - Japanese Government -=================================== ------BEGIN CERTIFICATE----- -MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEcMBoGA1UEChMT -SmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRpb25DQTAeFw0wNzEyMTIxNTAw -MDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYTAkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zl -cm5tZW50MRYwFAYDVQQLEw1BcHBsaWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAp23gdE6Hj6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4 -fl+Kf5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55IrmTwcrN -wVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cwFO5cjFW6WY2H/CPek9AE -jP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDihtQWEjdnjDuGWk81quzMKq2edY3rZ+nYVu -nyoKb58DKTCXKB28t89UKU5RMfkntigm/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRU -WssmP3HMlEYNllPqa0jQk/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNV -BAYTAkpQMRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOCseOD -vOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADlqRHZ3ODrs -o2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJhyzjVOGjprIIC8CFqMjSnHH2HZ9g -/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYD -io+nEhEMy/0/ecGc/WLuo89UDNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmW -dupwX3kSa+SjB1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL -rosot4LKGAfmt1t06SAZf7IbiVQ= ------END CERTIFICATE----- - GeoTrust Primary Certification Authority - G3 ============================================= -----BEGIN CERTIFICATE----- @@ -1763,7 +1168,7 @@ A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== -----END CERTIFICATE----- -NetLock Arany (Class Gold) FÅ‘tanúsítvány +NetLock Arany (Class Gold) Főtanúsítvány ======================================== -----BEGIN CERTIFICATE----- MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G @@ -1819,34 +1224,6 @@ IPVVYpbtbZNQvOSqeK3Zywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm 66+KAQ== -----END CERTIFICATE----- -Juur-SK -======= ------BEGIN CERTIFICATE----- -MIIE5jCCA86gAwIBAgIEO45L/DANBgkqhkiG9w0BAQUFADBdMRgwFgYJKoZIhvcNAQkBFglwa2lA -c2suZWUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKExlBUyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMRAw -DgYDVQQDEwdKdXVyLVNLMB4XDTAxMDgzMDE0MjMwMVoXDTE2MDgyNjE0MjMwMVowXTEYMBYGCSqG -SIb3DQEJARYJcGtpQHNrLmVlMQswCQYDVQQGEwJFRTEiMCAGA1UEChMZQVMgU2VydGlmaXRzZWVy -aW1pc2tlc2t1czEQMA4GA1UEAxMHSnV1ci1TSzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAIFxNj4zB9bjMI0TfncyRsvPGbJgMUaXhvSYRqTCZUXP00B841oiqBB4M8yIsdOBSvZiF3tf -TQou0M+LI+5PAk676w7KvRhj6IAcjeEcjT3g/1tf6mTll+g/mX8MCgkzABpTpyHhOEvWgxutr2TC -+Rx6jGZITWYfGAriPrsfB2WThbkasLnE+w0R9vXW+RvHLCu3GFH+4Hv2qEivbDtPL+/40UceJlfw -UR0zlv/vWT3aTdEVNMfqPxZIe5EcgEMPPbgFPtGzlc3Yyg/CQ2fbt5PgIoIuvvVoKIO5wTtpeyDa -Tpxt4brNj3pssAki14sL2xzVWiZbDcDq5WDQn/413z8CAwEAAaOCAawwggGoMA8GA1UdEwEB/wQF -MAMBAf8wggEWBgNVHSAEggENMIIBCTCCAQUGCisGAQQBzh8BAQEwgfYwgdAGCCsGAQUFBwICMIHD -HoHAAFMAZQBlACAAcwBlAHIAdABpAGYAaQBrAGEAYQB0ACAAbwBuACAAdgDkAGwAagBhAHMAdABh -AHQAdQBkACAAQQBTAC0AaQBzACAAUwBlAHIAdABpAGYAaQB0AHMAZQBlAHIAaQBtAGkAcwBrAGUA -cwBrAHUAcwAgAGEAbABhAG0ALQBTAEsAIABzAGUAcgB0AGkAZgBpAGsAYQBhAHQAaQBkAGUAIABr -AGkAbgBuAGkAdABhAG0AaQBzAGUAawBzMCEGCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nw -cy8wKwYDVR0fBCQwIjAgoB6gHIYaaHR0cDovL3d3dy5zay5lZS9qdXVyL2NybC8wHQYDVR0OBBYE -FASqekej5ImvGs8KQKcYP2/v6X2+MB8GA1UdIwQYMBaAFASqekej5ImvGs8KQKcYP2/v6X2+MA4G -A1UdDwEB/wQEAwIB5jANBgkqhkiG9w0BAQUFAAOCAQEAe8EYlFOiCfP+JmeaUOTDBS8rNXiRTHyo -ERF5TElZrMj3hWVcRrs7EKACr81Ptcw2Kuxd/u+gkcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyL -abVAyJRld/JXIWY7zoVAtjNjGr95HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6/2SSmuz+Ne6ML678 -IIbsSt4beDI3poHSna9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkh -Mp6qqIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0ZTbvGRNs2 -yyqcjg== ------END CERTIFICATE----- - Hongkong Post Root CA 1 ======================= -----BEGIN CERTIFICATE----- @@ -1888,37 +1265,6 @@ y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061 lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I= -----END CERTIFICATE----- -ACEDICOM Root -============= ------BEGIN CERTIFICATE----- -MIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UEAwwNQUNFRElD -T00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00xCzAJBgNVBAYTAkVTMB4XDTA4 -MDQxODE2MjQyMloXDTI4MDQxMzE2MjQyMlowRDEWMBQGA1UEAwwNQUNFRElDT00gUm9vdDEMMAoG -A1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00xCzAJBgNVBAYTAkVTMIICIjANBgkqhkiG9w0BAQEF -AAOCAg8AMIICCgKCAgEA/5KV4WgGdrQsyFhIyv2AVClVYyT/kGWbEHV7w2rbYgIB8hiGtXxaOLHk -WLn709gtn70yN78sFW2+tfQh0hOR2QetAQXW8713zl9CgQr5auODAKgrLlUTY4HKRxx7XBZXehuD -YAQ6PmXDzQHe3qTWDLqO3tkE7hdWIpuPY/1NFgu3e3eM+SW10W2ZEi5PGrjm6gSSrj0RuVFCPYew -MYWveVqc/udOXpJPQ/yrOq2lEiZmueIM15jO1FillUAKt0SdE3QrwqXrIhWYENiLxQSfHY9g5QYb -m8+5eaA9oiM/Qj9r+hwDezCNzmzAv+YbX79nuIQZ1RXve8uQNjFiybwCq0Zfm/4aaJQ0PZCOrfbk -HQl/Sog4P75n/TSW9R28MHTLOO7VbKvU/PQAtwBbhTIWdjPp2KOZnQUAqhbm84F9b32qhm2tFXTT -xKJxqvQUfecyuB+81fFOvW8XAjnXDpVCOscAPukmYxHqC9FK/xidstd7LzrZlvvoHpKuE1XI2Sf2 -3EgbsCTBheN3nZqk8wwRHQ3ItBTutYJXCb8gWH8vIiPYcMt5bMlL8qkqyPyHK9caUPgn6C9D4zq9 -2Fdx/c6mUlv53U3t5fZvie27k5x2IXXwkkwp9y+cAS7+UEaeZAwUswdbxcJzbPEHXEUkFDWug/Fq -TYl6+rPYLWbwNof1K1MCAwEAAaOBqjCBpzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKaz -4SsrSbbXc6GqlPUB53NlTKxQMA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUprPhKytJttdzoaqU -9QHnc2VMrFAwRAYDVR0gBD0wOzA5BgRVHSAAMDEwLwYIKwYBBQUHAgEWI2h0dHA6Ly9hY2VkaWNv -bS5lZGljb21ncm91cC5jb20vZG9jMA0GCSqGSIb3DQEBBQUAA4ICAQDOLAtSUWImfQwng4/F9tqg -aHtPkl7qpHMyEVNEskTLnewPeUKzEKbHDZ3Ltvo/Onzqv4hTGzz3gvoFNTPhNahXwOf9jU8/kzJP -eGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKeI6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1Pwk -zQSulgUV1qzOMPPKC8W64iLgpq0i5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1 -ThCojz2GuHURwCRiipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oI -KiMnMCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZo5NjEFIq -nxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6zqylfDJKZ0DcMDQj3dcE -I2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacNGHk0vFQYXlPKNFHtRQrmjseCNj6nOGOp -MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o -tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA== ------END CERTIFICATE----- - Microsec e-Szigno Root CA 2009 ============================== -----BEGIN CERTIFICATE----- @@ -2279,72 +1625,6 @@ Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI 03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= -----END CERTIFICATE----- -Certinomis - Autorité Racine -============================ ------BEGIN CERTIFICATE----- -MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjETMBEGA1UEChMK -Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAkBgNVBAMMHUNlcnRpbm9taXMg -LSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkG -A1UEBhMCRlIxEzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYw -JAYDVQQDDB1DZXJ0aW5vbWlzIC0gQXV0b3JpdMOpIFJhY2luZTCCAiIwDQYJKoZIhvcNAQEBBQAD -ggIPADCCAgoCggIBAJ2Fn4bT46/HsmtuM+Cet0I0VZ35gb5j2CN2DpdUzZlMGvE5x4jYF1AMnmHa -wE5V3udauHpOd4cN5bjr+p5eex7Ezyh0x5P1FMYiKAT5kcOrJ3NqDi5N8y4oH3DfVS9O7cdxbwly -Lu3VMpfQ8Vh30WC8Tl7bmoT2R2FFK/ZQpn9qcSdIhDWerP5pqZ56XjUl+rSnSTV3lqc2W+HN3yNw -2F1MpQiD8aYkOBOo7C+ooWfHpi2GR+6K/OybDnT0K0kCe5B1jPyZOQE51kqJ5Z52qz6WKDgmi92N -jMD2AR5vpTESOH2VwnHu7XSu5DaiQ3XV8QCb4uTXzEIDS3h65X27uK4uIJPT5GHfceF2Z5c/tt9q -c1pkIuVC28+BA5PY9OMQ4HL2AHCs8MF6DwV/zzRpRbWT5BnbUhYjBYkOjUjkJW+zeL9i9Qf6lSTC -lrLooyPCXQP8w9PlfMl1I9f09bze5N/NgL+RiH2nE7Q5uiy6vdFrzPOlKO1Enn1So2+WLhl+HPNb -xxaOu2B9d2ZHVIIAEWBsMsGoOBvrbpgT1u449fCfDu/+MYHB0iSVL1N6aaLwD4ZFjliCK0wi1F6g -530mJ0jfJUaNSih8hp75mxpZuWW/Bd22Ql095gBIgl4g9xGC3srYn+Y3RyYe63j3YcNBZFgCQfna -4NH4+ej9Uji29YnfAgMBAAGjWzBZMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G -A1UdDgQWBBQNjLZh2kS40RR9w759XkjwzspqsDAXBgNVHSAEEDAOMAwGCiqBegFWAgIAAQEwDQYJ -KoZIhvcNAQEFBQADggIBACQ+YAZ+He86PtvqrxyaLAEL9MW12Ukx9F1BjYkMTv9sov3/4gbIOZ/x -WqndIlgVqIrTseYyCYIDbNc/CMf4uboAbbnW/FIyXaR/pDGUu7ZMOH8oMDX/nyNTt7buFHAAQCva -R6s0fl6nVjBhK4tDrP22iCj1a7Y+YEq6QpA0Z43q619FVDsXrIvkxmUP7tCMXWY5zjKn2BCXwH40 -nJ+U8/aGH88bc62UeYdocMMzpXDn2NU4lG9jeeu/Cg4I58UvD0KgKxRA/yHgBcUn4YQRE7rWhh1B -CxMjidPJC+iKunqjo3M3NYB9Ergzd0A4wPpeMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjv -JL1vnxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG5ERQL1TE -qkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWqpdEdnV1j6CTmNhTih60b -WfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZbdsLLO7XSAPCjDuGtbkD326C00EauFddE -wk01+dIL8hf2rGbVJLJP0RyZwG71fet0BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/ -vgt2Fl43N+bYdJeimUV5 ------END CERTIFICATE----- - -Root CA Generalitat Valenciana -============================== ------BEGIN CERTIFICATE----- -MIIGizCCBXOgAwIBAgIEO0XlaDANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJFUzEfMB0GA1UE -ChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290 -IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwHhcNMDEwNzA2MTYyMjQ3WhcNMjEwNzAxMTUyMjQ3 -WjBoMQswCQYDVQQGEwJFUzEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UE -CxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGKqtXETcvIorKA3Qdyu0togu8M1JAJke+WmmmO3I2 -F0zo37i7L3bhQEZ0ZQKQUgi0/6iMweDHiVYQOTPvaLRfX9ptI6GJXiKjSgbwJ/BXufjpTjJ3Cj9B -ZPPrZe52/lSqfR0grvPXdMIKX/UIKFIIzFVd0g/bmoGlu6GzwZTNVOAydTGRGmKy3nXiz0+J2ZGQ -D0EbtFpKd71ng+CT516nDOeB0/RSrFOyA8dEJvt55cs0YFAQexvba9dHq198aMpunUEDEO5rmXte -JajCq+TA81yc477OMUxkHl6AovWDfgzWyoxVjr7gvkkHD6MkQXpYHYTqWBLI4bft75PelAgxAgMB -AAGjggM7MIIDNzAyBggrBgEFBQcBAQQmMCQwIgYIKwYBBQUHMAGGFmh0dHA6Ly9vY3NwLnBraS5n -dmEuZXMwEgYDVR0TAQH/BAgwBgEB/wIBAjCCAjQGA1UdIASCAiswggInMIICIwYKKwYBBAG/VQIB -ADCCAhMwggHoBggrBgEFBQcCAjCCAdoeggHWAEEAdQB0AG8AcgBpAGQAYQBkACAAZABlACAAQwBl -AHIAdABpAGYAaQBjAGEAYwBpAPMAbgAgAFIAYQDtAHoAIABkAGUAIABsAGEAIABHAGUAbgBlAHIA -YQBsAGkAdABhAHQAIABWAGEAbABlAG4AYwBpAGEAbgBhAC4ADQAKAEwAYQAgAEQAZQBjAGwAYQBy -AGEAYwBpAPMAbgAgAGQAZQAgAFAAcgDhAGMAdABpAGMAYQBzACAAZABlACAAQwBlAHIAdABpAGYA -aQBjAGEAYwBpAPMAbgAgAHEAdQBlACAAcgBpAGcAZQAgAGUAbAAgAGYAdQBuAGMAaQBvAG4AYQBt -AGkAZQBuAHQAbwAgAGQAZQAgAGwAYQAgAHAAcgBlAHMAZQBuAHQAZQAgAEEAdQB0AG8AcgBpAGQA -YQBkACAAZABlACAAQwBlAHIAdABpAGYAaQBjAGEAYwBpAPMAbgAgAHMAZQAgAGUAbgBjAHUAZQBu -AHQAcgBhACAAZQBuACAAbABhACAAZABpAHIAZQBjAGMAaQDzAG4AIAB3AGUAYgAgAGgAdAB0AHAA -OgAvAC8AdwB3AHcALgBwAGsAaQAuAGcAdgBhAC4AZQBzAC8AYwBwAHMwJQYIKwYBBQUHAgEWGWh0 -dHA6Ly93d3cucGtpLmd2YS5lcy9jcHMwHQYDVR0OBBYEFHs100DSHHgZZu90ECjcPk+yeAT8MIGV -BgNVHSMEgY0wgYqAFHs100DSHHgZZu90ECjcPk+yeAT8oWykajBoMQswCQYDVQQGEwJFUzEfMB0G -A1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScwJQYDVQQDEx5S -b290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmGCBDtF5WgwDQYJKoZIhvcNAQEFBQADggEBACRh -TvW1yEICKrNcda3FbcrnlD+laJWIwVTAEGmiEi8YPyVQqHxK6sYJ2fR1xkDar1CdPaUWu20xxsdz -Ckj+IHLtb8zog2EWRpABlUt9jppSCS/2bxzkoXHPjCpaF3ODR00PNvsETUlR4hTJZGH71BTg9J63 -NI8KJr2XXPR5OkowGcytT6CYirQxlyric21+eLj4iIlPsSKRZEv1UN4D2+XFducTZnV+ZfsBn5OH -iJ35Rld8TWCvmHMTI6QgkYH60GFmuH3Rr9ZvHmw96RH9qfmCIoaZM3Fa6hlXPZHNqcCjbgcTpsnt -+GijnsNacgmHKNHEc8RzGF9QdRYxn7fofMM= ------END CERTIFICATE----- - TWCA Root Certification Authority ================================= -----BEGIN CERTIFICATE----- @@ -2493,75 +1773,6 @@ l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl iB6XzCGcKQENZetX2fNXlrtIzYE= -----END CERTIFICATE----- -StartCom Certification Authority -================================ ------BEGIN CERTIFICATE----- -MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN -U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu -ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0 -NjM3WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk -LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMg -U3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw -ggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZkpMyONvg45iPwbm2xPN1y -o4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rfOQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/ -Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/CJi/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/d -eMotHweXMAEtcnn6RtYTKqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt -2PZE4XNiHzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMMAv+Z -6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w+2OqqGwaVLRcJXrJ -osmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/ -untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVc -UjyJthkqcwEKDwOzEmDyei+B26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT -37uMdBNSSwIDAQABo4ICEDCCAgwwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD -VR0OBBYEFE4L7xqkQFulF2mHMMo0aEPQQa7yMB8GA1UdIwQYMBaAFE4L7xqkQFulF2mHMMo0aEPQ -Qa7yMIIBWgYDVR0gBIIBUTCCAU0wggFJBgsrBgEEAYG1NwEBATCCATgwLgYIKwYBBQUHAgEWImh0 -dHA6Ly93d3cuc3RhcnRzc2wuY29tL3BvbGljeS5wZGYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cu -c3RhcnRzc2wuY29tL2ludGVybWVkaWF0ZS5wZGYwgc8GCCsGAQUFBwICMIHCMCcWIFN0YXJ0IENv -bW1lcmNpYWwgKFN0YXJ0Q29tKSBMdGQuMAMCAQEagZZMaW1pdGVkIExpYWJpbGl0eSwgcmVhZCB0 -aGUgc2VjdGlvbiAqTGVnYWwgTGltaXRhdGlvbnMqIG9mIHRoZSBTdGFydENvbSBDZXJ0aWZpY2F0 -aW9uIEF1dGhvcml0eSBQb2xpY3kgYXZhaWxhYmxlIGF0IGh0dHA6Ly93d3cuc3RhcnRzc2wuY29t -L3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilTdGFydENvbSBG -cmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQsFAAOCAgEAjo/n3JR5 -fPGFf59Jb2vKXfuM/gTFwWLRfUKKvFO3lANmMD+x5wqnUCBVJX92ehQN6wQOQOY+2IirByeDqXWm -N3PH/UvSTa0XQMhGvjt/UfzDtgUx3M2FIk5xt/JxXrAaxrqTi3iSSoX4eA+D/i+tLPfkpLst0OcN -Org+zvZ49q5HJMqjNTbOx8aHmNrs++myziebiMMEofYLWWivydsQD032ZGNcpRJvkrKTlMeIFw6T -tn5ii5B/q06f/ON1FE8qMt9bDeD1e5MNq6HPh+GlBEXoPBKlCcWw0bdT82AUuoVpaiF8H3VhFyAX -e2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVFP0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA -2MFrLH9ZXF2RsXAiV+uKa0hK1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBs -HvUwyKMQ5bLmKhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE -JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ8dCAWZvLMdib -D4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnmfyWl8kgAwKQB2j8= ------END CERTIFICATE----- - -StartCom Certification Authority G2 -=================================== ------BEGIN CERTIFICATE----- -MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMN -U3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg -RzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UE -ChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3Jp -dHkgRzIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8O -o1XJJZlKxdBWQYeQTSFgpBSHO839sj60ZwNq7eEPS8CRhXBF4EKe3ikj1AENoBB5uNsDvfOpL9HG -4A/LnooUCri99lZi8cVytjIl2bLzvWXFDSxu1ZJvGIsAQRSCb0AgJnooD/Uefyf3lLE3PbfHkffi -Aez9lInhzG7TNtYKGXmu1zSCZf98Qru23QumNK9LYP5/Q0kGi4xDuFby2X8hQxfqp0iVAXV16iul -Q5XqFYSdCI0mblWbq9zSOdIxHWDirMxWRST1HFSr7obdljKF+ExP6JV2tgXdNiNnvP8V4so75qbs -O+wmETRIjfaAKxojAuuKHDp2KntWFhxyKrOq42ClAJ8Em+JvHhRYW6Vsi1g8w7pOOlz34ZYrPu8H -vKTlXcxNnw3h3Kq74W4a7I/htkxNeXJdFzULHdfBR9qWJODQcqhaX2YtENwvKhOuJv4KHBnM0D4L -nMgJLvlblnpHnOl68wVQdJVznjAJ85eCXuaPOQgeWeU1FEIT/wCc976qUM/iUUjXuG+v+E5+M5iS -FGI6dWPPe/regjupuznixL0sAA7IF6wT700ljtizkC+p2il9Ha90OrInwMEePnWjFqmveiJdnxMa -z6eg6+OGCtP95paV1yPIN93EfKo2rJgaErHgTuixO/XWb/Ew1wIDAQABo0IwQDAPBgNVHRMBAf8E -BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUS8W0QGutHLOlHGVuRjaJhwUMDrYwDQYJ -KoZIhvcNAQELBQADggIBAHNXPyzVlTJ+N9uWkusZXn5T50HsEbZH77Xe7XRcxfGOSeD8bpkTzZ+K -2s06Ctg6Wgk/XzTQLwPSZh0avZyQN8gMjgdalEVGKua+etqhqaRpEpKwfTbURIfXUfEpY9Z1zRbk -J4kd+MIySP3bmdCPX1R0zKxnNBFi2QwKN4fRoxdIjtIXHfbX/dtl6/2o1PXWT6RbdejF0mCy2wl+ -JYt7ulKSnj7oxXehPOBKc2thz4bcQ///If4jXSRK9dNtD2IEBVeC2m6kMyV5Sy5UGYvMLD0w6dEG -/+gyRr61M3Z3qAFdlsHB1b6uJcDJHgoJIIihDsnzb02CVAAgp9KP5DlUFy6NHrgbuxu9mk47EDTc -nIhT76IxW1hPkWLIwpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/Xld -blhYXzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5lIxKVCCIc -l85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoohdVddLHRDiBYmxOlsGOm -7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulrso8uBtjRkcfGEvRM/TAXw8HaOFvjqerm -obp573PYtlNXLfbQ4ddI ------END CERTIFICATE----- - Buypass Class 2 Root CA ======================= -----BEGIN CERTIFICATE----- @@ -2668,31 +1879,6 @@ uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU dcGWxZ0= -----END CERTIFICATE----- -TURKTRUST Certificate Services Provider Root 2007 -================================================= ------BEGIN CERTIFICATE----- -MIIEPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvzE/MD0GA1UEAww2VMOcUktUUlVTVCBF -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP -MA0GA1UEBwwGQW5rYXJhMV4wXAYDVQQKDFVUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg -QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgQXJhbMSxayAyMDA3MB4X -DTA3MTIyNTE4MzcxOVoXDTE3MTIyMjE4MzcxOVowgb8xPzA9BgNVBAMMNlTDnFJLVFJVU1QgRWxl -a3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTELMAkGA1UEBhMCVFIxDzAN -BgNVBAcMBkFua2FyYTFeMFwGA1UECgxVVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp -bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4gKGMpIEFyYWzEsWsgMjAwNzCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKu3PgqMyKVYFeaK7yc9SrToJdPNM8Ig3BnuiD9N -YvDdE3ePYakqtdTyuTFYKTsvP2qcb3N2Je40IIDu6rfwxArNK4aUyeNgsURSsloptJGXg9i3phQv -KUmi8wUG+7RP2qFsmmaf8EMJyupyj+sA1zU511YXRxcw9L6/P8JorzZAwan0qafoEGsIiveGHtya -KhUG9qPw9ODHFNRRf8+0222vR5YXm3dx2KdxnSQM9pQ/hTEST7ruToK4uT6PIzdezKKqdfcYbwnT -rqdUKDT74eA7YH2gvnmJhsifLfkKS8RQouf9eRbHegsYz85M733WB2+Y8a+xwXrXgTW4qhe04MsC -AwEAAaNCMEAwHQYDVR0OBBYEFCnFkKslrxHkYb+j/4hhkeYO/pyBMA4GA1UdDwEB/wQEAwIBBjAP -BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAQDdr4Ouwo0RSVgrESLFF6QSU2TJ/s -Px+EnWVUXKgWAkD6bho3hO9ynYYKVZ1WKKxmLNA6VpM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+I -aE1KBiY3iAIOtsbWcpnOa3faYjGkVh+uX4132l32iPwa2Z61gfAyuOOI0JzzaqC5mxRZNTZPz/OO -Xl0XrRWV2N2y1RVuAE6zS89mlOTgzbUF2mNXi+WzqtvALhyQRNsaXRik7r4EW5nVcV9VZWRi1aKb -BFmGyGJ353yCRWo9F7/snXUMrqNvWtMvmDb08PUZqxFdyKbjKlhqQgnDvZImZjINXQhVdP+MmNAK -poRq0Tl9 ------END CERTIFICATE----- - D-TRUST Root Class 3 CA 2 2009 ============================== -----BEGIN CERTIFICATE----- @@ -2742,171 +1928,6 @@ NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv w9y4AyHqnxbxLFS1 -----END CERTIFICATE----- -PSCProcert -========== ------BEGIN CERTIFICATE----- -MIIJhjCCB26gAwIBAgIBCzANBgkqhkiG9w0BAQsFADCCAR4xPjA8BgNVBAMTNUF1dG9yaWRhZCBk -ZSBDZXJ0aWZpY2FjaW9uIFJhaXogZGVsIEVzdGFkbyBWZW5lem9sYW5vMQswCQYDVQQGEwJWRTEQ -MA4GA1UEBxMHQ2FyYWNhczEZMBcGA1UECBMQRGlzdHJpdG8gQ2FwaXRhbDE2MDQGA1UEChMtU2lz -dGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMUMwQQYDVQQLEzpTdXBl -cmludGVuZGVuY2lhIGRlIFNlcnZpY2lvcyBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMSUw -IwYJKoZIhvcNAQkBFhZhY3JhaXpAc3VzY2VydGUuZ29iLnZlMB4XDTEwMTIyODE2NTEwMFoXDTIw -MTIyNTIzNTk1OVowgdExJjAkBgkqhkiG9w0BCQEWF2NvbnRhY3RvQHByb2NlcnQubmV0LnZlMQ8w -DQYDVQQHEwZDaGFjYW8xEDAOBgNVBAgTB01pcmFuZGExKjAoBgNVBAsTIVByb3ZlZWRvciBkZSBD -ZXJ0aWZpY2Fkb3MgUFJPQ0VSVDE2MDQGA1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZp -Y2FjaW9uIEVsZWN0cm9uaWNhMQswCQYDVQQGEwJWRTETMBEGA1UEAxMKUFNDUHJvY2VydDCCAiIw -DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANW39KOUM6FGqVVhSQ2oh3NekS1wwQYalNo97BVC -wfWMrmoX8Yqt/ICV6oNEolt6Vc5Pp6XVurgfoCfAUFM+jbnADrgV3NZs+J74BCXfgI8Qhd19L3uA -3VcAZCP4bsm+lU/hdezgfl6VzbHvvnpC2Mks0+saGiKLt38GieU89RLAu9MLmV+QfI4tL3czkkoh -RqipCKzx9hEC2ZUWno0vluYC3XXCFCpa1sl9JcLB/KpnheLsvtF8PPqv1W7/U0HU9TI4seJfxPmO -EO8GqQKJ/+MMbpfg353bIdD0PghpbNjU5Db4g7ayNo+c7zo3Fn2/omnXO1ty0K+qP1xmk6wKImG2 -0qCZyFSTXai20b1dCl53lKItwIKOvMoDKjSuc/HUtQy9vmebVOvh+qBa7Dh+PsHMosdEMXXqP+UH -0quhJZb25uSgXTcYOWEAM11G1ADEtMo88aKjPvM6/2kwLkDd9p+cJsmWN63nOaK/6mnbVSKVUyqU -td+tFjiBdWbjxywbk5yqjKPK2Ww8F22c3HxT4CAnQzb5EuE8XL1mv6JpIzi4mWCZDlZTOpx+FIyw -Bm/xhnaQr/2v/pDGj59/i5IjnOcVdo/Vi5QTcmn7K2FjiO/mpF7moxdqWEfLcU8UC17IAggmosvp -r2uKGcfLFFb14dq12fy/czja+eevbqQ34gcnAgMBAAGjggMXMIIDEzASBgNVHRMBAf8ECDAGAQH/ -AgEBMDcGA1UdEgQwMC6CD3N1c2NlcnRlLmdvYi52ZaAbBgVghl4CAqASDBBSSUYtRy0yMDAwNDAz -Ni0wMB0GA1UdDgQWBBRBDxk4qpl/Qguk1yeYVKIXTC1RVDCCAVAGA1UdIwSCAUcwggFDgBStuyId -xuDSAaj9dlBSk+2YwU2u06GCASakggEiMIIBHjE+MDwGA1UEAxM1QXV0b3JpZGFkIGRlIENlcnRp -ZmljYWNpb24gUmFpeiBkZWwgRXN0YWRvIFZlbmV6b2xhbm8xCzAJBgNVBAYTAlZFMRAwDgYDVQQH -EwdDYXJhY2FzMRkwFwYDVQQIExBEaXN0cml0byBDYXBpdGFsMTYwNAYDVQQKEy1TaXN0ZW1hIE5h -Y2lvbmFsIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExQzBBBgNVBAsTOlN1cGVyaW50ZW5k -ZW5jaWEgZGUgU2VydmljaW9zIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExJTAjBgkqhkiG -9w0BCQEWFmFjcmFpekBzdXNjZXJ0ZS5nb2IudmWCAQowDgYDVR0PAQH/BAQDAgEGME0GA1UdEQRG -MESCDnByb2NlcnQubmV0LnZloBUGBWCGXgIBoAwMClBTQy0wMDAwMDKgGwYFYIZeAgKgEgwQUklG -LUotMzE2MzUzNzMtNzB2BgNVHR8EbzBtMEagRKBChkBodHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52 -ZS9sY3IvQ0VSVElGSUNBRE8tUkFJWi1TSEEzODRDUkxERVIuY3JsMCOgIaAfhh1sZGFwOi8vYWNy -YWl6LnN1c2NlcnRlLmdvYi52ZTA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAGGG2h0dHA6Ly9v -Y3NwLnN1c2NlcnRlLmdvYi52ZTBBBgNVHSAEOjA4MDYGBmCGXgMBAjAsMCoGCCsGAQUFBwIBFh5o -dHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9kcGMwDQYJKoZIhvcNAQELBQADggIBACtZ6yKZu4Sq -T96QxtGGcSOeSwORR3C7wJJg7ODU523G0+1ng3dS1fLld6c2suNUvtm7CpsR72H0xpkzmfWvADmN -g7+mvTV+LFwxNG9s2/NkAZiqlCxB3RWGymspThbASfzXg0gTB1GEMVKIu4YXx2sviiCtxQuPcD4q -uxtxj7mkoP3YldmvWb8lK5jpY5MvYB7Eqvh39YtsL+1+LrVPQA3uvFd359m21D+VJzog1eWuq2w1 -n8GhHVnchIHuTQfiSLaeS5UtQbHh6N5+LwUeaO6/u5BlOsju6rEYNxxik6SgMexxbJHmpHmJWhSn -FFAFTKQAVzAswbVhltw+HoSvOULP5dAssSS830DD7X9jSr3hTxJkhpXzsOfIt+FTvZLm8wyWuevo -5pLtp4EJFAv8lXrPj9Y0TzYS3F7RNHXGRoAvlQSMx4bEqCaJqD8Zm4G7UaRKhqsLEQ+xrmNTbSjq -3TNWOByyrYDT13K9mmyZY+gAu0F2BbdbmRiKw7gSXFbPVgx96OLP7bx0R/vu0xdOIk9W/1DzLuY5 -poLWccret9W6aAjtmcz9opLLabid+Qqkpj5PkygqYWwHJgD/ll9ohri4zspV4KuxPX+Y1zMOWj3Y -eMLEYC/HYvBhkdI4sPaeVdtAgAUSM84dkpvRabP/v/GSCmE1P93+hvS84Bpxs2Km ------END CERTIFICATE----- - -China Internet Network Information Center EV Certificates Root -============================================================== ------BEGIN CERTIFICATE----- -MIID9zCCAt+gAwIBAgIESJ8AATANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMCQ04xMjAwBgNV -BAoMKUNoaW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyMUcwRQYDVQQDDD5D -aGluYSBJbnRlcm5ldCBOZXR3b3JrIEluZm9ybWF0aW9uIENlbnRlciBFViBDZXJ0aWZpY2F0ZXMg -Um9vdDAeFw0xMDA4MzEwNzExMjVaFw0zMDA4MzEwNzExMjVaMIGKMQswCQYDVQQGEwJDTjEyMDAG -A1UECgwpQ2hpbmEgSW50ZXJuZXQgTmV0d29yayBJbmZvcm1hdGlvbiBDZW50ZXIxRzBFBgNVBAMM -PkNoaW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyIEVWIENlcnRpZmljYXRl -cyBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm35z7r07eKpkQ0H1UN+U8i6y -jUqORlTSIRLIOTJCBumD1Z9S7eVnAztUwYyZmczpwA//DdmEEbK40ctb3B75aDFk4Zv6dOtouSCV -98YPjUesWgbdYavi7NifFy2cyjw1l1VxzUOFsUcW9SxTgHbP0wBkvUCZ3czY28Sf1hNfQYOL+Q2H -klY0bBoQCxfVWhyXWIQ8hBouXJE0bhlffxdpxWXvayHG1VA6v2G5BY3vbzQ6sm8UY78WO5upKv23 -KzhmBsUs4qpnHkWnjQRmQvaPK++IIGmPMowUc9orhpFjIpryp9vOiYurXccUwVswah+xt54ugQEC -7c+WXmPbqOY4twIDAQABo2MwYTAfBgNVHSMEGDAWgBR8cks5x8DbYqVPm6oYNJKiyoOCWTAPBgNV -HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUfHJLOcfA22KlT5uqGDSSosqD -glkwDQYJKoZIhvcNAQEFBQADggEBACrDx0M3j92tpLIM7twUbY8opJhJywyA6vPtI2Z1fcXTIWd5 -0XPFtQO3WKwMVC/GVhMPMdoG52U7HW8228gd+f2ABsqjPWYWqJ1MFn3AlUa1UeTiH9fqBk1jjZaM -7+czV0I664zBechNdn3e9rG3geCg+aF4RhcaVpjwTj2rHO3sOdwHSPdj/gauwqRcalsyiMXHM4Ws -ZkJHwlgkmeHlPuV1LI5D1l08eB6olYIpUNHRFrrvwb562bTYzB5MRuF3sTGrvSrIzo9uoV1/A3U0 -5K2JRVRevq4opbs/eHnrc7MKDf2+yfdWrPa37S+bISnHOLaVxATywy39FCqQmbkHzJ8= ------END CERTIFICATE----- - -Swisscom Root CA 2 -================== ------BEGIN CERTIFICATE----- -MIIF2TCCA8GgAwIBAgIQHp4o6Ejy5e/DfEoeWhhntjANBgkqhkiG9w0BAQsFADBkMQswCQYDVQQG -EwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2VydGlmaWNhdGUgU2Vy -dmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3QgQ0EgMjAeFw0xMTA2MjQwODM4MTRaFw0zMTA2 -MjUwNzM4MTRaMGQxCzAJBgNVBAYTAmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGln -aXRhbCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAyMIIC -IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAlUJOhJ1R5tMJ6HJaI2nbeHCOFvErjw0DzpPM -LgAIe6szjPTpQOYXTKueuEcUMncy3SgM3hhLX3af+Dk7/E6J2HzFZ++r0rk0X2s682Q2zsKwzxNo -ysjL67XiPS4h3+os1OD5cJZM/2pYmLcX5BtS5X4HAB1f2uY+lQS3aYg5oUFgJWFLlTloYhyxCwWJ -wDaCFCE/rtuh/bxvHGCGtlOUSbkrRsVPACu/obvLP+DHVxxX6NZp+MEkUp2IVd3Chy50I9AU/SpH -Wrumnf2U5NGKpV+GY3aFy6//SSj8gO1MedK75MDvAe5QQQg1I3ArqRa0jG6F6bYRzzHdUyYb3y1a -SgJA/MTAtukxGggo5WDDH8SQjhBiYEQN7Aq+VRhxLKX0srwVYv8c474d2h5Xszx+zYIdkeNL6yxS -NLCK/RJOlrDrcH+eOfdmQrGrrFLadkBXeyq96G4DsguAhYidDMfCd7Camlf0uPoTXGiTOmekl9Ab -mbeGMktg2M7v0Ax/lZ9vh0+Hio5fCHyqW/xavqGRn1V9TrALacywlKinh/LTSlDcX3KwFnUey7QY -Ypqwpzmqm59m2I2mbJYV4+by+PGDYmy7Velhk6M99bFXi08jsJvllGov34zflVEpYKELKeRcVVi3 -qPyZ7iVNTA6z00yPhOgpD/0QVAKFyPnlw4vP5w8CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYw -HQYDVR0hBBYwFDASBgdghXQBUwIBBgdghXQBUwIBMBIGA1UdEwEB/wQIMAYBAf8CAQcwHQYDVR0O -BBYEFE0mICKJS9PVpAqhb97iEoHF8TwuMB8GA1UdIwQYMBaAFE0mICKJS9PVpAqhb97iEoHF8Twu -MA0GCSqGSIb3DQEBCwUAA4ICAQAyCrKkG8t9voJXiblqf/P0wS4RfbgZPnm3qKhyN2abGu2sEzsO -v2LwnN+ee6FTSA5BesogpxcbtnjsQJHzQq0Qw1zv/2BZf82Fo4s9SBwlAjxnffUy6S8w5X2lejjQ -82YqZh6NM4OKb3xuqFp1mrjX2lhIREeoTPpMSQpKwhI3qEAMw8jh0FcNlzKVxzqfl9NX+Ave5XLz -o9v/tdhZsnPdTSpxsrpJ9csc1fV5yJmz/MFMdOO0vSk3FQQoHt5FRnDsr7p4DooqzgB53MBfGWcs -a0vvaGgLQ+OswWIJ76bdZWGgr4RVSJFSHMYlkSrQwSIjYVmvRRGFHQEkNI/Ps/8XciATwoCqISxx -OQ7Qj1zB09GOInJGTB2Wrk9xseEFKZZZ9LuedT3PDTcNYtsmjGOpI99nBjx8Oto0QuFmtEYE3saW -mA9LSHokMnWRn6z3aOkquVVlzl1h0ydw2Df+n7mvoC5Wt6NlUe07qxS/TFED6F+KBZvuim6c779o -+sjaC+NCydAXFJy3SuCvkychVSa1ZC+N8f+mQAWFBVzKBxlcCxMoTFh/wqXvRdpg065lYZ1Tg3TC -rvJcwhbtkj6EPnNgiLx29CzP0H1907he0ZESEOnN3col49XtmS++dYFLJPlFRpTJKSFTnCZFqhMX -5OfNeOI5wSsSnqaeG8XmDtkx2Q== ------END CERTIFICATE----- - -Swisscom Root EV CA 2 -===================== ------BEGIN CERTIFICATE----- -MIIF4DCCA8igAwIBAgIRAPL6ZOJ0Y9ON/RAdBB92ylgwDQYJKoZIhvcNAQELBQAwZzELMAkGA1UE -BhMCY2gxETAPBgNVBAoTCFN3aXNzY29tMSUwIwYDVQQLExxEaWdpdGFsIENlcnRpZmljYXRlIFNl -cnZpY2VzMR4wHAYDVQQDExVTd2lzc2NvbSBSb290IEVWIENBIDIwHhcNMTEwNjI0MDk0NTA4WhcN -MzEwNjI1MDg0NTA4WjBnMQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsT -HERpZ2l0YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxHjAcBgNVBAMTFVN3aXNzY29tIFJvb3QgRVYg -Q0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMT3HS9X6lds93BdY7BxUglgRCgz -o3pOCvrY6myLURYaVa5UJsTMRQdBTxB5f3HSek4/OE6zAMaVylvNwSqD1ycfMQ4jFrclyxy0uYAy -Xhqdk/HoPGAsp15XGVhRXrwsVgu42O+LgrQ8uMIkqBPHoCE2G3pXKSinLr9xJZDzRINpUKTk4Rti -GZQJo/PDvO/0vezbE53PnUgJUmfANykRHvvSEaeFGHR55E+FFOtSN+KxRdjMDUN/rhPSays/p8Li -qG12W0OfvrSdsyaGOx9/5fLoZigWJdBLlzin5M8J0TbDC77aO0RYjb7xnglrPvMyxyuHxuxenPaH -Za0zKcQvidm5y8kDnftslFGXEBuGCxobP/YCfnvUxVFkKJ3106yDgYjTdLRZncHrYTNaRdHLOdAG -alNgHa/2+2m8atwBz735j9m9W8E6X47aD0upm50qKGsaCnw8qyIL5XctcfaCNYGu+HuB5ur+rPQa -m3Rc6I8k9l2dRsQs0h4rIWqDJ2dVSqTjyDKXZpBy2uPUZC5f46Fq9mDU5zXNysRojddxyNMkM3Ox -bPlq4SjbX8Y96L5V5jcb7STZDxmPX2MYWFCBUWVv8p9+agTnNCRxunZLWB4ZvRVgRaoMEkABnRDi -xzgHcgplwLa7JSnaFp6LNYth7eVxV4O1PHGf40+/fh6Bn0GXAgMBAAGjgYYwgYMwDgYDVR0PAQH/ -BAQDAgGGMB0GA1UdIQQWMBQwEgYHYIV0AVMCAgYHYIV0AVMCAjASBgNVHRMBAf8ECDAGAQH/AgED -MB0GA1UdDgQWBBRF2aWBbj2ITY1x0kbBbkUe88SAnTAfBgNVHSMEGDAWgBRF2aWBbj2ITY1x0kbB -bkUe88SAnTANBgkqhkiG9w0BAQsFAAOCAgEAlDpzBp9SSzBc1P6xXCX5145v9Ydkn+0UjrgEjihL -j6p7jjm02Vj2e6E1CqGdivdj5eu9OYLU43otb98TPLr+flaYC/NUn81ETm484T4VvwYmneTwkLbU -wp4wLh/vx3rEUMfqe9pQy3omywC0Wqu1kx+AiYQElY2NfwmTv9SoqORjbdlk5LgpWgi/UOGED1V7 -XwgiG/W9mR4U9s70WBCCswo9GcG/W6uqmdjyMb3lOGbcWAXH7WMaLgqXfIeTK7KK4/HsGOV1timH -59yLGn602MnTihdsfSlEvoqq9X46Lmgxk7lq2prg2+kupYTNHAq4Sgj5nPFhJpiTt3tm7JFe3VE/ -23MPrQRYCd0EApUKPtN236YQHoA96M2kZNEzx5LH4k5E4wnJTsJdhw4Snr8PyQUQ3nqjsTzyP6Wq -J3mtMX0f/fwZacXduT98zca0wjAefm6S139hdlqP65VNvBFuIXxZN5nQBrz5Bm0yFqXZaajh3DyA -HmBR3NdUIR7KYndP+tiPsys6DXhyyWhBWkdKwqPrGtcKqzwyVcgKEZzfdNbwQBUdyLmPtTbFr/gi -uMod89a2GQ+fYWVq6nTIfI/DT11lgh/ZDYnadXL77/FHZxOzyNEZiCcmmpl5fx7kLD977vHeTYuW -l8PVP3wbI+2ksx0WckNLIOFZfsLorSa/ovc= ------END CERTIFICATE----- - -CA Disig Root R1 -================ ------BEGIN CERTIFICATE----- -MIIFaTCCA1GgAwIBAgIJAMMDmu5QkG4oMA0GCSqGSIb3DQEBBQUAMFIxCzAJBgNVBAYTAlNLMRMw -EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp -ZyBSb290IFIxMB4XDTEyMDcxOTA5MDY1NloXDTQyMDcxOTA5MDY1NlowUjELMAkGA1UEBhMCU0sx -EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp -c2lnIFJvb3QgUjEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCqw3j33Jijp1pedxiy -3QRkD2P9m5YJgNXoqqXinCaUOuiZc4yd39ffg/N4T0Dhf9Kn0uXKE5Pn7cZ3Xza1lK/oOI7bm+V8 -u8yN63Vz4STN5qctGS7Y1oprFOsIYgrY3LMATcMjfF9DCCMyEtztDK3AfQ+lekLZWnDZv6fXARz2 -m6uOt0qGeKAeVjGu74IKgEH3G8muqzIm1Cxr7X1r5OJeIgpFy4QxTaz+29FHuvlglzmxZcfe+5nk -CiKxLU3lSCZpq+Kq8/v8kiky6bM+TR8noc2OuRf7JT7JbvN32g0S9l3HuzYQ1VTW8+DiR0jm3hTa -YVKvJrT1cU/J19IG32PK/yHoWQbgCNWEFVP3Q+V8xaCJmGtzxmjOZd69fwX3se72V6FglcXM6pM6 -vpmumwKjrckWtc7dXpl4fho5frLABaTAgqWjR56M6ly2vGfb5ipN0gTco65F97yLnByn1tUD3AjL -LhbKXEAz6GfDLuemROoRRRw1ZS0eRWEkG4IupZ0zXWX4Qfkuy5Q/H6MMMSRE7cderVC6xkGbrPAX -ZcD4XW9boAo0PO7X6oifmPmvTiT6l7Jkdtqr9O3jw2Dv1fkCyC2fg69naQanMVXVz0tv/wQFx1is -XxYb5dKj6zHbHzMVTdDypVP1y+E9Tmgt2BLdqvLmTZtJ5cUoobqwWsagtQIDAQABo0IwQDAPBgNV -HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUiQq0OJMa5qvum5EY+fU8PjXQ -04IwDQYJKoZIhvcNAQEFBQADggIBADKL9p1Kyb4U5YysOMo6CdQbzoaz3evUuii+Eq5FLAR0rBNR -xVgYZk2C2tXck8An4b58n1KeElb21Zyp9HWc+jcSjxyT7Ff+Bw+r1RL3D65hXlaASfX8MPWbTx9B -LxyE04nH4toCdu0Jz2zBuByDHBb6lM19oMgY0sidbvW9adRtPTXoHqJPYNcHKfyyo6SdbhWSVhlM -CrDpfNIZTUJG7L399ldb3Zh+pE3McgODWF3vkzpBemOqfDqo9ayk0d2iLbYq/J8BjuIQscTK5Gfb -VSUZP/3oNn6z4eGBrxEWi1CXYBmCAMBrTXO40RMHPuq2MU/wQppt4hF05ZSsjYSVPCGvxdpHyN85 -YmLLW1AL14FABZyb7bq2ix4Eb5YgOe2kfSnbSM6C3NQCjR0EMVrHS/BsYVLXtFHCgWzN4funodKS -ds+xDzdYpPJScWc/DIh4gInByLUfkmO+p3qKViwaqKactV2zY9ATIKHrkWzQjX2v3wvkF7mGnjix -lAxYjOBVqjtjbZqJYLhkKpLGN/R+Q0O3c+gB53+XD9fyexn9GtePyfqFa3qdnom2piiZk4hA9z7N -UaPK6u95RyG1/jLix8NRb76AdPCkwzryT+lf3xkK8jsTQ6wxpLPn6/wY1gGp8yqPNg7rtLG8t0zJ -a7+h89n07eLw4+1knj0vllJPgFOL ------END CERTIFICATE----- - CA Disig Root R2 ================ -----BEGIN CERTIFICATE----- @@ -3310,66 +2331,6 @@ G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP 82Z+ -----END CERTIFICATE----- -WoSign -====== ------BEGIN CERTIFICATE----- -MIIFdjCCA16gAwIBAgIQXmjWEXGUY1BWAGjzPsnFkTANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQG -EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxKjAoBgNVBAMTIUNlcnRpZmljYXRpb24g -QXV0aG9yaXR5IG9mIFdvU2lnbjAeFw0wOTA4MDgwMTAwMDFaFw0zOTA4MDgwMTAwMDFaMFUxCzAJ -BgNVBAYTAkNOMRowGAYDVQQKExFXb1NpZ24gQ0EgTGltaXRlZDEqMCgGA1UEAxMhQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkgb2YgV29TaWduMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA -vcqNrLiRFVaXe2tcesLea9mhsMMQI/qnobLMMfo+2aYpbxY94Gv4uEBf2zmoAHqLoE1UfcIiePyO -CbiohdfMlZdLdNiefvAA5A6JrkkoRBoQmTIPJYhTpA2zDxIIFgsDcSccf+Hb0v1naMQFXQoOXXDX -2JegvFNBmpGN9J42Znp+VsGQX+axaCA2pIwkLCxHC1l2ZjC1vt7tj/id07sBMOby8w7gLJKA84X5 -KIq0VC6a7fd2/BVoFutKbOsuEo/Uz/4Mx1wdC34FMr5esAkqQtXJTpCzWQ27en7N1QhatH/YHGkR -+ScPewavVIMYe+HdVHpRaG53/Ma/UkpmRqGyZxq7o093oL5d//xWC0Nyd5DKnvnyOfUNqfTq1+ez -EC8wQjchzDBwyYaYD8xYTYO7feUapTeNtqwylwA6Y3EkHp43xP901DfA4v6IRmAR3Qg/UDaruHqk -lWJqbrDKaiFaafPz+x1wOZXzp26mgYmhiMU7ccqjUu6Du/2gd/Tkb+dC221KmYo0SLwX3OSACCK2 -8jHAPwQ+658geda4BmRkAjHXqc1S+4RFaQkAKtxVi8QGRkvASh0JWzko/amrzgD5LkhLJuYwTKVY -yrREgk/nkR4zw7CT/xH8gdLKH3Ep3XZPkiWvHYG3Dy+MwwbMLyejSuQOmbp8HkUff6oZRZb9/D0C -AwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOFmzw7R -8bNLtwYgFP6HEtX2/vs+MA0GCSqGSIb3DQEBBQUAA4ICAQCoy3JAsnbBfnv8rWTjMnvMPLZdRtP1 -LOJwXcgu2AZ9mNELIaCJWSQBnfmvCX0KI4I01fx8cpm5o9dU9OpScA7F9dY74ToJMuYhOZO9sxXq -T2r09Ys/L3yNWC7F4TmgPsc9SnOeQHrAK2GpZ8nzJLmzbVUsWh2eJXLOC62qx1ViC777Y7NhRCOj -y+EaDveaBk3e1CNOIZZbOVtXHS9dCF4Jef98l7VNg64N1uajeeAz0JmWAjCnPv/So0M/BVoG6kQC -2nz4SNAzqfkHx5Xh9T71XXG68pWpdIhhWeO/yloTunK0jF02h+mmxTwTv97QRCbut+wucPrXnbes -5cVAWubXbHssw1abR80LzvobtCHXt2a49CUwi1wNuepnsvRtrtWhnk/Yn+knArAdBtaP4/tIEp9/ -EaEQPkxROpaw0RPxx9gmrjrKkcRpnd8BKWRRb2jaFOwIQZeQjdCygPLPwj2/kWjFgGcexGATVdVh -mVd8upUPYUk6ynW8yQqTP2cOEvIo4jEbwFcW3wh8GcF+Dx+FHgo2fFt+J7x6v+Db9NpSvd4MVHAx -kUOVyLzwPt0JfjBkUO1/AaQzZ01oT74V77D2AhGiGxMlOtzCWfHjXEa7ZywCRuoeSKbmW9m1vFGi -kpbbqsY3Iqb+zCB0oy2pLmvLwIIRIbWTee5Ehr7XHuQe+w== ------END CERTIFICATE----- - -WoSign China -============ ------BEGIN CERTIFICATE----- -MIIFWDCCA0CgAwIBAgIQUHBrzdgT/BtOOzNy0hFIjTANBgkqhkiG9w0BAQsFADBGMQswCQYDVQQG -EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxGzAZBgNVBAMMEkNBIOayg+mAmuagueiv -geS5pjAeFw0wOTA4MDgwMTAwMDFaFw0zOTA4MDgwMTAwMDFaMEYxCzAJBgNVBAYTAkNOMRowGAYD -VQQKExFXb1NpZ24gQ0EgTGltaXRlZDEbMBkGA1UEAwwSQ0Eg5rKD6YCa5qC56K+B5LmmMIICIjAN -BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0EkhHiX8h8EqwqzbdoYGTufQdDTc7WU1/FDWiD+k -8H/rD195L4mx/bxjWDeTmzj4t1up+thxx7S8gJeNbEvxUNUqKaqoGXqW5pWOdO2XCld19AXbbQs5 -uQF/qvbW2mzmBeCkTVL829B0txGMe41P/4eDrv8FAxNXUDf+jJZSEExfv5RxadmWPgxDT74wwJ85 -dE8GRV2j1lY5aAfMh09Qd5Nx2UQIsYo06Yms25tO4dnkUkWMLhQfkWsZHWgpLFbE4h4TV2TwYeO5 -Ed+w4VegG63XX9Gv2ystP9Bojg/qnw+LNVgbExz03jWhCl3W6t8Sb8D7aQdGctyB9gQjF+BNdeFy -b7Ao65vh4YOhn0pdr8yb+gIgthhid5E7o9Vlrdx8kHccREGkSovrlXLp9glk3Kgtn3R46MGiCWOc -76DbT52VqyBPt7D3h1ymoOQ3OMdc4zUPLK2jgKLsLl3Az+2LBcLmc272idX10kaO6m1jGx6KyX2m -+Jzr5dVjhU1zZmkR/sgO9MHHZklTfuQZa/HpelmjbX7FF+Ynxu8b22/8DU0GAbQOXDBGVWCvOGU6 -yke6rCzMRh+yRpY/8+0mBe53oWprfi1tWFxK1I5nuPHa1UaKJ/kR8slC/k7e3x9cxKSGhxYzoacX -GKUN5AXlK8IrC6KVkLn9YDxOiT7nnO4fuwECAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1Ud -EwEB/wQFMAMBAf8wHQYDVR0OBBYEFOBNv9ybQV0T6GTwp+kVpOGBwboxMA0GCSqGSIb3DQEBCwUA -A4ICAQBqinA4WbbaixjIvirTthnVZil6Xc1bL3McJk6jfW+rtylNpumlEYOnOXOvEESS5iVdT2H6 -yAa+Tkvv/vMx/sZ8cApBWNromUuWyXi8mHwCKe0JgOYKOoICKuLJL8hWGSbueBwj/feTZU7n85iY -r83d2Z5AiDEoOqsuC7CsDCT6eiaY8xJhEPRdF/d+4niXVOKM6Cm6jBAyvd0zaziGfjk9DgNyp115 -j0WKWa5bIW4xRtVZjc8VX90xJc/bYNaBRHIpAlf2ltTW/+op2znFuCyKGo3Oy+dCMYYFaA6eFN0A -kLppRQjbbpCBhqcqBT/mhDn4t/lXX0ykeVoQDF7Va/81XwVRHmyjdanPUIPTfPRm94KNPQx96N97 -qA4bLJyuQHCH2u2nFoJavjVsIE4iYdm8UXrNemHcSxH5/mc0zy4EZmFcV5cjjPOGG0jfKq+nwf/Y -jj4Du9gqsPoUJbJRa4ZDhS4HIxaAjUz7tGM7zMN07RujHv41D198HRaG9Q7DlfEvr10lO1Hm13ZB -ONFLAzkopR6RctR9q5czxNM+4Gm2KHmgCY0c0f9BckgG/Jou5yD5m6Leie2uPAmvylezkolwQOQv -T8Jwg0DXJCxr5wkf09XHwQj02w47HAcLQxGEIYbpgNR12KvxAmLBsX5VYc8T1yaw15zLKYs4SgsO -kI26oQ== ------END CERTIFICATE----- - COMODO RSA Certification Authority ================================== -----BEGIN CERTIFICATE----- @@ -3674,54 +2635,6 @@ kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su -----END CERTIFICATE----- -TÃœRKTRUST Elektronik Sertifika Hizmet SaÄŸlayıcısı H5 -==================================================== ------BEGIN CERTIFICATE----- -MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UEBhMCVFIxDzAN -BgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp -bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1Qg -RWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAw -ODA3MDFaFw0yMzA0MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0w -SwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnE -n2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBFbGVrdHJvbmlrIFNlcnRp -ZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEApCUZ4WWe60ghUEoI5RHwWrom/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537 -jVJp45wnEFPzpALFp/kRGml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1m -ep5Fimh34khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z5UNP -9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0hO8EuPbJbKoCPrZV -4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QIDAQABo0IwQDAdBgNVHQ4EFgQUVpkH -HtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI -hvcNAQELBQADggEBAJ5FdnsXSDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPo -BP5yCccLqh0lVX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq -URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nfpeYVhDfwwvJl -lpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CFYv4HAqGEVka+lgqaE9chTLd8 -B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW+qtB4Uu2NQvAmxU= ------END CERTIFICATE----- - -TÃœRKTRUST Elektronik Sertifika Hizmet SaÄŸlayıcısı H6 -==================================================== ------BEGIN CERTIFICATE----- -MIIEJjCCAw6gAwIBAgIGfaHyZeyKMA0GCSqGSIb3DQEBCwUAMIGxMQswCQYDVQQGEwJUUjEPMA0G -A1UEBwwGQW5rYXJhMU0wSwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmls -acWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBF -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg2MB4XDTEzMTIxODA5 -MDQxMFoXDTIzMTIxNjA5MDQxMFowgbExCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmExTTBL -BgNVBAoMRFTDnFJLVFJVU1QgQmlsZ2kgxLBsZXRpxZ9pbSB2ZSBCaWxpxZ9pbSBHw7x2ZW5sacSf -aSBIaXptZXRsZXJpIEEuxZ4uMUIwQAYDVQQDDDlUw5xSS1RSVVNUIEVsZWt0cm9uaWsgU2VydGlm -aWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLEgSDYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK -AoIBAQCdsGjW6L0UlqMACprx9MfMkU1xeHe59yEmFXNRFpQJRwXiM/VomjX/3EsvMsew7eKC5W/a -2uqsxgbPJQ1BgfbBOCK9+bGlprMBvD9QFyv26WZV1DOzXPhDIHiTVRZwGTLmiddk671IUP320EED -wnS3/faAz1vFq6TWlRKb55cTMgPp1KtDWxbtMyJkKbbSk60vbNg9tvYdDjTu0n2pVQ8g9P0pu5Fb -HH3GQjhtQiht1AH7zYiXSX6484P4tZgvsycLSF5W506jM7NE1qXyGJTtHB6plVxiSvgNZ1GpryHV -+DKdeboaX+UEVU0TRv/yz3THGmNtwx8XEsMeED5gCLMxAgMBAAGjQjBAMB0GA1UdDgQWBBTdVRcT -9qzoSCHK77Wv0QAy7Z6MtTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG -9w0BAQsFAAOCAQEAb1gNl0OqFlQ+v6nfkkU/hQu7VtMMUszIv3ZnXuaqs6fvuay0EBQNdH49ba3R -fdCaqaXKGDsCQC4qnFAUi/5XfldcEQlLNkVS9z2sFP1E34uXI9TDwe7UU5X+LEr+DXCqu4svLcsy -o4LyVN/Y8t3XSHLuSqMplsNEzm61kod2pLv0kmzOLBQJZo6NrRa1xxsJYTvjIKIDgI6tflEATseW -hvtDmHd9KMeP2Cpu54Rvl0EpABZeTeIT6lnAY2c6RPuY/ATTMHKm9ocJV612ph1jmv3XZch4gyt1 -O6VbuA1df74jrlZVlFjvH4GMKrLN5ptjnhi85WsGtAuYSyher4hYyw== ------END CERTIFICATE----- - Certinomis - Root CA ==================== -----BEGIN CERTIFICATE----- @@ -3775,42 +2688,6 @@ HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= -----END CERTIFICATE----- -Certification Authority of WoSign G2 -==================================== ------BEGIN CERTIFICATE----- -MIIDfDCCAmSgAwIBAgIQayXaioidfLwPBbOxemFFRDANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQG -EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxLTArBgNVBAMTJENlcnRpZmljYXRpb24g -QXV0aG9yaXR5IG9mIFdvU2lnbiBHMjAeFw0xNDExMDgwMDU4NThaFw00NDExMDgwMDU4NThaMFgx -CzAJBgNVBAYTAkNOMRowGAYDVQQKExFXb1NpZ24gQ0EgTGltaXRlZDEtMCsGA1UEAxMkQ2VydGlm -aWNhdGlvbiBBdXRob3JpdHkgb2YgV29TaWduIEcyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAvsXEoCKASU+/2YcRxlPhuw+9YH+v9oIOH9ywjj2X4FA8jzrvZjtFB5sg+OPXJYY1kBai -XW8wGQiHC38Gsp1ij96vkqVg1CuAmlI/9ZqD6TRay9nVYlzmDuDfBpgOgHzKtB0TiGsOqCR3A9Du -W/PKaZE1OVbFbeP3PU9ekzgkyhjpJMuSA93MHD0JcOQg5PGurLtzaaNjOg9FD6FKmsLRY6zLEPg9 -5k4ot+vElbGs/V6r+kHLXZ1L3PR8du9nfwB6jdKgGlxNIuG12t12s9R23164i5jIFFTMaxeSt+BK -v0mUYQs4kI9dJGwlezt52eJ+na2fmKEG/HgUYFf47oB3sQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC -AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU+mCp62XF3RYUCE4MD42b4Pdkr2cwDQYJKoZI -hvcNAQELBQADggEBAFfDejaCnI2Y4qtAqkePx6db7XznPWZaOzG73/MWM5H8fHulwqZm46qwtyeY -P0nXYGdnPzZPSsvxFPpahygc7Y9BMsaV+X3avXtbwrAh449G3CE4Q3RM+zD4F3LBMvzIkRfEzFg3 -TgvMWvchNSiDbGAtROtSjFA9tWwS1/oJu2yySrHFieT801LYYRf+epSEj3m2M1m6D8QL4nCgS3gu -+sif/a+RZQp4OBXllxcU3fngLDT4ONCEIgDAFFEYKwLcMFrw6AF8NTojrwjkr6qOKEJJLvD1mTS+ -7Q9LGOHSJDy7XUe3IfKN0QqZjuNuPq1w4I+5ysxugTH2e5x6eeRncRg= ------END CERTIFICATE----- - -CA WoSign ECC Root -================== ------BEGIN CERTIFICATE----- -MIICCTCCAY+gAwIBAgIQaEpYcIBr8I8C+vbe6LCQkDAKBggqhkjOPQQDAzBGMQswCQYDVQQGEwJD -TjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxGzAZBgNVBAMTEkNBIFdvU2lnbiBFQ0MgUm9v -dDAeFw0xNDExMDgwMDU4NThaFw00NDExMDgwMDU4NThaMEYxCzAJBgNVBAYTAkNOMRowGAYDVQQK -ExFXb1NpZ24gQ0EgTGltaXRlZDEbMBkGA1UEAxMSQ0EgV29TaWduIEVDQyBSb290MHYwEAYHKoZI -zj0CAQYFK4EEACIDYgAE4f2OuEMkq5Z7hcK6C62N4DrjJLnSsb6IOsq/Srj57ywvr1FQPEd1bPiU -t5v8KB7FVMxjnRZLU8HnIKvNrCXSf4/CwVqCXjCLelTOA7WRf6qU0NGKSMyCBSah1VES1ns2o0Iw -QDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUqv3VWqP2h4syhf3R -MluARZPzA7gwCgYIKoZIzj0EAwMDaAAwZQIxAOSkhLCB1T2wdKyUpOgOPQB0TKGXa/kNUTyh2Tv0 -Daupn75OcsqF1NnstTJFGG+rrQIwfcf3aWMvoeGY7xMQ0Xk/0f7qO3/eVvSQsRUR2LIiFdAvwyYu -a/GRspBl9JrmkO5K ------END CERTIFICATE----- - SZAFIR ROOT CA2 =============== -----BEGIN CERTIFICATE----- @@ -4064,3 +2941,374 @@ YVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n JEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ m+kXQ99b21/+jh5Xos1AnX5iItreGCc= -----END CERTIFICATE----- + +AC RAIZ FNMT-RCM +================ +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT +AkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw +MjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD +TTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf +qQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr +btQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL +j2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou +08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw +WsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT +tOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ +47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC +ll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa +i0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE +FPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o +dHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD +nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s +D8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ +j+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT +Qfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW ++YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7 +Ixjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d +8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm +5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG +rp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM= +-----END CERTIFICATE----- + +Amazon Root CA 1 +================ +-----BEGIN CERTIFICATE----- +MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD +VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1 +MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv +bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH +FzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ +gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t +dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce +VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3 +DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM +CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy +8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa +2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2 +xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5 +-----END CERTIFICATE----- + +Amazon Root CA 2 +================ +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD +VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1 +MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv +bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4 +kHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp +N+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9 +AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd +fLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx +kv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS +btqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0 +Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN +c/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+ +3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw +DPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA +A7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY ++gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE +YFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW +xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ +gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW +aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV +Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3 +KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi +JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw= +-----END CERTIFICATE----- + +Amazon Root CA 3 +================ +-----BEGIN CERTIFICATE----- +MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG +EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy +NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ +MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB +f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr +Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43 +rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc +eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw== +-----END CERTIFICATE----- + +Amazon Root CA 4 +================ +-----BEGIN CERTIFICATE----- +MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG +EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy +NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ +MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN +/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri +83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV +HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA +MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1 +AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA== +-----END CERTIFICATE----- + +LuxTrust Global Root 2 +====================== +-----BEGIN CERTIFICATE----- +MIIFwzCCA6ugAwIBAgIUCn6m30tEntpqJIWe5rgV0xZ/u7EwDQYJKoZIhvcNAQELBQAwRjELMAkG +A1UEBhMCTFUxFjAUBgNVBAoMDUx1eFRydXN0IFMuQS4xHzAdBgNVBAMMFkx1eFRydXN0IEdsb2Jh +bCBSb290IDIwHhcNMTUwMzA1MTMyMTU3WhcNMzUwMzA1MTMyMTU3WjBGMQswCQYDVQQGEwJMVTEW +MBQGA1UECgwNTHV4VHJ1c3QgUy5BLjEfMB0GA1UEAwwWTHV4VHJ1c3QgR2xvYmFsIFJvb3QgMjCC +AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANeFl78RmOnwYoNMPIf5U2o3C/IPPIfOb9wm +Kb3FibrJgz337spbxm1Jc7TJRqMbNBM/wYlFV/TZsfs2ZUv7COJIcRHIbjuend+JZTemhfY7RBi2 +xjcwYkSSl2l9QjAk5A0MiWtj3sXh306pFGxT4GHO9hcvHTy95iJMHZP1EMShduxq3sVs35a0VkBC +wGKSMKEtFZSg0iAGCW5qbeXrt77U8PEVfIvmTroTzEsnXpk8F12PgX8zPU/TPxvsXD/wPEx1bvKm +1Z3aLQdjAsZy6ZS8TEmVT4hSyNvoaYL4zDRbIvCGp4m9SAptZoFtyMhk+wHh9OHe2Z7d21vUKpkm +FRseTJIpgp7VkoGSQXAZ96Tlk0u8d2cx3Rz9MXANF5kM+Qw5GSoXtTBxVdUPrljhPS80m8+f9niF +wpN6cj5mj5wWEWCPnolvZ77gR1o7DJpni89Gxq44o/KnvObWhWszJHAiS8sIm7vI+AIpHb4gDEa/ +a4ebsypmQjVGbKq6rfmYe+lQVRQxv7HaLe2ArWgk+2mr2HETMOZns4dA/Yl+8kPREd8vZS9kzl8U +ubG/Mb2HeFpZZYiq/FkySIbWTLkpS5XTdvN3JW1CHDiDTf2jX5t/Lax5Gw5CMZdjpPuKadUiDTSQ +MC6otOBttpSsvItO13D8xTiOZCXhTTmQzsmHhFhxAgMBAAGjgagwgaUwDwYDVR0TAQH/BAUwAwEB +/zBCBgNVHSAEOzA5MDcGByuBKwEBAQowLDAqBggrBgEFBQcCARYeaHR0cHM6Ly9yZXBvc2l0b3J5 +Lmx1eHRydXN0Lmx1MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBT/GCh2+UgFLKGu8SsbK7JT ++Et8szAdBgNVHQ4EFgQU/xgodvlIBSyhrvErGyuyU/hLfLMwDQYJKoZIhvcNAQELBQADggIBAGoZ +FO1uecEsh9QNcH7X9njJCwROxLHOk3D+sFTAMs2ZMGQXvw/l4jP9BzZAcg4atmpZ1gDlaCDdLnIN +H2pkMSCEfUmmWjfrRcmF9dTHF5kH5ptV5AzoqbTOjFu1EVzPig4N1qx3gf4ynCSecs5U89BvolbW +7MM3LGVYvlcAGvI1+ut7MV3CwRI9loGIlonBWVx65n9wNOeD4rHh4bhY79SV5GCc8JaXcozrhAIu +ZY+kt9J/Z93I055cqqmkoCUUBpvsT34tC38ddfEz2O3OuHVtPlu5mB0xDVbYQw8wkbIEa91WvpWA +VWe+2M2D2RjuLg+GLZKecBPs3lHJQ3gCpU3I+V/EkVhGFndadKpAvAefMLmx9xIX3eP/JEAdemrR +TxgKqpAd60Ae36EeRJIQmvKN4dFLRp7oRUKX6kWZ8+xm1QL68qZKJKrezrnK+T+Tb/mjuuqlPpmt +/f97mfVl7vBZKGfXkJWkE4SphMHozs51k2MavDzq1WQfLSoSOcbDWjLtR5EWDrw4wVDej8oqkDQc +7kGUnF4ZLvhFSZl0kbAEb+MEWrGrKqv+x9CWttrhSmQGbmBNvUJO/3jaJMobtNeWOWyu8Q6qp31I +iyBMz2TWuJdGsE7RKlY6oJO9r4Ak4Ap+58rVyuiFVdw2KuGUaJPHZnJED4AhMmwlxyOAgwrr +-----END CERTIFICATE----- + +TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1 +============================================= +-----BEGIN CERTIFICATE----- +MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT +D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr +IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g +TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp +ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD +VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt +c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth +bXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11 +IFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8 +6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc +wv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0 +3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9 +WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU +ZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ +KoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh +AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc +lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R +e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j +q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM= +-----END CERTIFICATE----- + +GDCA TrustAUTH R5 ROOT +====================== +-----BEGIN CERTIFICATE----- +MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw +BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD +DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow +YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ +IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs +AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p +OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr +pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ +9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ +xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM +R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ +D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4 +oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx +9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg +p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9 +H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35 +6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd ++PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ +HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD +F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ +8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv +/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT +aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g== +-----END CERTIFICATE----- + +TrustCor RootCert CA-1 +====================== +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig +U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp +dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx +MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu +YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe +VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy +dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq +jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4 +pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0 +JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h +gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw +/Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j +BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5 +mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf +ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C +qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P +3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk= +-----END CERTIFICATE----- + +TrustCor RootCert CA-2 +====================== +-----BEGIN CERTIFICATE----- +MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w +DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT +eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0 +eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy +MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h +bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U +cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0 +IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb +ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk +RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1 +oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb +XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1 +/p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q +jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP +eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg +rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh +8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU +2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h +Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp +kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv +2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3 +S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw +PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv +DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU +RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE +xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX +RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ +-----END CERTIFICATE----- + +TrustCor ECA-1 +============== +-----BEGIN CERTIFICATE----- +MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig +U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp +dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw +N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5 +MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y +IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR +MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23 +xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc +p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+ +fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj +YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL +f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF +AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u +/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F +hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs +J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC +jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g== +-----END CERTIFICATE----- + +SSL.com Root Certification Authority RSA +======================================== +-----BEGIN CERTIFICATE----- +MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM +BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x +MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw +MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx +EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM +LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C +Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8 +P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge +oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp +k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z +fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ +gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2 +UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8 +1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s +bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV +HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr +dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf +ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl +u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq +erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj +MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ +vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI +Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y +wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI +WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k= +-----END CERTIFICATE----- + +SSL.com Root Certification Authority ECC +======================================== +-----BEGIN CERTIFICATE----- +MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV +BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv +BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy +MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO +BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv +bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA +BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+ +8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR +hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT +jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW +e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z +5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl +-----END CERTIFICATE----- + +SSL.com EV Root Certification Authority RSA R2 +============================================== +-----BEGIN CERTIFICATE----- +MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w +DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u +MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy +MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI +DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD +VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN +BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh +hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w +cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO +Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+ +B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh +CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim +9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto +RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm +JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48 ++qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV +HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp +qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1 +++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx +Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G +guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz +OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7 +CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq +lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR +rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1 +hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX +9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w== +-----END CERTIFICATE----- + +SSL.com EV Root Certification Authority ECC +=========================================== +-----BEGIN CERTIFICATE----- +MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV +BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy +BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw +MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx +EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM +LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB +BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy +3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O +BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe +5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ +N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm +m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg== +-----END CERTIFICATE----- diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/src/CaBundle.php b/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/src/CaBundle.php new file mode 100644 index 00000000..bddf5c9b --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/ca-bundle/src/CaBundle.php @@ -0,0 +1,260 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ +namespace _PhpScoper5bbb1f4b001f3\Composer\CaBundle; + +use _PhpScoper5bbb1f4b001f3\Psr\Log\LoggerInterface; +use _PhpScoper5bbb1f4b001f3\Symfony\Component\Process\PhpProcess; +/** + * @author Chris Smith + * @author Jordi Boggiano + */ +class CaBundle +{ + private static $caPath; + private static $caFileValidity = array(); + private static $useOpensslParse; + /** + * Returns the system CA bundle path, or a path to the bundled one + * + * This method was adapted from Sslurp. + * https://github.com/EvanDotPro/Sslurp + * + * (c) Evan Coury + * + * For the full copyright and license information, please see below: + * + * Copyright (c) 2013, Evan Coury + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @param LoggerInterface $logger optional logger for information about which CA files were loaded + * @return string path to a CA bundle file or directory + */ + public static function getSystemCaRootBundlePath(\_PhpScoper5bbb1f4b001f3\Psr\Log\LoggerInterface $logger = null) + { + if (self::$caPath !== null) { + return self::$caPath; + } + // If SSL_CERT_FILE env variable points to a valid certificate/bundle, use that. + // This mimics how OpenSSL uses the SSL_CERT_FILE env variable. + $envCertFile = \getenv('SSL_CERT_FILE'); + if ($envCertFile && \is_readable($envCertFile) && static::validateCaFile($envCertFile, $logger)) { + return self::$caPath = $envCertFile; + } + // If SSL_CERT_DIR env variable points to a valid certificate/bundle, use that. + // This mimics how OpenSSL uses the SSL_CERT_FILE env variable. + $envCertDir = \getenv('SSL_CERT_DIR'); + if ($envCertDir && \is_dir($envCertDir) && \is_readable($envCertDir)) { + return self::$caPath = $envCertDir; + } + $configured = \ini_get('openssl.cafile'); + if ($configured && \strlen($configured) > 0 && \is_readable($configured) && static::validateCaFile($configured, $logger)) { + return self::$caPath = $configured; + } + $configured = \ini_get('openssl.capath'); + if ($configured && \is_dir($configured) && \is_readable($configured)) { + return self::$caPath = $configured; + } + $caBundlePaths = array( + '/etc/pki/tls/certs/ca-bundle.crt', + // Fedora, RHEL, CentOS (ca-certificates package) + '/etc/ssl/certs/ca-certificates.crt', + // Debian, Ubuntu, Gentoo, Arch Linux (ca-certificates package) + '/etc/ssl/ca-bundle.pem', + // SUSE, openSUSE (ca-certificates package) + '/usr/local/share/certs/ca-root-nss.crt', + // FreeBSD (ca_root_nss_package) + '/usr/ssl/certs/ca-bundle.crt', + // Cygwin + '/opt/local/share/curl/curl-ca-bundle.crt', + // OS X macports, curl-ca-bundle package + '/usr/local/share/curl/curl-ca-bundle.crt', + // Default cURL CA bunde path (without --with-ca-bundle option) + '/usr/share/ssl/certs/ca-bundle.crt', + // Really old RedHat? + '/etc/ssl/cert.pem', + // OpenBSD + '/usr/local/etc/ssl/cert.pem', + // FreeBSD 10.x + '/usr/local/etc/openssl/cert.pem', + ); + foreach ($caBundlePaths as $caBundle) { + if (@\is_readable($caBundle) && static::validateCaFile($caBundle, $logger)) { + return self::$caPath = $caBundle; + } + } + foreach ($caBundlePaths as $caBundle) { + $caBundle = \dirname($caBundle); + if (@\is_dir($caBundle) && \glob($caBundle . '/*')) { + return self::$caPath = $caBundle; + } + } + return self::$caPath = static::getBundledCaBundlePath(); + // Bundled CA file, last resort + } + /** + * Returns the path to the bundled CA file + * + * In case you don't want to trust the user or the system, you can use this directly + * + * @return string path to a CA bundle file + */ + public static function getBundledCaBundlePath() + { + $caBundleFile = __DIR__ . '/../res/cacert.pem'; + // cURL does not understand 'phar://' paths + // see https://github.com/composer/ca-bundle/issues/10 + if (0 === \strpos($caBundleFile, 'phar://')) { + \file_put_contents($tempCaBundleFile = \tempnam(\sys_get_temp_dir(), 'openssl-ca-bundle-'), \file_get_contents($caBundleFile)); + \register_shutdown_function(function () use($tempCaBundleFile) { + @\unlink($tempCaBundleFile); + }); + $caBundleFile = $tempCaBundleFile; + } + return $caBundleFile; + } + /** + * Validates a CA file using opensl_x509_parse only if it is safe to use + * + * @param string $filename + * @param LoggerInterface $logger optional logger for information about which CA files were loaded + * + * @return bool + */ + public static function validateCaFile($filename, \_PhpScoper5bbb1f4b001f3\Psr\Log\LoggerInterface $logger = null) + { + static $warned = \false; + if (isset(self::$caFileValidity[$filename])) { + return self::$caFileValidity[$filename]; + } + $contents = \file_get_contents($filename); + // assume the CA is valid if php is vulnerable to + // https://www.sektioneins.de/advisories/advisory-012013-php-openssl_x509_parse-memory-corruption-vulnerability.html + if (!static::isOpensslParseSafe()) { + if (!$warned && $logger) { + $logger->warning(\sprintf('Your version of PHP, %s, is affected by CVE-2013-6420 and cannot safely perform certificate validation, we strongly suggest you upgrade.', \PHP_VERSION)); + $warned = \true; + } + $isValid = !empty($contents); + } else { + $isValid = (bool) \openssl_x509_parse($contents); + } + if ($logger) { + $logger->debug('Checked CA file ' . \realpath($filename) . ': ' . ($isValid ? 'valid' : 'invalid')); + } + return self::$caFileValidity[$filename] = $isValid; + } + /** + * Test if it is safe to use the PHP function openssl_x509_parse(). + * + * This checks if OpenSSL extensions is vulnerable to remote code execution + * via the exploit documented as CVE-2013-6420. + * + * @return bool + */ + public static function isOpensslParseSafe() + { + if (null !== self::$useOpensslParse) { + return self::$useOpensslParse; + } + if (\PHP_VERSION_ID >= 50600) { + return self::$useOpensslParse = \true; + } + // Vulnerable: + // PHP 5.3.0 - PHP 5.3.27 + // PHP 5.4.0 - PHP 5.4.22 + // PHP 5.5.0 - PHP 5.5.6 + if (\PHP_VERSION_ID < 50400 && \PHP_VERSION_ID >= 50328 || \PHP_VERSION_ID < 50500 && \PHP_VERSION_ID >= 50423 || \PHP_VERSION_ID < 50600 && \PHP_VERSION_ID >= 50507) { + // This version of PHP has the fix for CVE-2013-6420 applied. + return self::$useOpensslParse = \true; + } + if (\defined('PHP_WINDOWS_VERSION_BUILD')) { + // Windows is probably insecure in this case. + return self::$useOpensslParse = \false; + } + $compareDistroVersionPrefix = function ($prefix, $fixedVersion) { + $regex = '{^' . \preg_quote($prefix) . '([0-9]+)$}'; + if (\preg_match($regex, \PHP_VERSION, $m)) { + return (int) $m[1] >= $fixedVersion; + } + return \false; + }; + // Hard coded list of PHP distributions with the fix backported. + if ($compareDistroVersionPrefix('5.3.3-7+squeeze', 18) || $compareDistroVersionPrefix('5.4.4-14+deb7u', 7) || $compareDistroVersionPrefix('5.3.10-1ubuntu3.', 9)) { + return self::$useOpensslParse = \true; + } + // Symfony Process component is missing so we assume it is unsafe at this point + if (!\class_exists('_PhpScoper5bbb1f4b001f3\\Symfony\\Component\\Process\\PhpProcess')) { + return self::$useOpensslParse = \false; + } + // This is where things get crazy, because distros backport security + // fixes the chances are on NIX systems the fix has been applied but + // it's not possible to verify that from the PHP version. + // + // To verify exec a new PHP process and run the issue testcase with + // known safe input that replicates the bug. + // Based on testcase in https://github.com/php/php-src/commit/c1224573c773b6845e83505f717fbf820fc18415 + // changes in https://github.com/php/php-src/commit/76a7fd893b7d6101300cc656058704a73254d593 + $cert = 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVwRENDQTR5Z0F3SUJBZ0lKQUp6dThyNnU2ZUJjTUEwR0NTcUdTSWIzRFFFQkJRVUFNSUhETVFzd0NRWUQKVlFRR0V3SkVSVEVjTUJvR0ExVUVDQXdUVG05eVpISm9aV2x1TFZkbGMzUm1ZV3hsYmpFUU1BNEdBMVVFQnd3SApTOE9Ed3Jac2JqRVVNQklHQTFVRUNnd0xVMlZyZEdsdmJrVnBibk14SHpBZEJnTlZCQXNNRmsxaGJHbGphVzkxCmN5QkRaWEowSUZObFkzUnBiMjR4SVRBZkJnTlZCQU1NR0cxaGJHbGphVzkxY3k1elpXdDBhVzl1WldsdWN5NWsKWlRFcU1DZ0dDU3FHU0liM0RRRUpBUlliYzNSbFptRnVMbVZ6YzJWeVFITmxhM1JwYjI1bGFXNXpMbVJsTUhVWQpaREU1TnpBd01UQXhNREF3TURBd1dnQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBCkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUEKQUFBQUFBQVhEVEUwTVRFeU9ERXhNemt6TlZvd2djTXhDekFKQmdOVkJBWVRBa1JGTVJ3d0dnWURWUVFJREJOTwpiM0prY21obGFXNHRWMlZ6ZEdaaGJHVnVNUkF3RGdZRFZRUUhEQWRMdzRQQ3RteHVNUlF3RWdZRFZRUUtEQXRUClpXdDBhVzl1UldsdWN6RWZNQjBHQTFVRUN3d1dUV0ZzYVdOcGIzVnpJRU5sY25RZ1UyVmpkR2x2YmpFaE1COEcKQTFVRUF3d1liV0ZzYVdOcGIzVnpMbk5sYTNScGIyNWxhVzV6TG1SbE1Tb3dLQVlKS29aSWh2Y05BUWtCRmh0egpkR1ZtWVc0dVpYTnpaWEpBYzJWcmRHbHZibVZwYm5NdVpHVXdnZ0VpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElCCkR3QXdnZ0VLQW9JQkFRRERBZjNobDdKWTBYY0ZuaXlFSnBTU0RxbjBPcUJyNlFQNjV1c0pQUnQvOFBhRG9xQnUKd0VZVC9OYSs2ZnNnUGpDMHVLOURaZ1dnMnRIV1dvYW5TYmxBTW96NVBINlorUzRTSFJaN2UyZERJalBqZGhqaAowbUxnMlVNTzV5cDBWNzk3R2dzOWxOdDZKUmZIODFNTjJvYlhXczROdHp0TE11RDZlZ3FwcjhkRGJyMzRhT3M4CnBrZHVpNVVhd1Raa3N5NXBMUEhxNWNNaEZHbTA2djY1Q0xvMFYyUGQ5K0tBb2tQclBjTjVLTEtlYno3bUxwazYKU01lRVhPS1A0aWRFcXh5UTdPN2ZCdUhNZWRzUWh1K3ByWTNzaTNCVXlLZlF0UDVDWm5YMmJwMHdLSHhYMTJEWAoxbmZGSXQ5RGJHdkhUY3lPdU4rblpMUEJtM3ZXeG50eUlJdlZBZ01CQUFHalFqQkFNQWtHQTFVZEV3UUNNQUF3CkVRWUpZSVpJQVliNFFnRUJCQVFEQWdlQU1Bc0dBMVVkRHdRRUF3SUZvREFUQmdOVkhTVUVEREFLQmdnckJnRUYKQlFjREFqQU5CZ2txaGtpRzl3MEJBUVVGQUFPQ0FRRUFHMGZaWVlDVGJkajFYWWMrMVNub2FQUit2SThDOENhRAo4KzBVWWhkbnlVNGdnYTBCQWNEclk5ZTk0ZUVBdTZacXljRjZGakxxWFhkQWJvcHBXb2NyNlQ2R0QxeDMzQ2tsClZBcnpHL0t4UW9oR0QySmVxa2hJTWxEb214SE83a2EzOStPYThpMnZXTFZ5alU4QVp2V01BcnVIYTRFRU55RzcKbFcyQWFnYUZLRkNyOVRuWFRmcmR4R1ZFYnY3S1ZRNmJkaGc1cDVTanBXSDErTXEwM3VSM1pYUEJZZHlWODMxOQpvMGxWajFLRkkyRENML2xpV2lzSlJvb2YrMWNSMzVDdGQwd1lCY3BCNlRac2xNY09QbDc2ZHdLd0pnZUpvMlFnClpzZm1jMnZDMS9xT2xOdU5xLzBUenprVkd2OEVUVDNDZ2FVK1VYZTRYT1Z2a2NjZWJKbjJkZz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K'; + $script = <<<'EOT' + +error_reporting(-1); +$info = openssl_x509_parse(base64_decode('%s')); +var_dump(PHP_VERSION, $info['issuer']['emailAddress'], $info['validFrom_time_t']); + +EOT; + $script = '<' . "?php\n" . \sprintf($script, $cert); + try { + $process = new \_PhpScoper5bbb1f4b001f3\Symfony\Component\Process\PhpProcess($script); + $process->mustRun(); + } catch (\Exception $e) { + // In the case of any exceptions just accept it is not possible to + // determine the safety of openssl_x509_parse and bail out. + return self::$useOpensslParse = \false; + } + $output = \preg_split('{\\r?\\n}', \trim($process->getOutput())); + $errorOutput = \trim($process->getErrorOutput()); + if (\count($output) === 3 && $output[0] === \sprintf('string(%d) "%s"', \strlen(\PHP_VERSION), \PHP_VERSION) && $output[1] === 'string(27) "stefan.esser@sektioneins.de"' && $output[2] === 'int(-1)' && \preg_match('{openssl_x509_parse\\(\\): illegal (?:ASN1 data type for|length in) timestamp in - on line \\d+}', $errorOutput)) { + // This PHP has the fix backported probably by a distro security team. + return self::$useOpensslParse = \true; + } + return self::$useOpensslParse = \false; + } + /** + * Resets the static caches + */ + public static function reset() + { + self::$caFileValidity = array(); + self::$caPath = null; + self::$useOpensslParse = null; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/composer/installed.json b/catalog/controller/payment/mollie-api-client/vendor/composer/installed.json new file mode 100644 index 00000000..38ffd3a7 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/composer/installed.json @@ -0,0 +1,299 @@ +[ + { + "name": "composer\/ca-bundle", + "version": "1.1.2", + "version_normalized": "1.1.2.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/composer\/ca-bundle.git", + "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/composer\/ca-bundle\/zipball\/46afded9720f40b9dc63542af4e3e43a1177acb0", + "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit\/phpunit": "^4.8.35 || ^5.7 || ^6.5", + "psr\/log": "^1.0", + "symfony\/process": "^2.5 || ^3.0 || ^4.0" + }, + "time": "2018-08-08T08:57:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http:\/\/seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ] + }, + { + "name": "guzzlehttp\/guzzle", + "version": "6.3.3", + "version_normalized": "6.3.3.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/guzzle\/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/guzzle\/guzzle\/zipball\/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "" + }, + "require": { + "guzzlehttp\/promises": "^1.0", + "guzzlehttp\/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit\/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr\/log": "^1.0" + }, + "suggest": { + "psr\/log": "Required for using the Log middleware" + }, + "time": "2018-04-22T15:46:56+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src\/functions_include.php" + ], + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\": "src\/" + } + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https:\/\/github.com\/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http:\/\/guzzlephp.org\/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ] + }, + { + "name": "guzzlehttp\/promises", + "version": "v1.3.1", + "version_normalized": "1.3.1.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/guzzle\/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/guzzle\/promises\/zipball\/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit\/phpunit": "^4.0" + }, + "time": "2016-12-20T10:07:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\": "src\/" + }, + "files": [ + "src\/functions_include.php" + ] + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https:\/\/github.com\/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ] + }, + { + "name": "guzzlehttp\/psr7", + "version": "1.4.2", + "version_normalized": "1.4.2.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/guzzle\/psr7.git", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/guzzle\/psr7\/zipball\/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr\/http-message": "~1.0" + }, + "provide": { + "psr\/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit\/phpunit": "~4.0" + }, + "time": "2017-03-20T17:10:46+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\": "src\/" + }, + "files": [ + "src\/functions_include.php" + ] + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https:\/\/github.com\/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https:\/\/github.com\/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "request", + "response", + "stream", + "uri", + "url" + ] + }, + { + "name": "psr\/http-message", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https:\/\/github.com\/php-fig\/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https:\/\/api.github.com\/repos\/php-fig\/http-message\/zipball\/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T14:39:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\": "src\/" + } + }, + "notification-url": "https:\/\/packagist.org\/downloads\/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http:\/\/www.php-fig.org\/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https:\/\/github.com\/php-fig\/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ] + } +] \ No newline at end of file diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/CHANGELOG.md b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/CHANGELOG.md new file mode 100644 index 00000000..17badd75 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/CHANGELOG.md @@ -0,0 +1,1287 @@ +# Change Log + +## 6.3.3 - 2018-04-22 + +* Fix: Default headers when decode_content is specified + + +## 6.3.2 - 2018-03-26 + +* Fix: Release process + + +## 6.3.1 - 2018-03-26 + +* Bug fix: Parsing 0 epoch expiry times in cookies [#2014](https://github.com/guzzle/guzzle/pull/2014) +* Improvement: Better ConnectException detection [#2012](https://github.com/guzzle/guzzle/pull/2012) +* Bug fix: Malformed domain that contains a "/" [#1999](https://github.com/guzzle/guzzle/pull/1999) +* Bug fix: Undefined offset when a cookie has no first key-value pair [#1998](https://github.com/guzzle/guzzle/pull/1998) +* Improvement: Support PHPUnit 6 [#1953](https://github.com/guzzle/guzzle/pull/1953) +* Bug fix: Support empty headers [#1915](https://github.com/guzzle/guzzle/pull/1915) +* Bug fix: Ignore case during header modifications [#1916](https://github.com/guzzle/guzzle/pull/1916) + ++ Minor code cleanups, documentation fixes and clarifications. + + +## 6.3.0 - 2017-06-22 + +* Feature: force IP resolution (ipv4 or ipv6) [#1608](https://github.com/guzzle/guzzle/pull/1608), [#1659](https://github.com/guzzle/guzzle/pull/1659) +* Improvement: Don't include summary in exception message when body is empty [#1621](https://github.com/guzzle/guzzle/pull/1621) +* Improvement: Handle `on_headers` option in MockHandler [#1580](https://github.com/guzzle/guzzle/pull/1580) +* Improvement: Added SUSE Linux CA path [#1609](https://github.com/guzzle/guzzle/issues/1609) +* Improvement: Use class reference for getting the name of the class instead of using hardcoded strings [#1641](https://github.com/guzzle/guzzle/pull/1641) +* Feature: Added `read_timeout` option [#1611](https://github.com/guzzle/guzzle/pull/1611) +* Bug fix: PHP 7.x fixes [#1685](https://github.com/guzzle/guzzle/pull/1685), [#1686](https://github.com/guzzle/guzzle/pull/1686), [#1811](https://github.com/guzzle/guzzle/pull/1811) +* Deprecation: BadResponseException instantiation without a response [#1642](https://github.com/guzzle/guzzle/pull/1642) +* Feature: Added NTLM auth [#1569](https://github.com/guzzle/guzzle/pull/1569) +* Feature: Track redirect HTTP status codes [#1711](https://github.com/guzzle/guzzle/pull/1711) +* Improvement: Check handler type during construction [#1745](https://github.com/guzzle/guzzle/pull/1745) +* Improvement: Always include the Content-Length if there's a body [#1721](https://github.com/guzzle/guzzle/pull/1721) +* Feature: Added convenience method to access a cookie by name [#1318](https://github.com/guzzle/guzzle/pull/1318) +* Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684) +* Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827) + + ++ Minor code cleanups, documentation fixes and clarifications. + +## 6.2.3 - 2017-02-28 + +* Fix deprecations with guzzle/psr7 version 1.4 + +## 6.2.2 - 2016-10-08 + +* Allow to pass nullable Response to delay callable +* Only add scheme when host is present +* Fix drain case where content-length is the literal string zero +* Obfuscate in-URL credentials in exceptions + +## 6.2.1 - 2016-07-18 + +* Address HTTP_PROXY security vulnerability, CVE-2016-5385: + https://httpoxy.org/ +* Fixing timeout bug with StreamHandler: + https://github.com/guzzle/guzzle/pull/1488 +* Only read up to `Content-Length` in PHP StreamHandler to avoid timeouts when + a server does not honor `Connection: close`. +* Ignore URI fragment when sending requests. + +## 6.2.0 - 2016-03-21 + +* Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`. + https://github.com/guzzle/guzzle/pull/1389 +* Bug fix: Fix sleep calculation when waiting for delayed requests. + https://github.com/guzzle/guzzle/pull/1324 +* Feature: More flexible history containers. + https://github.com/guzzle/guzzle/pull/1373 +* Bug fix: defer sink stream opening in StreamHandler. + https://github.com/guzzle/guzzle/pull/1377 +* Bug fix: do not attempt to escape cookie values. + https://github.com/guzzle/guzzle/pull/1406 +* Feature: report original content encoding and length on decoded responses. + https://github.com/guzzle/guzzle/pull/1409 +* Bug fix: rewind seekable request bodies before dispatching to cURL. + https://github.com/guzzle/guzzle/pull/1422 +* Bug fix: provide an empty string to `http_build_query` for HHVM workaround. + https://github.com/guzzle/guzzle/pull/1367 + +## 6.1.1 - 2015-11-22 + +* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler + https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4 +* Feature: HandlerStack is now more generic. + https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e +* Bug fix: setting verify to false in the StreamHandler now disables peer + verification. https://github.com/guzzle/guzzle/issues/1256 +* Feature: Middleware now uses an exception factory, including more error + context. https://github.com/guzzle/guzzle/pull/1282 +* Feature: better support for disabled functions. + https://github.com/guzzle/guzzle/pull/1287 +* Bug fix: fixed regression where MockHandler was not using `sink`. + https://github.com/guzzle/guzzle/pull/1292 + +## 6.1.0 - 2015-09-08 + +* Feature: Added the `on_stats` request option to provide access to transfer + statistics for requests. https://github.com/guzzle/guzzle/pull/1202 +* Feature: Added the ability to persist session cookies in CookieJars. + https://github.com/guzzle/guzzle/pull/1195 +* Feature: Some compatibility updates for Google APP Engine + https://github.com/guzzle/guzzle/pull/1216 +* Feature: Added support for NO_PROXY to prevent the use of a proxy based on + a simple set of rules. https://github.com/guzzle/guzzle/pull/1197 +* Feature: Cookies can now contain square brackets. + https://github.com/guzzle/guzzle/pull/1237 +* Bug fix: Now correctly parsing `=` inside of quotes in Cookies. + https://github.com/guzzle/guzzle/pull/1232 +* Bug fix: Cusotm cURL options now correctly override curl options of the + same name. https://github.com/guzzle/guzzle/pull/1221 +* Bug fix: Content-Type header is now added when using an explicitly provided + multipart body. https://github.com/guzzle/guzzle/pull/1218 +* Bug fix: Now ignoring Set-Cookie headers that have no name. +* Bug fix: Reason phrase is no longer cast to an int in some cases in the + cURL handler. https://github.com/guzzle/guzzle/pull/1187 +* Bug fix: Remove the Authorization header when redirecting if the Host + header changes. https://github.com/guzzle/guzzle/pull/1207 +* Bug fix: Cookie path matching fixes + https://github.com/guzzle/guzzle/issues/1129 +* Bug fix: Fixing the cURL `body_as_string` setting + https://github.com/guzzle/guzzle/pull/1201 +* Bug fix: quotes are no longer stripped when parsing cookies. + https://github.com/guzzle/guzzle/issues/1172 +* Bug fix: `form_params` and `query` now always uses the `&` separator. + https://github.com/guzzle/guzzle/pull/1163 +* Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set. + https://github.com/guzzle/guzzle/pull/1189 + +## 6.0.2 - 2015-07-04 + +* Fixed a memory leak in the curl handlers in which references to callbacks + were not being removed by `curl_reset`. +* Cookies are now extracted properly before redirects. +* Cookies now allow more character ranges. +* Decoded Content-Encoding responses are now modified to correctly reflect + their state if the encoding was automatically removed by a handler. This + means that the `Content-Encoding` header may be removed an the + `Content-Length` modified to reflect the message size after removing the + encoding. +* Added a more explicit error message when trying to use `form_params` and + `multipart` in the same request. +* Several fixes for HHVM support. +* Functions are now conditionally required using an additional level of + indirection to help with global Composer installations. + +## 6.0.1 - 2015-05-27 + +* Fixed a bug with serializing the `query` request option where the `&` + separator was missing. +* Added a better error message for when `body` is provided as an array. Please + use `form_params` or `multipart` instead. +* Various doc fixes. + +## 6.0.0 - 2015-05-26 + +* See the UPGRADING.md document for more information. +* Added `multipart` and `form_params` request options. +* Added `synchronous` request option. +* Added the `on_headers` request option. +* Fixed `expect` handling. +* No longer adding default middlewares in the client ctor. These need to be + present on the provided handler in order to work. +* Requests are no longer initiated when sending async requests with the + CurlMultiHandler. This prevents unexpected recursion from requests completing + while ticking the cURL loop. +* Removed the semantics of setting `default` to `true`. This is no longer + required now that the cURL loop is not ticked for async requests. +* Added request and response logging middleware. +* No longer allowing self signed certificates when using the StreamHandler. +* Ensuring that `sink` is valid if saving to a file. +* Request exceptions now include a "handler context" which provides handler + specific contextual information. +* Added `GuzzleHttp\RequestOptions` to allow request options to be applied + using constants. +* `$maxHandles` has been removed from CurlMultiHandler. +* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package. + +## 5.3.0 - 2015-05-19 + +* Mock now supports `save_to` +* Marked `AbstractRequestEvent::getTransaction()` as public. +* Fixed a bug in which multiple headers using different casing would overwrite + previous headers in the associative array. +* Added `Utils::getDefaultHandler()` +* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated. +* URL scheme is now always lowercased. + +## 6.0.0-beta.1 + +* Requires PHP >= 5.5 +* Updated to use PSR-7 + * Requires immutable messages, which basically means an event based system + owned by a request instance is no longer possible. + * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7). + * Removed the dependency on `guzzlehttp/streams`. These stream abstractions + are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7` + namespace. +* Added middleware and handler system + * Replaced the Guzzle event and subscriber system with a middleware system. + * No longer depends on RingPHP, but rather places the HTTP handlers directly + in Guzzle, operating on PSR-7 messages. + * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which + means the `guzzlehttp/retry-subscriber` is now obsolete. + * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`. +* Asynchronous responses + * No longer supports the `future` request option to send an async request. + Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`, + `getAsync`, etc.). + * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid + recursion required by chaining and forwarding react promises. See + https://github.com/guzzle/promises + * Added `requestAsync` and `sendAsync` to send request asynchronously. + * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests + asynchronously. +* Request options + * POST and form updates + * Added the `form_fields` and `form_files` request options. + * Removed the `GuzzleHttp\Post` namespace. + * The `body` request option no longer accepts an array for POST requests. + * The `exceptions` request option has been deprecated in favor of the + `http_errors` request options. + * The `save_to` request option has been deprecated in favor of `sink` request + option. +* Clients no longer accept an array of URI template string and variables for + URI variables. You will need to expand URI templates before passing them + into a client constructor or request method. +* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are + now magic methods that will send synchronous requests. +* Replaced `Utils.php` with plain functions in `functions.php`. +* Removed `GuzzleHttp\Collection`. +* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as + an array. +* Removed `GuzzleHttp\Query`. Query string handling is now handled using an + associative array passed into the `query` request option. The query string + is serialized using PHP's `http_build_query`. If you need more control, you + can pass the query string in as a string. +* `GuzzleHttp\QueryParser` has been replaced with the + `GuzzleHttp\Psr7\parse_query`. + +## 5.2.0 - 2015-01-27 + +* Added `AppliesHeadersInterface` to make applying headers to a request based + on the body more generic and not specific to `PostBodyInterface`. +* Reduced the number of stack frames needed to send requests. +* Nested futures are now resolved in the client rather than the RequestFsm +* Finishing state transitions is now handled in the RequestFsm rather than the + RingBridge. +* Added a guard in the Pool class to not use recursion for request retries. + +## 5.1.0 - 2014-12-19 + +* Pool class no longer uses recursion when a request is intercepted. +* The size of a Pool can now be dynamically adjusted using a callback. + See https://github.com/guzzle/guzzle/pull/943. +* Setting a request option to `null` when creating a request with a client will + ensure that the option is not set. This allows you to overwrite default + request options on a per-request basis. + See https://github.com/guzzle/guzzle/pull/937. +* Added the ability to limit which protocols are allowed for redirects by + specifying a `protocols` array in the `allow_redirects` request option. +* Nested futures due to retries are now resolved when waiting for synchronous + responses. See https://github.com/guzzle/guzzle/pull/947. +* `"0"` is now an allowed URI path. See + https://github.com/guzzle/guzzle/pull/935. +* `Query` no longer typehints on the `$query` argument in the constructor, + allowing for strings and arrays. +* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle + specific exceptions if necessary. + +## 5.0.3 - 2014-11-03 + +This change updates query strings so that they are treated as un-encoded values +by default where the value represents an un-encoded value to send over the +wire. A Query object then encodes the value before sending over the wire. This +means that even value query string values (e.g., ":") are url encoded. This +makes the Query class match PHP's http_build_query function. However, if you +want to send requests over the wire using valid query string characters that do +not need to be encoded, then you can provide a string to Url::setQuery() and +pass true as the second argument to specify that the query string is a raw +string that should not be parsed or encoded (unless a call to getQuery() is +subsequently made, forcing the query-string to be converted into a Query +object). + +## 5.0.2 - 2014-10-30 + +* Added a trailing `\r\n` to multipart/form-data payloads. See + https://github.com/guzzle/guzzle/pull/871 +* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs. +* Status codes are now returned as integers. See + https://github.com/guzzle/guzzle/issues/881 +* No longer overwriting an existing `application/x-www-form-urlencoded` header + when sending POST requests, allowing for customized headers. See + https://github.com/guzzle/guzzle/issues/877 +* Improved path URL serialization. + + * No longer double percent-encoding characters in the path or query string if + they are already encoded. + * Now properly encoding the supplied path to a URL object, instead of only + encoding ' ' and '?'. + * Note: This has been changed in 5.0.3 to now encode query string values by + default unless the `rawString` argument is provided when setting the query + string on a URL: Now allowing many more characters to be present in the + query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A + +## 5.0.1 - 2014-10-16 + +Bugfix release. + +* Fixed an issue where connection errors still returned response object in + error and end events event though the response is unusable. This has been + corrected so that a response is not returned in the `getResponse` method of + these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867 +* Fixed an issue where transfer statistics were not being populated in the + RingBridge. https://github.com/guzzle/guzzle/issues/866 + +## 5.0.0 - 2014-10-12 + +Adding support for non-blocking responses and some minor API cleanup. + +### New Features + +* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`. +* Added a public API for creating a default HTTP adapter. +* Updated the redirect plugin to be non-blocking so that redirects are sent + concurrently. Other plugins like this can now be updated to be non-blocking. +* Added a "progress" event so that you can get upload and download progress + events. +* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers + requests concurrently using a capped pool size as efficiently as possible. +* Added `hasListeners()` to EmitterInterface. +* Removed `GuzzleHttp\ClientInterface::sendAll` and marked + `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the + recommended way). + +### Breaking changes + +The breaking changes in this release are relatively minor. The biggest thing to +look out for is that request and response objects no longer implement fluent +interfaces. + +* Removed the fluent interfaces (i.e., `return $this`) from requests, + responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`, + `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and + `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of + why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/. + This also makes the Guzzle message interfaces compatible with the current + PSR-7 message proposal. +* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except + for the HTTP request functions from function.php, these functions are now + implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode` + moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to + `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to + `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be + `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php + caused problems for many users: they aren't PSR-4 compliant, require an + explicit include, and needed an if-guard to ensure that the functions are not + declared multiple times. +* Rewrote adapter layer. + * Removing all classes from `GuzzleHttp\Adapter`, these are now + implemented as callables that are stored in `GuzzleHttp\Ring\Client`. + * Removed the concept of "parallel adapters". Sending requests serially or + concurrently is now handled using a single adapter. + * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The + Transaction object now exposes the request, response, and client as public + properties. The getters and setters have been removed. +* Removed the "headers" event. This event was only useful for changing the + body a response once the headers of the response were known. You can implement + a similar behavior in a number of ways. One example might be to use a + FnStream that has access to the transaction being sent. For example, when the + first byte is written, you could check if the response headers match your + expectations, and if so, change the actual stream body that is being + written to. +* Removed the `asArray` parameter from + `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header + value as an array, then use the newly added `getHeaderAsArray()` method of + `MessageInterface`. This change makes the Guzzle interfaces compatible with + the PSR-7 interfaces. +* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add + custom request options using double-dispatch (this was an implementation + detail). Instead, you should now provide an associative array to the + constructor which is a mapping of the request option name mapping to a + function that applies the option value to a request. +* Removed the concept of "throwImmediately" from exceptions and error events. + This control mechanism was used to stop a transfer of concurrent requests + from completing. This can now be handled by throwing the exception or by + cancelling a pool of requests or each outstanding future request individually. +* Updated to "GuzzleHttp\Streams" 3.0. + * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a + `maxLen` parameter. This update makes the Guzzle streams project + compatible with the current PSR-7 proposal. + * `GuzzleHttp\Stream\Stream::__construct`, + `GuzzleHttp\Stream\Stream::factory`, and + `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second + argument. They now accept an associative array of options, including the + "size" key and "metadata" key which can be used to provide custom metadata. + +## 4.2.2 - 2014-09-08 + +* Fixed a memory leak in the CurlAdapter when reusing cURL handles. +* No longer using `request_fulluri` in stream adapter proxies. +* Relative redirects are now based on the last response, not the first response. + +## 4.2.1 - 2014-08-19 + +* Ensuring that the StreamAdapter does not always add a Content-Type header +* Adding automated github releases with a phar and zip + +## 4.2.0 - 2014-08-17 + +* Now merging in default options using a case-insensitive comparison. + Closes https://github.com/guzzle/guzzle/issues/767 +* Added the ability to automatically decode `Content-Encoding` response bodies + using the `decode_content` request option. This is set to `true` by default + to decode the response body if it comes over the wire with a + `Content-Encoding`. Set this value to `false` to disable decoding the + response content, and pass a string to provide a request `Accept-Encoding` + header and turn on automatic response decoding. This feature now allows you + to pass an `Accept-Encoding` header in the headers of a request but still + disable automatic response decoding. + Closes https://github.com/guzzle/guzzle/issues/764 +* Added the ability to throw an exception immediately when transferring + requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760 +* Updating guzzlehttp/streams dependency to ~2.1 +* No longer utilizing the now deprecated namespaced methods from the stream + package. + +## 4.1.8 - 2014-08-14 + +* Fixed an issue in the CurlFactory that caused setting the `stream=false` + request option to throw an exception. + See: https://github.com/guzzle/guzzle/issues/769 +* TransactionIterator now calls rewind on the inner iterator. + See: https://github.com/guzzle/guzzle/pull/765 +* You can now set the `Content-Type` header to `multipart/form-data` + when creating POST requests to force multipart bodies. + See https://github.com/guzzle/guzzle/issues/768 + +## 4.1.7 - 2014-08-07 + +* Fixed an error in the HistoryPlugin that caused the same request and response + to be logged multiple times when an HTTP protocol error occurs. +* Ensuring that cURL does not add a default Content-Type when no Content-Type + has been supplied by the user. This prevents the adapter layer from modifying + the request that is sent over the wire after any listeners may have already + put the request in a desired state (e.g., signed the request). +* Throwing an exception when you attempt to send requests that have the + "stream" set to true in parallel using the MultiAdapter. +* Only calling curl_multi_select when there are active cURL handles. This was + previously changed and caused performance problems on some systems due to PHP + always selecting until the maximum select timeout. +* Fixed a bug where multipart/form-data POST fields were not correctly + aggregated (e.g., values with "&"). + +## 4.1.6 - 2014-08-03 + +* Added helper methods to make it easier to represent messages as strings, + including getting the start line and getting headers as a string. + +## 4.1.5 - 2014-08-02 + +* Automatically retrying cURL "Connection died, retrying a fresh connect" + errors when possible. +* cURL implementation cleanup +* Allowing multiple event subscriber listeners to be registered per event by + passing an array of arrays of listener configuration. + +## 4.1.4 - 2014-07-22 + +* Fixed a bug that caused multi-part POST requests with more than one field to + serialize incorrectly. +* Paths can now be set to "0" +* `ResponseInterface::xml` now accepts a `libxml_options` option and added a + missing default argument that was required when parsing XML response bodies. +* A `save_to` stream is now created lazily, which means that files are not + created on disk unless a request succeeds. + +## 4.1.3 - 2014-07-15 + +* Various fixes to multipart/form-data POST uploads +* Wrapping function.php in an if-statement to ensure Guzzle can be used + globally and in a Composer install +* Fixed an issue with generating and merging in events to an event array +* POST headers are only applied before sending a request to allow you to change + the query aggregator used before uploading +* Added much more robust query string parsing +* Fixed various parsing and normalization issues with URLs +* Fixing an issue where multi-valued headers were not being utilized correctly + in the StreamAdapter + +## 4.1.2 - 2014-06-18 + +* Added support for sending payloads with GET requests + +## 4.1.1 - 2014-06-08 + +* Fixed an issue related to using custom message factory options in subclasses +* Fixed an issue with nested form fields in a multi-part POST +* Fixed an issue with using the `json` request option for POST requests +* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar` + +## 4.1.0 - 2014-05-27 + +* Added a `json` request option to easily serialize JSON payloads. +* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON. +* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`. +* Added the ability to provide an emitter to a client in the client constructor. +* Added the ability to persist a cookie session using $_SESSION. +* Added a trait that can be used to add event listeners to an iterator. +* Removed request method constants from RequestInterface. +* Fixed warning when invalid request start-lines are received. +* Updated MessageFactory to work with custom request option methods. +* Updated cacert bundle to latest build. + +4.0.2 (2014-04-16) +------------------ + +* Proxy requests using the StreamAdapter now properly use request_fulluri (#632) +* Added the ability to set scalars as POST fields (#628) + +## 4.0.1 - 2014-04-04 + +* The HTTP status code of a response is now set as the exception code of + RequestException objects. +* 303 redirects will now correctly switch from POST to GET requests. +* The default parallel adapter of a client now correctly uses the MultiAdapter. +* HasDataTrait now initializes the internal data array as an empty array so + that the toArray() method always returns an array. + +## 4.0.0 - 2014-03-29 + +* For more information on the 4.0 transition, see: + http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/ +* For information on changes and upgrading, see: + https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 +* Added `GuzzleHttp\batch()` as a convenience function for sending requests in + parallel without needing to write asynchronous code. +* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`. + You can now pass a callable or an array of associative arrays where each + associative array contains the "fn", "priority", and "once" keys. + +## 4.0.0.rc-2 - 2014-03-25 + +* Removed `getConfig()` and `setConfig()` from clients to avoid confusion + around whether things like base_url, message_factory, etc. should be able to + be retrieved or modified. +* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface +* functions.php functions were renamed using snake_case to match PHP idioms +* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and + `GUZZLE_CURL_SELECT_TIMEOUT` environment variables +* Added the ability to specify custom `sendAll()` event priorities +* Added the ability to specify custom stream context options to the stream + adapter. +* Added a functions.php function for `get_path()` and `set_path()` +* CurlAdapter and MultiAdapter now use a callable to generate curl resources +* MockAdapter now properly reads a body and emits a `headers` event +* Updated Url class to check if a scheme and host are set before adding ":" + and "//". This allows empty Url (e.g., "") to be serialized as "". +* Parsing invalid XML no longer emits warnings +* Curl classes now properly throw AdapterExceptions +* Various performance optimizations +* Streams are created with the faster `Stream\create()` function +* Marked deprecation_proxy() as internal +* Test server is now a collection of static methods on a class + +## 4.0.0-rc.1 - 2014-03-15 + +* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 + +## 3.8.1 - 2014-01-28 + +* Bug: Always using GET requests when redirecting from a 303 response +* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in + `Guzzle\Http\ClientInterface::setSslVerification()` +* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL +* Bug: The body of a request can now be set to `"0"` +* Sending PHP stream requests no longer forces `HTTP/1.0` +* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of + each sub-exception +* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than + clobbering everything). +* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) +* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. + For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. +* Now properly escaping the regular expression delimiter when matching Cookie domains. +* Network access is now disabled when loading XML documents + +## 3.8.0 - 2013-12-05 + +* Added the ability to define a POST name for a file +* JSON response parsing now properly walks additionalProperties +* cURL error code 18 is now retried automatically in the BackoffPlugin +* Fixed a cURL error when URLs contain fragments +* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were + CurlExceptions +* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) +* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` +* Fixed a bug that was encountered when parsing empty header parameters +* UriTemplate now has a `setRegex()` method to match the docs +* The `debug` request parameter now checks if it is truthy rather than if it exists +* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin +* Added the ability to combine URLs using strict RFC 3986 compliance +* Command objects can now return the validation errors encountered by the command +* Various fixes to cache revalidation (#437 and 29797e5) +* Various fixes to the AsyncPlugin +* Cleaned up build scripts + +## 3.7.4 - 2013-10-02 + +* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430) +* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp + (see https://github.com/aws/aws-sdk-php/issues/147) +* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots +* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) +* Updated the bundled cacert.pem (#419) +* OauthPlugin now supports adding authentication to headers or query string (#425) + +## 3.7.3 - 2013-09-08 + +* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and + `CommandTransferException`. +* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description +* Schemas are only injected into response models when explicitly configured. +* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of + an EntityBody. +* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. +* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. +* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() +* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin +* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests +* Bug fix: Properly parsing headers that contain commas contained in quotes +* Bug fix: mimetype guessing based on a filename is now case-insensitive + +## 3.7.2 - 2013-08-02 + +* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander + See https://github.com/guzzle/guzzle/issues/371 +* Bug fix: Cookie domains are now matched correctly according to RFC 6265 + See https://github.com/guzzle/guzzle/issues/377 +* Bug fix: GET parameters are now used when calculating an OAuth signature +* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted +* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched +* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. + See https://github.com/guzzle/guzzle/issues/379 +* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See + https://github.com/guzzle/guzzle/pull/380 +* cURL multi cleanup and optimizations + +## 3.7.1 - 2013-07-05 + +* Bug fix: Setting default options on a client now works +* Bug fix: Setting options on HEAD requests now works. See #352 +* Bug fix: Moving stream factory before send event to before building the stream. See #353 +* Bug fix: Cookies no longer match on IP addresses per RFC 6265 +* Bug fix: Correctly parsing header parameters that are in `<>` and quotes +* Added `cert` and `ssl_key` as request options +* `Host` header can now diverge from the host part of a URL if the header is set manually +* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter +* OAuth parameters are only added via the plugin if they aren't already set +* Exceptions are now thrown when a URL cannot be parsed +* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails +* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin + +## 3.7.0 - 2013-06-10 + +* See UPGRADING.md for more information on how to upgrade. +* Requests now support the ability to specify an array of $options when creating a request to more easily modify a + request. You can pass a 'request.options' configuration setting to a client to apply default request options to + every request created by a client (e.g. default query string variables, headers, curl options, etc.). +* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. + See `Guzzle\Http\StaticClient::mount`. +* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests + created by a command (e.g. custom headers, query string variables, timeout settings, etc.). +* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the + headers of a response +* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key + (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) +* ServiceBuilders now support storing and retrieving arbitrary data +* CachePlugin can now purge all resources for a given URI +* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource +* CachePlugin now uses the Vary header to determine if a resource is a cache hit +* `Guzzle\Http\Message\Response` now implements `\Serializable` +* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters +* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable +* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` +* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size +* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message +* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older + Symfony users can still use the old version of Monolog. +* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. + Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. +* Several performance improvements to `Guzzle\Common\Collection` +* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: + createRequest, head, delete, put, patch, post, options, prepareRequest +* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` +* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` +* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to + `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a + resource, string, or EntityBody into the $options parameter to specify the download location of the response. +* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a + default `array()` +* Added `Guzzle\Stream\StreamInterface::isRepeatable` +* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use + $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or + $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. +* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. +* Removed `Guzzle\Http\ClientInterface::expandTemplate()` +* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` +* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` +* Removed `Guzzle\Http\Message\RequestInterface::canCache` +* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` +* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` +* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. +* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting + `Guzzle\Common\Version::$emitWarnings` to true. +* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use + `$request->getResponseBody()->isRepeatable()` instead. +* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use + `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use + `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. +* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. +* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated +* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. + These will work through Guzzle 4.0 +* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. +* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. +* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. +* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. +* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. +* Marked `Guzzle\Common\Collection::inject()` as deprecated. +* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` +* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a + CacheStorageInterface. These two objects and interface will be removed in a future version. +* Always setting X-cache headers on cached responses +* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin +* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface + $request, Response $response);` +* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` +* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` +* Added `CacheStorageInterface::purge($url)` +* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin + $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, + CanCacheStrategyInterface $canCache = null)` +* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` + +## 3.6.0 - 2013-05-29 + +* ServiceDescription now implements ToArrayInterface +* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters +* Guzzle can now correctly parse incomplete URLs +* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. +* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution +* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). +* Specific header implementations can be created for complex headers. When a message creates a header, it uses a + HeaderFactory which can map specific headers to specific header classes. There is now a Link header and + CacheControl header implementation. +* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate +* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() +* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in + Guzzle\Http\Curl\RequestMediator +* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. +* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface +* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() +* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() +* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). +* All response header helper functions return a string rather than mixing Header objects and strings inconsistently +* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle + directly via interfaces +* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist + but are a no-op until removed. +* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a + `Guzzle\Service\Command\ArrayCommandInterface`. +* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response + on a request while the request is still being transferred +* The ability to case-insensitively search for header values +* Guzzle\Http\Message\Header::hasExactHeader +* Guzzle\Http\Message\Header::raw. Use getAll() +* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object + instead. +* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess +* Added the ability to cast Model objects to a string to view debug information. + +## 3.5.0 - 2013-05-13 + +* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times +* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove + itself from the EventDispatcher) +* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values +* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too +* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a + non-existent key +* Bug: All __call() method arguments are now required (helps with mocking frameworks) +* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference + to help with refcount based garbage collection of resources created by sending a request +* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. +* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the + HistoryPlugin for a history. +* Added a `responseBody` alias for the `response_body` location +* Refactored internals to no longer rely on Response::getRequest() +* HistoryPlugin can now be cast to a string +* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests + and responses that are sent over the wire +* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects + +## 3.4.3 - 2013-04-30 + +* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response +* Added a check to re-extract the temp cacert bundle from the phar before sending each request + +## 3.4.2 - 2013-04-29 + +* Bug fix: Stream objects now work correctly with "a" and "a+" modes +* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present +* Bug fix: AsyncPlugin no longer forces HEAD requests +* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter +* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails +* Setting a response on a request will write to the custom request body from the response body if one is specified +* LogPlugin now writes to php://output when STDERR is undefined +* Added the ability to set multiple POST files for the same key in a single call +* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default +* Added the ability to queue CurlExceptions to the MockPlugin +* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send) +* Configuration loading now allows remote files + +## 3.4.1 - 2013-04-16 + +* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti + handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost. +* Exceptions are now properly grouped when sending requests in parallel +* Redirects are now properly aggregated when a multi transaction fails +* Redirects now set the response on the original object even in the event of a failure +* Bug fix: Model names are now properly set even when using $refs +* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax +* Added support for oauth_callback in OAuth signatures +* Added support for oauth_verifier in OAuth signatures +* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection + +## 3.4.0 - 2013-04-11 + +* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289 +* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 +* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 +* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. +* Bug fix: Added `number` type to service descriptions. +* Bug fix: empty parameters are removed from an OAuth signature +* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header +* Bug fix: Fixed "array to string" error when validating a union of types in a service description +* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream +* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. +* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. +* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. +* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if + the Content-Type can be determined based on the entity body or the path of the request. +* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. +* Added support for a PSR-3 LogAdapter. +* Added a `command.after_prepare` event +* Added `oauth_callback` parameter to the OauthPlugin +* Added the ability to create a custom stream class when using a stream factory +* Added a CachingEntityBody decorator +* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. +* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. +* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies +* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This + means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use + POST fields or files (the latter is only used when emulating a form POST in the browser). +* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest + +## 3.3.1 - 2013-03-10 + +* Added the ability to create PHP streaming responses from HTTP requests +* Bug fix: Running any filters when parsing response headers with service descriptions +* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing +* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across + response location visitors. +* Bug fix: Removed the possibility of creating configuration files with circular dependencies +* RequestFactory::create() now uses the key of a POST file when setting the POST file name +* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set + +## 3.3.0 - 2013-03-03 + +* A large number of performance optimizations have been made +* Bug fix: Added 'wb' as a valid write mode for streams +* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned +* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` +* BC: Removed `Guzzle\Http\Utils` class +* BC: Setting a service description on a client will no longer modify the client's command factories. +* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using + the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' +* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to + lowercase +* Operation parameter objects are now lazy loaded internally +* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses +* Added support for instantiating responseType=class responseClass classes. Classes must implement + `Guzzle\Service\Command\ResponseClassInterface` +* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These + additional properties also support locations and can be used to parse JSON responses where the outermost part of the + JSON is an array +* Added support for nested renaming of JSON models (rename sentAs to name) +* CachePlugin + * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error + * Debug headers can now added to cached response in the CachePlugin + +## 3.2.0 - 2013-02-14 + +* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients. +* URLs with no path no longer contain a "/" by default +* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. +* BadResponseException no longer includes the full request and response message +* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface +* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface +* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription +* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list +* xmlEncoding can now be customized for the XML declaration of a XML service description operation +* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value + aggregation and no longer uses callbacks +* The URL encoding implementation of Guzzle\Http\QueryString can now be customized +* Bug fix: Filters were not always invoked for array service description parameters +* Bug fix: Redirects now use a target response body rather than a temporary response body +* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded +* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives + +## 3.1.2 - 2013-01-27 + +* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the + response body. For example, the XmlVisitor now parses the XML response into an array in the before() method. +* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent +* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) +* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse() +* Setting default headers on a client after setting the user-agent will not erase the user-agent setting + +## 3.1.1 - 2013-01-20 + +* Adding wildcard support to Guzzle\Common\Collection::getPath() +* Adding alias support to ServiceBuilder configs +* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface + +## 3.1.0 - 2013-01-12 + +* BC: CurlException now extends from RequestException rather than BadResponseException +* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() +* Added getData to ServiceDescriptionInterface +* Added context array to RequestInterface::setState() +* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http +* Bug: Adding required content-type when JSON request visitor adds JSON to a command +* Bug: Fixing the serialization of a service description with custom data +* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing + an array of successful and failed responses +* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection +* Added Guzzle\Http\IoEmittingEntityBody +* Moved command filtration from validators to location visitors +* Added `extends` attributes to service description parameters +* Added getModels to ServiceDescriptionInterface + +## 3.0.7 - 2012-12-19 + +* Fixing phar detection when forcing a cacert to system if null or true +* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()` +* Cleaning up `Guzzle\Common\Collection::inject` method +* Adding a response_body location to service descriptions + +## 3.0.6 - 2012-12-09 + +* CurlMulti performance improvements +* Adding setErrorResponses() to Operation +* composer.json tweaks + +## 3.0.5 - 2012-11-18 + +* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin +* Bug: Response body can now be a string containing "0" +* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert +* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs +* Added support for XML attributes in service description responses +* DefaultRequestSerializer now supports array URI parameter values for URI template expansion +* Added better mimetype guessing to requests and post files + +## 3.0.4 - 2012-11-11 + +* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value +* Bug: Cookies can now be added that have a name, domain, or value set to "0" +* Bug: Using the system cacert bundle when using the Phar +* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures +* Enhanced cookie jar de-duplication +* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added +* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies +* Added the ability to create any sort of hash for a stream rather than just an MD5 hash + +## 3.0.3 - 2012-11-04 + +* Implementing redirects in PHP rather than cURL +* Added PECL URI template extension and using as default parser if available +* Bug: Fixed Content-Length parsing of Response factory +* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. +* Adding ToArrayInterface throughout library +* Fixing OauthPlugin to create unique nonce values per request + +## 3.0.2 - 2012-10-25 + +* Magic methods are enabled by default on clients +* Magic methods return the result of a command +* Service clients no longer require a base_url option in the factory +* Bug: Fixed an issue with URI templates where null template variables were being expanded + +## 3.0.1 - 2012-10-22 + +* Models can now be used like regular collection objects by calling filter, map, etc. +* Models no longer require a Parameter structure or initial data in the constructor +* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator` + +## 3.0.0 - 2012-10-15 + +* Rewrote service description format to be based on Swagger + * Now based on JSON schema + * Added nested input structures and nested response models + * Support for JSON and XML input and output models + * Renamed `commands` to `operations` + * Removed dot class notation + * Removed custom types +* Broke the project into smaller top-level namespaces to be more component friendly +* Removed support for XML configs and descriptions. Use arrays or JSON files. +* Removed the Validation component and Inspector +* Moved all cookie code to Guzzle\Plugin\Cookie +* Magic methods on a Guzzle\Service\Client now return the command un-executed. +* Calling getResult() or getResponse() on a command will lazily execute the command if needed. +* Now shipping with cURL's CA certs and using it by default +* Added previousResponse() method to response objects +* No longer sending Accept and Accept-Encoding headers on every request +* Only sending an Expect header by default when a payload is greater than 1MB +* Added/moved client options: + * curl.blacklist to curl.option.blacklist + * Added ssl.certificate_authority +* Added a Guzzle\Iterator component +* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin +* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) +* Added a more robust caching plugin +* Added setBody to response objects +* Updating LogPlugin to use a more flexible MessageFormatter +* Added a completely revamped build process +* Cleaning up Collection class and removing default values from the get method +* Fixed ZF2 cache adapters + +## 2.8.8 - 2012-10-15 + +* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did + +## 2.8.7 - 2012-09-30 + +* Bug: Fixed config file aliases for JSON includes +* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests +* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload +* Bug: Hardening request and response parsing to account for missing parts +* Bug: Fixed PEAR packaging +* Bug: Fixed Request::getInfo +* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail +* Adding the ability for the namespace Iterator factory to look in multiple directories +* Added more getters/setters/removers from service descriptions +* Added the ability to remove POST fields from OAuth signatures +* OAuth plugin now supports 2-legged OAuth + +## 2.8.6 - 2012-09-05 + +* Added the ability to modify and build service descriptions +* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command +* Added a `json` parameter location +* Now allowing dot notation for classes in the CacheAdapterFactory +* Using the union of two arrays rather than an array_merge when extending service builder services and service params +* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references + in service builder config files. +* Services defined in two different config files that include one another will by default replace the previously + defined service, but you can now create services that extend themselves and merge their settings over the previous +* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like + '_default' with a default JSON configuration file. + +## 2.8.5 - 2012-08-29 + +* Bug: Suppressed empty arrays from URI templates +* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching +* Added support for HTTP responses that do not contain a reason phrase in the start-line +* AbstractCommand commands are now invokable +* Added a way to get the data used when signing an Oauth request before a request is sent + +## 2.8.4 - 2012-08-15 + +* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin +* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable. +* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream +* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream +* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) +* Added additional response status codes +* Removed SSL information from the default User-Agent header +* DELETE requests can now send an entity body +* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries +* Added the ability of the MockPlugin to consume mocked request bodies +* LogPlugin now exposes request and response objects in the extras array + +## 2.8.3 - 2012-07-30 + +* Bug: Fixed a case where empty POST requests were sent as GET requests +* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body +* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new +* Added multiple inheritance to service description commands +* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()` +* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything +* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles + +## 2.8.2 - 2012-07-24 + +* Bug: Query string values set to 0 are no longer dropped from the query string +* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()` +* Bug: `+` is now treated as an encoded space when parsing query strings +* QueryString and Collection performance improvements +* Allowing dot notation for class paths in filters attribute of a service descriptions + +## 2.8.1 - 2012-07-16 + +* Loosening Event Dispatcher dependency +* POST redirects can now be customized using CURLOPT_POSTREDIR + +## 2.8.0 - 2012-07-15 + +* BC: Guzzle\Http\Query + * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl) + * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() + * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) + * Changed the aggregation functions of QueryString to be static methods + * Can now use fromString() with querystrings that have a leading ? +* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters +* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body +* Cookies are no longer URL decoded by default +* Bug: URI template variables set to null are no longer expanded + +## 2.7.2 - 2012-07-02 + +* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser. +* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty() +* CachePlugin now allows for a custom request parameter function to check if a request can be cached +* Bug fix: CachePlugin now only caches GET and HEAD requests by default +* Bug fix: Using header glue when transferring headers over the wire +* Allowing deeply nested arrays for composite variables in URI templates +* Batch divisors can now return iterators or arrays + +## 2.7.1 - 2012-06-26 + +* Minor patch to update version number in UA string +* Updating build process + +## 2.7.0 - 2012-06-25 + +* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes. +* BC: Removed magic setX methods from commands +* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method +* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. +* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) +* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace +* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin +* Added the ability to set POST fields and files in a service description +* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method +* Adding a command.before_prepare event to clients +* Added BatchClosureTransfer and BatchClosureDivisor +* BatchTransferException now includes references to the batch divisor and transfer strategies +* Fixed some tests so that they pass more reliably +* Added Guzzle\Common\Log\ArrayLogAdapter + +## 2.6.6 - 2012-06-10 + +* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin +* BC: Removing Guzzle\Service\Command\CommandSet +* Adding generic batching system (replaces the batch queue plugin and command set) +* Updating ZF cache and log adapters and now using ZF's composer repository +* Bug: Setting the name of each ApiParam when creating through an ApiCommand +* Adding result_type, result_doc, deprecated, and doc_url to service descriptions +* Bug: Changed the default cookie header casing back to 'Cookie' + +## 2.6.5 - 2012-06-03 + +* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() +* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from +* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data +* BC: Renaming methods in the CookieJarInterface +* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations +* Making the default glue for HTTP headers ';' instead of ',' +* Adding a removeValue to Guzzle\Http\Message\Header +* Adding getCookies() to request interface. +* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber() + +## 2.6.4 - 2012-05-30 + +* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class. +* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand +* Bug: Fixing magic method command calls on clients +* Bug: Email constraint only validates strings +* Bug: Aggregate POST fields when POST files are present in curl handle +* Bug: Fixing default User-Agent header +* Bug: Only appending or prepending parameters in commands if they are specified +* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes +* Allowing the use of dot notation for class namespaces when using instance_of constraint +* Added any_match validation constraint +* Added an AsyncPlugin +* Passing request object to the calculateWait method of the ExponentialBackoffPlugin +* Allowing the result of a command object to be changed +* Parsing location and type sub values when instantiating a service description rather than over and over at runtime + +## 2.6.3 - 2012-05-23 + +* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options. +* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields. +* You can now use an array of data when creating PUT request bodies in the request factory. +* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. +* [Http] Adding support for Content-Type in multipart POST uploads per upload +* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) +* Adding more POST data operations for easier manipulation of POST data. +* You can now set empty POST fields. +* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. +* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate. +* CS updates + +## 2.6.2 - 2012-05-19 + +* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method. + +## 2.6.1 - 2012-05-19 + +* [BC] Removing 'path' support in service descriptions. Use 'uri'. +* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. +* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. +* [BC] Removing Guzzle\Common\XmlElement. +* All commands, both dynamic and concrete, have ApiCommand objects. +* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. +* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored. +* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible. + +## 2.6.0 - 2012-05-15 + +* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder +* [BC] Executing a Command returns the result of the command rather than the command +* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. +* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. +* [BC] Moving ResourceIterator* to Guzzle\Service\Resource +* [BC] Completely refactored ResourceIterators to iterate over a cloned command object +* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate +* [BC] Guzzle\Guzzle is now deprecated +* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject +* Adding Guzzle\Version class to give version information about Guzzle +* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() +* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data +* ServiceDescription and ServiceBuilder are now cacheable using similar configs +* Changing the format of XML and JSON service builder configs. Backwards compatible. +* Cleaned up Cookie parsing +* Trimming the default Guzzle User-Agent header +* Adding a setOnComplete() method to Commands that is called when a command completes +* Keeping track of requests that were mocked in the MockPlugin +* Fixed a caching bug in the CacheAdapterFactory +* Inspector objects can be injected into a Command object +* Refactoring a lot of code and tests to be case insensitive when dealing with headers +* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL +* Adding the ability to set global option overrides to service builder configs +* Adding the ability to include other service builder config files from within XML and JSON files +* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method. + +## 2.5.0 - 2012-05-08 + +* Major performance improvements +* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. +* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. +* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" +* Added the ability to passed parameters to all requests created by a client +* Added callback functionality to the ExponentialBackoffPlugin +* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. +* Rewinding request stream bodies when retrying requests +* Exception is thrown when JSON response body cannot be decoded +* Added configurable magic method calls to clients and commands. This is off by default. +* Fixed a defect that added a hash to every parsed URL part +* Fixed duplicate none generation for OauthPlugin. +* Emitting an event each time a client is generated by a ServiceBuilder +* Using an ApiParams object instead of a Collection for parameters of an ApiCommand +* cache.* request parameters should be renamed to params.cache.* +* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle. +* Added the ability to disable type validation of service descriptions +* ServiceDescriptions and ServiceBuilders are now Serializable diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/LICENSE b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/LICENSE new file mode 100644 index 00000000..50a177b0 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2018 Michael Dowling, https://github.com/mtdowling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/README.md b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/README.md new file mode 100644 index 00000000..bcd18b8e --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/README.md @@ -0,0 +1,91 @@ +Guzzle, PHP HTTP client +======================= + +[![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases) +[![Build Status](https://img.shields.io/travis/guzzle/guzzle.svg?style=flat-square)](https://travis-ci.org/guzzle/guzzle) +[![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle) + +Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and +trivial to integrate with web services. + +- Simple interface for building query strings, POST requests, streaming large + uploads, streaming large downloads, using HTTP cookies, uploading JSON data, + etc... +- Can send both synchronous and asynchronous requests using the same interface. +- Uses PSR-7 interfaces for requests, responses, and streams. This allows you + to utilize other PSR-7 compatible libraries with Guzzle. +- Abstracts away the underlying HTTP transport, allowing you to write + environment and transport agnostic code; i.e., no hard dependency on cURL, + PHP streams, sockets, or non-blocking event loops. +- Middleware system allows you to augment and compose client behavior. + +```php +$client = new \GuzzleHttp\Client(); +$res = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle'); +echo $res->getStatusCode(); +// 200 +echo $res->getHeaderLine('content-type'); +// 'application/json; charset=utf8' +echo $res->getBody(); +// '{"id": 1420053, "name": "guzzle", ...}' + +// Send an asynchronous request. +$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org'); +$promise = $client->sendAsync($request)->then(function ($response) { + echo 'I completed! ' . $response->getBody(); +}); +$promise->wait(); +``` + +## Help and docs + +- [Documentation](http://guzzlephp.org/) +- [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle) +- [Gitter](https://gitter.im/guzzle/guzzle) + + +## Installing Guzzle + +The recommended way to install Guzzle is through +[Composer](http://getcomposer.org). + +```bash +# Install Composer +curl -sS https://getcomposer.org/installer | php +``` + +Next, run the Composer command to install the latest stable version of Guzzle: + +```bash +php composer.phar require guzzlehttp/guzzle +``` + +After installing, you need to require Composer's autoloader: + +```php +require 'vendor/autoload.php'; +``` + +You can then later update Guzzle using composer: + + ```bash +composer.phar update + ``` + + +## Version Guidance + +| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | +|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------| +| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 | +| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 | +| 5.x | Maintained | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 | +| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 | + +[guzzle-3-repo]: https://github.com/guzzle/guzzle3 +[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x +[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3 +[guzzle-6-repo]: https://github.com/guzzle/guzzle +[guzzle-3-docs]: http://guzzle3.readthedocs.org/en/latest/ +[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/ +[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/ diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/UPGRADING.md b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/UPGRADING.md new file mode 100644 index 00000000..91d1dcc9 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/UPGRADING.md @@ -0,0 +1,1203 @@ +Guzzle Upgrade Guide +==================== + +5.0 to 6.0 +---------- + +Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages. +Due to the fact that these messages are immutable, this prompted a refactoring +of Guzzle to use a middleware based system rather than an event system. Any +HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be +updated to work with the new immutable PSR-7 request and response objects. Any +event listeners or subscribers need to be updated to become middleware +functions that wrap handlers (or are injected into a +`GuzzleHttp\HandlerStack`). + +- Removed `GuzzleHttp\BatchResults` +- Removed `GuzzleHttp\Collection` +- Removed `GuzzleHttp\HasDataTrait` +- Removed `GuzzleHttp\ToArrayInterface` +- The `guzzlehttp/streams` dependency has been removed. Stream functionality + is now present in the `GuzzleHttp\Psr7` namespace provided by the + `guzzlehttp/psr7` package. +- Guzzle no longer uses ReactPHP promises and now uses the + `guzzlehttp/promises` library. We use a custom promise library for three + significant reasons: + 1. React promises (at the time of writing this) are recursive. Promise + chaining and promise resolution will eventually blow the stack. Guzzle + promises are not recursive as they use a sort of trampolining technique. + Note: there has been movement in the React project to modify promises to + no longer utilize recursion. + 2. Guzzle needs to have the ability to synchronously block on a promise to + wait for a result. Guzzle promises allows this functionality (and does + not require the use of recursion). + 3. Because we need to be able to wait on a result, doing so using React + promises requires wrapping react promises with RingPHP futures. This + overhead is no longer needed, reducing stack sizes, reducing complexity, + and improving performance. +- `GuzzleHttp\Mimetypes` has been moved to a function in + `GuzzleHttp\Psr7\mimetype_from_extension` and + `GuzzleHttp\Psr7\mimetype_from_filename`. +- `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query + strings must now be passed into request objects as strings, or provided to + the `query` request option when creating requests with clients. The `query` + option uses PHP's `http_build_query` to convert an array to a string. If you + need a different serialization technique, you will need to pass the query + string in as a string. There are a couple helper functions that will make + working with query strings easier: `GuzzleHttp\Psr7\parse_query` and + `GuzzleHttp\Psr7\build_query`. +- Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware + system based on PSR-7, using RingPHP and it's middleware system as well adds + more complexity than the benefits it provides. All HTTP handlers that were + present in RingPHP have been modified to work directly with PSR-7 messages + and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces + complexity in Guzzle, removes a dependency, and improves performance. RingPHP + will be maintained for Guzzle 5 support, but will no longer be a part of + Guzzle 6. +- As Guzzle now uses a middleware based systems the event system and RingPHP + integration has been removed. Note: while the event system has been removed, + it is possible to add your own type of event system that is powered by the + middleware system. + - Removed the `Event` namespace. + - Removed the `Subscriber` namespace. + - Removed `Transaction` class + - Removed `RequestFsm` + - Removed `RingBridge` + - `GuzzleHttp\Subscriber\Cookie` is now provided by + `GuzzleHttp\Middleware::cookies` + - `GuzzleHttp\Subscriber\HttpError` is now provided by + `GuzzleHttp\Middleware::httpError` + - `GuzzleHttp\Subscriber\History` is now provided by + `GuzzleHttp\Middleware::history` + - `GuzzleHttp\Subscriber\Mock` is now provided by + `GuzzleHttp\Handler\MockHandler` + - `GuzzleHttp\Subscriber\Prepare` is now provided by + `GuzzleHttp\PrepareBodyMiddleware` + - `GuzzleHttp\Subscriber\Redirect` is now provided by + `GuzzleHttp\RedirectMiddleware` +- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in + `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone. +- Static functions in `GuzzleHttp\Utils` have been moved to namespaced + functions under the `GuzzleHttp` namespace. This requires either a Composer + based autoloader or you to include functions.php. +- `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to + `GuzzleHttp\ClientInterface::getConfig`. +- `GuzzleHttp\ClientInterface::setDefaultOption` has been removed. +- The `json` and `xml` methods of response objects has been removed. With the + migration to strictly adhering to PSR-7 as the interface for Guzzle messages, + adding methods to message interfaces would actually require Guzzle messages + to extend from PSR-7 messages rather then work with them directly. + +## Migrating to middleware + +The change to PSR-7 unfortunately required significant refactoring to Guzzle +due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event +system from plugins. The event system relied on mutability of HTTP messages and +side effects in order to work. With immutable messages, you have to change your +workflow to become more about either returning a value (e.g., functional +middlewares) or setting a value on an object. Guzzle v6 has chosen the +functional middleware approach. + +Instead of using the event system to listen for things like the `before` event, +you now create a stack based middleware function that intercepts a request on +the way in and the promise of the response on the way out. This is a much +simpler and more predictable approach than the event system and works nicely +with PSR-7 middleware. Due to the use of promises, the middleware system is +also asynchronous. + +v5: + +```php +use GuzzleHttp\Event\BeforeEvent; +$client = new GuzzleHttp\Client(); +// Get the emitter and listen to the before event. +$client->getEmitter()->on('before', function (BeforeEvent $e) { + // Guzzle v5 events relied on mutation + $e->getRequest()->setHeader('X-Foo', 'Bar'); +}); +``` + +v6: + +In v6, you can modify the request before it is sent using the `mapRequest` +middleware. The idiomatic way in v6 to modify the request/response lifecycle is +to setup a handler middleware stack up front and inject the handler into a +client. + +```php +use GuzzleHttp\Middleware; +// Create a handler stack that has all of the default middlewares attached +$handler = GuzzleHttp\HandlerStack::create(); +// Push the handler onto the handler stack +$handler->push(Middleware::mapRequest(function (RequestInterface $request) { + // Notice that we have to return a request object + return $request->withHeader('X-Foo', 'Bar'); +})); +// Inject the handler into the client +$client = new GuzzleHttp\Client(['handler' => $handler]); +``` + +## POST Requests + +This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params) +and `multipart` request options. `form_params` is an associative array of +strings or array of strings and is used to serialize an +`application/x-www-form-urlencoded` POST request. The +[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart) +option is now used to send a multipart/form-data POST request. + +`GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add +POST files to a multipart/form-data request. + +The `body` option no longer accepts an array to send POST requests. Please use +`multipart` or `form_params` instead. + +The `base_url` option has been renamed to `base_uri`. + +4.x to 5.0 +---------- + +## Rewritten Adapter Layer + +Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send +HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor +is still supported, but it has now been renamed to `handler`. Instead of +passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP +`callable` that follows the RingPHP specification. + +## Removed Fluent Interfaces + +[Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil) +from the following classes: + +- `GuzzleHttp\Collection` +- `GuzzleHttp\Url` +- `GuzzleHttp\Query` +- `GuzzleHttp\Post\PostBody` +- `GuzzleHttp\Cookie\SetCookie` + +## Removed functions.php + +Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following +functions can be used as replacements. + +- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode` +- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath` +- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path` +- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however, + deprecated in favor of using `GuzzleHttp\Pool::batch()`. + +The "procedural" global client has been removed with no replacement (e.g., +`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client` +object as a replacement. + +## `throwImmediately` has been removed + +The concept of "throwImmediately" has been removed from exceptions and error +events. This control mechanism was used to stop a transfer of concurrent +requests from completing. This can now be handled by throwing the exception or +by cancelling a pool of requests or each outstanding future request +individually. + +## headers event has been removed + +Removed the "headers" event. This event was only useful for changing the +body a response once the headers of the response were known. You can implement +a similar behavior in a number of ways. One example might be to use a +FnStream that has access to the transaction being sent. For example, when the +first byte is written, you could check if the response headers match your +expectations, and if so, change the actual stream body that is being +written to. + +## Updates to HTTP Messages + +Removed the `asArray` parameter from +`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header +value as an array, then use the newly added `getHeaderAsArray()` method of +`MessageInterface`. This change makes the Guzzle interfaces compatible with +the PSR-7 interfaces. + +3.x to 4.0 +---------- + +## Overarching changes: + +- Now requires PHP 5.4 or greater. +- No longer requires cURL to send requests. +- Guzzle no longer wraps every exception it throws. Only exceptions that are + recoverable are now wrapped by Guzzle. +- Various namespaces have been removed or renamed. +- No longer requiring the Symfony EventDispatcher. A custom event dispatcher + based on the Symfony EventDispatcher is + now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant + speed and functionality improvements). + +Changes per Guzzle 3.x namespace are described below. + +## Batch + +The `Guzzle\Batch` namespace has been removed. This is best left to +third-parties to implement on top of Guzzle's core HTTP library. + +## Cache + +The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement +has been implemented yet, but hoping to utilize a PSR cache interface). + +## Common + +- Removed all of the wrapped exceptions. It's better to use the standard PHP + library for unrecoverable exceptions. +- `FromConfigInterface` has been removed. +- `Guzzle\Common\Version` has been removed. The VERSION constant can be found + at `GuzzleHttp\ClientInterface::VERSION`. + +### Collection + +- `getAll` has been removed. Use `toArray` to convert a collection to an array. +- `inject` has been removed. +- `keySearch` has been removed. +- `getPath` no longer supports wildcard expressions. Use something better like + JMESPath for this. +- `setPath` now supports appending to an existing array via the `[]` notation. + +### Events + +Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses +`GuzzleHttp\Event\Emitter`. + +- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by + `GuzzleHttp\Event\EmitterInterface`. +- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by + `GuzzleHttp\Event\Emitter`. +- `Symfony\Component\EventDispatcher\Event` is replaced by + `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in + `GuzzleHttp\Event\EventInterface`. +- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and + `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the + event emitter of a request, client, etc. now uses the `getEmitter` method + rather than the `getDispatcher` method. + +#### Emitter + +- Use the `once()` method to add a listener that automatically removes itself + the first time it is invoked. +- Use the `listeners()` method to retrieve a list of event listeners rather than + the `getListeners()` method. +- Use `emit()` instead of `dispatch()` to emit an event from an emitter. +- Use `attach()` instead of `addSubscriber()` and `detach()` instead of + `removeSubscriber()`. + +```php +$mock = new Mock(); +// 3.x +$request->getEventDispatcher()->addSubscriber($mock); +$request->getEventDispatcher()->removeSubscriber($mock); +// 4.x +$request->getEmitter()->attach($mock); +$request->getEmitter()->detach($mock); +``` + +Use the `on()` method to add a listener rather than the `addListener()` method. + +```php +// 3.x +$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } ); +// 4.x +$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } ); +``` + +## Http + +### General changes + +- The cacert.pem certificate has been moved to `src/cacert.pem`. +- Added the concept of adapters that are used to transfer requests over the + wire. +- Simplified the event system. +- Sending requests in parallel is still possible, but batching is no longer a + concept of the HTTP layer. Instead, you must use the `complete` and `error` + events to asynchronously manage parallel request transfers. +- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`. +- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`. +- QueryAggregators have been rewritten so that they are simply callable + functions. +- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in + `functions.php` for an easy to use static client instance. +- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from + `GuzzleHttp\Exception\TransferException`. + +### Client + +Calling methods like `get()`, `post()`, `head()`, etc. no longer create and +return a request, but rather creates a request, sends the request, and returns +the response. + +```php +// 3.0 +$request = $client->get('/'); +$response = $request->send(); + +// 4.0 +$response = $client->get('/'); + +// or, to mirror the previous behavior +$request = $client->createRequest('GET', '/'); +$response = $client->send($request); +``` + +`GuzzleHttp\ClientInterface` has changed. + +- The `send` method no longer accepts more than one request. Use `sendAll` to + send multiple requests in parallel. +- `setUserAgent()` has been removed. Use a default request option instead. You + could, for example, do something like: + `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`. +- `setSslVerification()` has been removed. Use default request options instead, + like `$client->setConfig('defaults/verify', true)`. + +`GuzzleHttp\Client` has changed. + +- The constructor now accepts only an associative array. You can include a + `base_url` string or array to use a URI template as the base URL of a client. + You can also specify a `defaults` key that is an associative array of default + request options. You can pass an `adapter` to use a custom adapter, + `batch_adapter` to use a custom adapter for sending requests in parallel, or + a `message_factory` to change the factory used to create HTTP requests and + responses. +- The client no longer emits a `client.create_request` event. +- Creating requests with a client no longer automatically utilize a URI + template. You must pass an array into a creational method (e.g., + `createRequest`, `get`, `put`, etc.) in order to expand a URI template. + +### Messages + +Messages no longer have references to their counterparts (i.e., a request no +longer has a reference to it's response, and a response no loger has a +reference to its request). This association is now managed through a +`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to +these transaction objects using request events that are emitted over the +lifecycle of a request. + +#### Requests with a body + +- `GuzzleHttp\Message\EntityEnclosingRequest` and + `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The + separation between requests that contain a body and requests that do not + contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface` + handles both use cases. +- Any method that previously accepts a `GuzzleHttp\Response` object now accept a + `GuzzleHttp\Message\ResponseInterface`. +- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to + `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create + both requests and responses and is implemented in + `GuzzleHttp\Message\MessageFactory`. +- POST field and file methods have been removed from the request object. You + must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface` + to control the format of a POST body. Requests that are created using a + standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use + a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if + the method is POST and no body is provided. + +```php +$request = $client->createRequest('POST', '/'); +$request->getBody()->setField('foo', 'bar'); +$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r'))); +``` + +#### Headers + +- `GuzzleHttp\Message\Header` has been removed. Header values are now simply + represented by an array of values or as a string. Header values are returned + as a string by default when retrieving a header value from a message. You can + pass an optional argument of `true` to retrieve a header value as an array + of strings instead of a single concatenated string. +- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to + `GuzzleHttp\Post`. This interface has been simplified and now allows the + addition of arbitrary headers. +- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most + of the custom headers are now handled separately in specific + subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has + been updated to properly handle headers that contain parameters (like the + `Link` header). + +#### Responses + +- `GuzzleHttp\Message\Response::getInfo()` and + `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event + system to retrieve this type of information. +- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed. +- `GuzzleHttp\Message\Response::getMessage()` has been removed. +- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific + methods have moved to the CacheSubscriber. +- Header specific helper functions like `getContentMd5()` have been removed. + Just use `getHeader('Content-MD5')` instead. +- `GuzzleHttp\Message\Response::setRequest()` and + `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event + system to work with request and response objects as a transaction. +- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the + Redirect subscriber instead. +- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have + been removed. Use `getStatusCode()` instead. + +#### Streaming responses + +Streaming requests can now be created by a client directly, returning a +`GuzzleHttp\Message\ResponseInterface` object that contains a body stream +referencing an open PHP HTTP stream. + +```php +// 3.0 +use Guzzle\Stream\PhpStreamRequestFactory; +$request = $client->get('/'); +$factory = new PhpStreamRequestFactory(); +$stream = $factory->fromRequest($request); +$data = $stream->read(1024); + +// 4.0 +$response = $client->get('/', ['stream' => true]); +// Read some data off of the stream in the response body +$data = $response->getBody()->read(1024); +``` + +#### Redirects + +The `configureRedirects()` method has been removed in favor of a +`allow_redirects` request option. + +```php +// Standard redirects with a default of a max of 5 redirects +$request = $client->createRequest('GET', '/', ['allow_redirects' => true]); + +// Strict redirects with a custom number of redirects +$request = $client->createRequest('GET', '/', [ + 'allow_redirects' => ['max' => 5, 'strict' => true] +]); +``` + +#### EntityBody + +EntityBody interfaces and classes have been removed or moved to +`GuzzleHttp\Stream`. All classes and interfaces that once required +`GuzzleHttp\EntityBodyInterface` now require +`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no +longer uses `GuzzleHttp\EntityBody::factory` but now uses +`GuzzleHttp\Stream\Stream::factory` or even better: +`GuzzleHttp\Stream\create()`. + +- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface` +- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream` +- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream` +- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream` +- `Guzzle\Http\IoEmittyinEntityBody` has been removed. + +#### Request lifecycle events + +Requests previously submitted a large number of requests. The number of events +emitted over the lifecycle of a request has been significantly reduced to make +it easier to understand how to extend the behavior of a request. All events +emitted during the lifecycle of a request now emit a custom +`GuzzleHttp\Event\EventInterface` object that contains context providing +methods and a way in which to modify the transaction at that specific point in +time (e.g., intercept the request and set a response on the transaction). + +- `request.before_send` has been renamed to `before` and now emits a + `GuzzleHttp\Event\BeforeEvent` +- `request.complete` has been renamed to `complete` and now emits a + `GuzzleHttp\Event\CompleteEvent`. +- `request.sent` has been removed. Use `complete`. +- `request.success` has been removed. Use `complete`. +- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`. +- `request.exception` has been removed. Use `error`. +- `request.receive.status_line` has been removed. +- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to + maintain a status update. +- `curl.callback.write` has been removed. Use a custom `StreamInterface` to + intercept writes. +- `curl.callback.read` has been removed. Use a custom `StreamInterface` to + intercept reads. + +`headers` is a new event that is emitted after the response headers of a +request have been received before the body of the response is downloaded. This +event emits a `GuzzleHttp\Event\HeadersEvent`. + +You can intercept a request and inject a response using the `intercept()` event +of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and +`GuzzleHttp\Event\ErrorEvent` event. + +See: http://docs.guzzlephp.org/en/latest/events.html + +## Inflection + +The `Guzzle\Inflection` namespace has been removed. This is not a core concern +of Guzzle. + +## Iterator + +The `Guzzle\Iterator` namespace has been removed. + +- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and + `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of + Guzzle itself. +- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent + class is shipped with PHP 5.4. +- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because + it's easier to just wrap an iterator in a generator that maps values. + +For a replacement of these iterators, see https://github.com/nikic/iter + +## Log + +The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The +`Guzzle\Log` namespace has been removed. Guzzle now relies on +`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been +moved to `GuzzleHttp\Subscriber\Log\Formatter`. + +## Parser + +The `Guzzle\Parser` namespace has been removed. This was previously used to +make it possible to plug in custom parsers for cookies, messages, URI +templates, and URLs; however, this level of complexity is not needed in Guzzle +so it has been removed. + +- Cookie: Cookie parsing logic has been moved to + `GuzzleHttp\Cookie\SetCookie::fromString`. +- Message: Message parsing logic for both requests and responses has been moved + to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only + used in debugging or deserializing messages, so it doesn't make sense for + Guzzle as a library to add this level of complexity to parsing messages. +- UriTemplate: URI template parsing has been moved to + `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL + URI template library if it is installed. +- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously + it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary, + then developers are free to subclass `GuzzleHttp\Url`. + +## Plugin + +The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`. +Several plugins are shipping with the core Guzzle library under this namespace. + +- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar + code has moved to `GuzzleHttp\Cookie`. +- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin. +- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is + received. +- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin. +- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before + sending. This subscriber is attached to all requests by default. +- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin. + +The following plugins have been removed (third-parties are free to re-implement +these if needed): + +- `GuzzleHttp\Plugin\Async` has been removed. +- `GuzzleHttp\Plugin\CurlAuth` has been removed. +- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This + functionality should instead be implemented with event listeners that occur + after normal response parsing occurs in the guzzle/command package. + +The following plugins are not part of the core Guzzle package, but are provided +in separate repositories: + +- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler + to build custom retry policies using simple functions rather than various + chained classes. See: https://github.com/guzzle/retry-subscriber +- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to + https://github.com/guzzle/cache-subscriber +- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to + https://github.com/guzzle/log-subscriber +- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to + https://github.com/guzzle/message-integrity-subscriber +- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to + `GuzzleHttp\Subscriber\MockSubscriber`. +- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to + https://github.com/guzzle/oauth-subscriber + +## Service + +The service description layer of Guzzle has moved into two separate packages: + +- http://github.com/guzzle/command Provides a high level abstraction over web + services by representing web service operations using commands. +- http://github.com/guzzle/guzzle-services Provides an implementation of + guzzle/command that provides request serialization and response parsing using + Guzzle service descriptions. + +## Stream + +Stream have moved to a separate package available at +https://github.com/guzzle/streams. + +`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take +on the responsibilities of `Guzzle\Http\EntityBody` and +`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number +of methods implemented by the `StreamInterface` has been drastically reduced to +allow developers to more easily extend and decorate stream behavior. + +## Removed methods from StreamInterface + +- `getStream` and `setStream` have been removed to better encapsulate streams. +- `getMetadata` and `setMetadata` have been removed in favor of + `GuzzleHttp\Stream\MetadataStreamInterface`. +- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been + removed. This data is accessible when + using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`. +- `rewind` has been removed. Use `seek(0)` for a similar behavior. + +## Renamed methods + +- `detachStream` has been renamed to `detach`. +- `feof` has been renamed to `eof`. +- `ftell` has been renamed to `tell`. +- `readLine` has moved from an instance method to a static class method of + `GuzzleHttp\Stream\Stream`. + +## Metadata streams + +`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams +that contain additional metadata accessible via `getMetadata()`. +`GuzzleHttp\Stream\StreamInterface::getMetadata` and +`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed. + +## StreamRequestFactory + +The entire concept of the StreamRequestFactory has been removed. The way this +was used in Guzzle 3 broke the actual interface of sending streaming requests +(instead of getting back a Response, you got a StreamInterface). Streaming +PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`. + +3.6 to 3.7 +---------- + +### Deprecations + +- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.: + +```php +\Guzzle\Common\Version::$emitWarnings = true; +``` + +The following APIs and options have been marked as deprecated: + +- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead. +- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. +- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. +- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated +- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. +- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. +- Marked `Guzzle\Common\Collection::inject()` as deprecated. +- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use + `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or + `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` + +3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational +request methods. When paired with a client's configuration settings, these options allow you to specify default settings +for various aspects of a request. Because these options make other previous configuration options redundant, several +configuration options and methods of a client and AbstractCommand have been deprecated. + +- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`. +- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`. +- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')` +- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0 + + $command = $client->getCommand('foo', array( + 'command.headers' => array('Test' => '123'), + 'command.response_body' => '/path/to/file' + )); + + // Should be changed to: + + $command = $client->getCommand('foo', array( + 'command.request_options' => array( + 'headers' => array('Test' => '123'), + 'save_as' => '/path/to/file' + ) + )); + +### Interface changes + +Additions and changes (you will need to update any implementations or subclasses you may have created): + +- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: + createRequest, head, delete, put, patch, post, options, prepareRequest +- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` +- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` +- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to + `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a + resource, string, or EntityBody into the $options parameter to specify the download location of the response. +- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a + default `array()` +- Added `Guzzle\Stream\StreamInterface::isRepeatable` +- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. + +The following methods were removed from interfaces. All of these methods are still available in the concrete classes +that implement them, but you should update your code to use alternative methods: + +- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use + `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or + `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or + `$client->setDefaultOption('headers/{header_name}', 'value')`. or + `$client->setDefaultOption('headers', array('header_name' => 'value'))`. +- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`. +- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail. +- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail. +- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail. +- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin. +- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin. +- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin. + +### Cache plugin breaking changes + +- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a + CacheStorageInterface. These two objects and interface will be removed in a future version. +- Always setting X-cache headers on cached responses +- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin +- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface + $request, Response $response);` +- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` +- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` +- Added `CacheStorageInterface::purge($url)` +- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin + $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, + CanCacheStrategyInterface $canCache = null)` +- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` + +3.5 to 3.6 +---------- + +* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. +* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution +* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). + For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader(). + Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request. +* Specific header implementations can be created for complex headers. When a message creates a header, it uses a + HeaderFactory which can map specific headers to specific header classes. There is now a Link header and + CacheControl header implementation. +* Moved getLinks() from Response to just be used on a Link header object. + +If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the +HeaderInterface (e.g. toArray(), getAll(), etc.). + +### Interface changes + +* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate +* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() +* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in + Guzzle\Http\Curl\RequestMediator +* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. +* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface +* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() + +### Removed deprecated functions + +* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() +* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). + +### Deprecations + +* The ability to case-insensitively search for header values +* Guzzle\Http\Message\Header::hasExactHeader +* Guzzle\Http\Message\Header::raw. Use getAll() +* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object + instead. + +### Other changes + +* All response header helper functions return a string rather than mixing Header objects and strings inconsistently +* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle + directly via interfaces +* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist + but are a no-op until removed. +* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a + `Guzzle\Service\Command\ArrayCommandInterface`. +* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response + on a request while the request is still being transferred +* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess + +3.3 to 3.4 +---------- + +Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. + +3.2 to 3.3 +---------- + +### Response::getEtag() quote stripping removed + +`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header + +### Removed `Guzzle\Http\Utils` + +The `Guzzle\Http\Utils` class was removed. This class was only used for testing. + +### Stream wrapper and type + +`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase. + +### curl.emit_io became emit_io + +Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the +'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' + +3.1 to 3.2 +---------- + +### CurlMulti is no longer reused globally + +Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added +to a single client can pollute requests dispatched from other clients. + +If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the +ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is +created. + +```php +$multi = new Guzzle\Http\Curl\CurlMulti(); +$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json'); +$builder->addListener('service_builder.create_client', function ($event) use ($multi) { + $event['client']->setCurlMulti($multi); +} +}); +``` + +### No default path + +URLs no longer have a default path value of '/' if no path was specified. + +Before: + +```php +$request = $client->get('http://www.foo.com'); +echo $request->getUrl(); +// >> http://www.foo.com/ +``` + +After: + +```php +$request = $client->get('http://www.foo.com'); +echo $request->getUrl(); +// >> http://www.foo.com +``` + +### Less verbose BadResponseException + +The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and +response information. You can, however, get access to the request and response object by calling `getRequest()` or +`getResponse()` on the exception object. + +### Query parameter aggregation + +Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a +setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is +responsible for handling the aggregation of multi-valued query string variables into a flattened hash. + +2.8 to 3.x +---------- + +### Guzzle\Service\Inspector + +Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig` + +**Before** + +```php +use Guzzle\Service\Inspector; + +class YourClient extends \Guzzle\Service\Client +{ + public static function factory($config = array()) + { + $default = array(); + $required = array('base_url', 'username', 'api_key'); + $config = Inspector::fromConfig($config, $default, $required); + + $client = new self( + $config->get('base_url'), + $config->get('username'), + $config->get('api_key') + ); + $client->setConfig($config); + + $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); + + return $client; + } +``` + +**After** + +```php +use Guzzle\Common\Collection; + +class YourClient extends \Guzzle\Service\Client +{ + public static function factory($config = array()) + { + $default = array(); + $required = array('base_url', 'username', 'api_key'); + $config = Collection::fromConfig($config, $default, $required); + + $client = new self( + $config->get('base_url'), + $config->get('username'), + $config->get('api_key') + ); + $client->setConfig($config); + + $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); + + return $client; + } +``` + +### Convert XML Service Descriptions to JSON + +**Before** + +```xml + + + + + + Get a list of groups + + + Uses a search query to get a list of groups + + + + Create a group + + + + + Delete a group by ID + + + + + + + Update a group + + + + + + +``` + +**After** + +```json +{ + "name": "Zendesk REST API v2", + "apiVersion": "2012-12-31", + "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users", + "operations": { + "list_groups": { + "httpMethod":"GET", + "uri": "groups.json", + "summary": "Get a list of groups" + }, + "search_groups":{ + "httpMethod":"GET", + "uri": "search.json?query=\"{query} type:group\"", + "summary": "Uses a search query to get a list of groups", + "parameters":{ + "query":{ + "location": "uri", + "description":"Zendesk Search Query", + "type": "string", + "required": true + } + } + }, + "create_group": { + "httpMethod":"POST", + "uri": "groups.json", + "summary": "Create a group", + "parameters":{ + "data": { + "type": "array", + "location": "body", + "description":"Group JSON", + "filters": "json_encode", + "required": true + }, + "Content-Type":{ + "type": "string", + "location":"header", + "static": "application/json" + } + } + }, + "delete_group": { + "httpMethod":"DELETE", + "uri": "groups/{id}.json", + "summary": "Delete a group", + "parameters":{ + "id":{ + "location": "uri", + "description":"Group to delete by ID", + "type": "integer", + "required": true + } + } + }, + "get_group": { + "httpMethod":"GET", + "uri": "groups/{id}.json", + "summary": "Get a ticket", + "parameters":{ + "id":{ + "location": "uri", + "description":"Group to get by ID", + "type": "integer", + "required": true + } + } + }, + "update_group": { + "httpMethod":"PUT", + "uri": "groups/{id}.json", + "summary": "Update a group", + "parameters":{ + "id": { + "location": "uri", + "description":"Group to update by ID", + "type": "integer", + "required": true + }, + "data": { + "type": "array", + "location": "body", + "description":"Group JSON", + "filters": "json_encode", + "required": true + }, + "Content-Type":{ + "type": "string", + "location":"header", + "static": "application/json" + } + } + } +} +``` + +### Guzzle\Service\Description\ServiceDescription + +Commands are now called Operations + +**Before** + +```php +use Guzzle\Service\Description\ServiceDescription; + +$sd = new ServiceDescription(); +$sd->getCommands(); // @returns ApiCommandInterface[] +$sd->hasCommand($name); +$sd->getCommand($name); // @returns ApiCommandInterface|null +$sd->addCommand($command); // @param ApiCommandInterface $command +``` + +**After** + +```php +use Guzzle\Service\Description\ServiceDescription; + +$sd = new ServiceDescription(); +$sd->getOperations(); // @returns OperationInterface[] +$sd->hasOperation($name); +$sd->getOperation($name); // @returns OperationInterface|null +$sd->addOperation($operation); // @param OperationInterface $operation +``` + +### Guzzle\Common\Inflection\Inflector + +Namespace is now `Guzzle\Inflection\Inflector` + +### Guzzle\Http\Plugin + +Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below. + +### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log + +Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively. + +**Before** + +```php +use Guzzle\Common\Log\ClosureLogAdapter; +use Guzzle\Http\Plugin\LogPlugin; + +/** @var \Guzzle\Http\Client */ +$client; + +// $verbosity is an integer indicating desired message verbosity level +$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE); +``` + +**After** + +```php +use Guzzle\Log\ClosureLogAdapter; +use Guzzle\Log\MessageFormatter; +use Guzzle\Plugin\Log\LogPlugin; + +/** @var \Guzzle\Http\Client */ +$client; + +// $format is a string indicating desired message format -- @see MessageFormatter +$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT); +``` + +### Guzzle\Http\Plugin\CurlAuthPlugin + +Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`. + +### Guzzle\Http\Plugin\ExponentialBackoffPlugin + +Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes. + +**Before** + +```php +use Guzzle\Http\Plugin\ExponentialBackoffPlugin; + +$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge( + ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429) + )); + +$client->addSubscriber($backoffPlugin); +``` + +**After** + +```php +use Guzzle\Plugin\Backoff\BackoffPlugin; +use Guzzle\Plugin\Backoff\HttpBackoffStrategy; + +// Use convenient factory method instead -- see implementation for ideas of what +// you can do with chaining backoff strategies +$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge( + HttpBackoffStrategy::getDefaultFailureCodes(), array(429) + )); +$client->addSubscriber($backoffPlugin); +``` + +### Known Issues + +#### [BUG] Accept-Encoding header behavior changed unintentionally. + +(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e) + +In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to +properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen. +See issue #217 for a workaround, or use a version containing the fix. diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/composer.json b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/composer.json new file mode 100644 index 00000000..14517709 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/composer.json @@ -0,0 +1,54 @@ +{ + "name": "guzzlehttp\/guzzle", + "type": "library", + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "framework", + "http", + "rest", + "web service", + "curl", + "client", + "HTTP client" + ], + "homepage": "http:\/\/guzzlephp.org\/", + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https:\/\/github.com\/mtdowling" + } + ], + "require": { + "php": ">=5.5", + "guzzlehttp\/psr7": "^1.4", + "guzzlehttp\/promises": "^1.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit\/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr\/log": "^1.0" + }, + "autoload": { + "files": [ + "src\/functions_include.php" + ], + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\": "src\/" + } + }, + "autoload-dev": { + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Tests\\": "tests\/" + } + }, + "suggest": { + "psr\/log": "Required for using the Log middleware" + }, + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + } +} \ No newline at end of file diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Client.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Client.php new file mode 100644 index 00000000..b0abaa89 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Client.php @@ -0,0 +1,347 @@ + 'http://www.foo.com/1.0/', + * 'timeout' => 0, + * 'allow_redirects' => false, + * 'proxy' => '192.168.16.1:10' + * ]); + * + * Client configuration settings include the following options: + * + * - handler: (callable) Function that transfers HTTP requests over the + * wire. The function is called with a Psr7\Http\Message\RequestInterface + * and array of transfer options, and must return a + * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a + * Psr7\Http\Message\ResponseInterface on success. "handler" is a + * constructor only option that cannot be overridden in per/request + * options. If no handler is provided, a default handler will be created + * that enables all of the request options below by attaching all of the + * default middleware to the handler. + * - base_uri: (string|UriInterface) Base URI of the client that is merged + * into relative URIs. Can be a string or instance of UriInterface. + * - **: any request option + * + * @param array $config Client configuration settings. + * + * @see \GuzzleHttp\RequestOptions for a list of available request options. + */ + public function __construct(array $config = []) + { + if (!isset($config['handler'])) { + $config['handler'] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\HandlerStack::create(); + } elseif (!\is_callable($config['handler'])) { + throw new \InvalidArgumentException('handler must be a callable'); + } + // Convert the base_uri to a UriInterface + if (isset($config['base_uri'])) { + $config['base_uri'] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\uri_for($config['base_uri']); + } + $this->configureDefaults($config); + } + public function __call($method, $args) + { + if (\count($args) < 1) { + throw new \InvalidArgumentException('Magic request methods require a URI and optional options array'); + } + $uri = $args[0]; + $opts = isset($args[1]) ? $args[1] : []; + return \substr($method, -5) === 'Async' ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts) : $this->request($method, $uri, $opts); + } + public function sendAsync(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options = []) + { + // Merge the base URI into the request URI if needed. + $options = $this->prepareDefaults($options); + return $this->transfer($request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), $options); + } + public function send(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options = []) + { + $options[\_PhpScoper5bbb1f4b001f3\GuzzleHttp\RequestOptions::SYNCHRONOUS] = \true; + return $this->sendAsync($request, $options)->wait(); + } + public function requestAsync($method, $uri = '', array $options = []) + { + $options = $this->prepareDefaults($options); + // Remove request modifying parameter because it can be done up-front. + $headers = isset($options['headers']) ? $options['headers'] : []; + $body = isset($options['body']) ? $options['body'] : null; + $version = isset($options['version']) ? $options['version'] : '1.1'; + // Merge the URI into the base URI. + $uri = $this->buildUri($uri, $options); + if (\is_array($body)) { + $this->invalidBody(); + } + $request = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Request($method, $uri, $headers, $body, $version); + // Remove the option so that they are not doubly-applied. + unset($options['headers'], $options['body'], $options['version']); + return $this->transfer($request, $options); + } + public function request($method, $uri = '', array $options = []) + { + $options[\_PhpScoper5bbb1f4b001f3\GuzzleHttp\RequestOptions::SYNCHRONOUS] = \true; + return $this->requestAsync($method, $uri, $options)->wait(); + } + public function getConfig($option = null) + { + return $option === null ? $this->config : (isset($this->config[$option]) ? $this->config[$option] : null); + } + private function buildUri($uri, array $config) + { + // for BC we accept null which would otherwise fail in uri_for + $uri = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\uri_for($uri === null ? '' : $uri); + if (isset($config['base_uri'])) { + $uri = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\UriResolver::resolve(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\uri_for($config['base_uri']), $uri); + } + return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; + } + /** + * Configures the default options for a client. + * + * @param array $config + */ + private function configureDefaults(array $config) + { + $defaults = ['allow_redirects' => \_PhpScoper5bbb1f4b001f3\GuzzleHttp\RedirectMiddleware::$defaultSettings, 'http_errors' => \true, 'decode_content' => \true, 'verify' => \true, 'cookies' => \false]; + // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. + // We can only trust the HTTP_PROXY environment variable in a CLI + // process due to the fact that PHP has no reliable mechanism to + // get environment variables that start with "HTTP_". + if (\php_sapi_name() == 'cli' && \getenv('HTTP_PROXY')) { + $defaults['proxy']['http'] = \getenv('HTTP_PROXY'); + } + if ($proxy = \getenv('HTTPS_PROXY')) { + $defaults['proxy']['https'] = $proxy; + } + if ($noProxy = \getenv('NO_PROXY')) { + $cleanedNoProxy = \str_replace(' ', '', $noProxy); + $defaults['proxy']['no'] = \explode(',', $cleanedNoProxy); + } + $this->config = $config + $defaults; + if (!empty($config['cookies']) && $config['cookies'] === \true) { + $this->config['cookies'] = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\CookieJar(); + } + // Add the default user-agent header. + if (!isset($this->config['headers'])) { + $this->config['headers'] = ['User-Agent' => default_user_agent()]; + } else { + // Add the User-Agent header if one was not already set. + foreach (\array_keys($this->config['headers']) as $name) { + if (\strtolower($name) === 'user-agent') { + return; + } + } + $this->config['headers']['User-Agent'] = default_user_agent(); + } + } + /** + * Merges default options into the array. + * + * @param array $options Options to modify by reference + * + * @return array + */ + private function prepareDefaults($options) + { + $defaults = $this->config; + if (!empty($defaults['headers'])) { + // Default headers are only added if they are not present. + $defaults['_conditional'] = $defaults['headers']; + unset($defaults['headers']); + } + // Special handling for headers is required as they are added as + // conditional headers and as headers passed to a request ctor. + if (\array_key_exists('headers', $options)) { + // Allows default headers to be unset. + if ($options['headers'] === null) { + $defaults['_conditional'] = null; + unset($options['headers']); + } elseif (!\is_array($options['headers'])) { + throw new \InvalidArgumentException('headers must be an array'); + } + } + // Shallow merge defaults underneath options. + $result = $options + $defaults; + // Remove null values. + foreach ($result as $k => $v) { + if ($v === null) { + unset($result[$k]); + } + } + return $result; + } + /** + * Transfers the given request and applies request options. + * + * The URI of the request is not modified and the request options are used + * as-is without merging in default options. + * + * @param RequestInterface $request + * @param array $options + * + * @return Promise\PromiseInterface + */ + private function transfer(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + // save_to -> sink + if (isset($options['save_to'])) { + $options['sink'] = $options['save_to']; + unset($options['save_to']); + } + // exceptions -> http_errors + if (isset($options['exceptions'])) { + $options['http_errors'] = $options['exceptions']; + unset($options['exceptions']); + } + $request = $this->applyOptions($request, $options); + $handler = $options['handler']; + try { + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\promise_for($handler($request, $options)); + } catch (\Exception $e) { + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\rejection_for($e); + } + } + /** + * Applies the array of request options to a request. + * + * @param RequestInterface $request + * @param array $options + * + * @return RequestInterface + */ + private function applyOptions(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array &$options) + { + $modify = ['set_headers' => []]; + if (isset($options['headers'])) { + $modify['set_headers'] = $options['headers']; + unset($options['headers']); + } + if (isset($options['form_params'])) { + if (isset($options['multipart'])) { + throw new \InvalidArgumentException('You cannot use ' . 'form_params and multipart at the same time. Use the ' . 'form_params option if you want to send application/' . 'x-www-form-urlencoded requests, and the multipart ' . 'option to send multipart/form-data requests.'); + } + $options['body'] = \http_build_query($options['form_params'], '', '&'); + unset($options['form_params']); + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; + } + if (isset($options['multipart'])) { + $options['body'] = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\MultipartStream($options['multipart']); + unset($options['multipart']); + } + if (isset($options['json'])) { + $options['body'] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\json_encode($options['json']); + unset($options['json']); + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'application/json'; + } + if (!empty($options['decode_content']) && $options['decode_content'] !== \true) { + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']); + $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; + } + if (isset($options['body'])) { + if (\is_array($options['body'])) { + $this->invalidBody(); + } + $modify['body'] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\stream_for($options['body']); + unset($options['body']); + } + if (!empty($options['auth']) && \is_array($options['auth'])) { + $value = $options['auth']; + $type = isset($value[2]) ? \strtolower($value[2]) : 'basic'; + switch ($type) { + case 'basic': + // Ensure that we don't have the header in different case and set the new value. + $modify['set_headers'] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\_caseless_remove(['Authorization'], $modify['set_headers']); + $modify['set_headers']['Authorization'] = 'Basic ' . \base64_encode("{$value[0]}:{$value[1]}"); + break; + case 'digest': + // @todo: Do not rely on curl + $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_DIGEST; + $options['curl'][\CURLOPT_USERPWD] = "{$value[0]}:{$value[1]}"; + break; + case 'ntlm': + $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM; + $options['curl'][\CURLOPT_USERPWD] = "{$value[0]}:{$value[1]}"; + break; + } + } + if (isset($options['query'])) { + $value = $options['query']; + if (\is_array($value)) { + $value = \http_build_query($value, null, '&', \PHP_QUERY_RFC3986); + } + if (!\is_string($value)) { + throw new \InvalidArgumentException('query must be a string or array'); + } + $modify['query'] = $value; + unset($options['query']); + } + // Ensure that sink is not an invalid value. + if (isset($options['sink'])) { + // TODO: Add more sink validation? + if (\is_bool($options['sink'])) { + throw new \InvalidArgumentException('sink must not be a boolean'); + } + } + $request = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\modify_request($request, $modify); + if ($request->getBody() instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\MultipartStream) { + // Use a multipart/form-data POST if a Content-Type is not set. + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' . $request->getBody()->getBoundary(); + } + // Merge in conditional headers if they are not present. + if (isset($options['_conditional'])) { + // Build up the changes so it's in a single clone of the message. + $modify = []; + foreach ($options['_conditional'] as $k => $v) { + if (!$request->hasHeader($k)) { + $modify['set_headers'][$k] = $v; + } + } + $request = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\modify_request($request, $modify); + // Don't pass this internal value along to middleware/handlers. + unset($options['_conditional']); + } + return $request; + } + private function invalidBody() + { + throw new \InvalidArgumentException('Passing in the "body" request ' . 'option as an array to send a POST request has been deprecated. ' . 'Please use the "form_params" request option to send a ' . 'application/x-www-form-urlencoded request, or the "multipart" ' . 'request option to send a multipart/form-data request.'); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/ClientInterface.php new file mode 100644 index 00000000..7216248d --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/ClientInterface.php @@ -0,0 +1,79 @@ +strictMode = $strictMode; + foreach ($cookieArray as $cookie) { + if (!$cookie instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie) { + $cookie = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie($cookie); + } + $this->setCookie($cookie); + } + } + /** + * Create a new Cookie jar from an associative array and domain. + * + * @param array $cookies Cookies to create the jar from + * @param string $domain Domain to set the cookies to + * + * @return self + */ + public static function fromArray(array $cookies, $domain) + { + $cookieJar = new self(); + foreach ($cookies as $name => $value) { + $cookieJar->setCookie(new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie(['Domain' => $domain, 'Name' => $name, 'Value' => $value, 'Discard' => \true])); + } + return $cookieJar; + } + /** + * @deprecated + */ + public static function getCookieValue($value) + { + return $value; + } + /** + * Evaluate if this cookie should be persisted to storage + * that survives between requests. + * + * @param SetCookie $cookie Being evaluated. + * @param bool $allowSessionCookies If we should persist session cookies + * @return bool + */ + public static function shouldPersist(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie $cookie, $allowSessionCookies = \false) + { + if ($cookie->getExpires() || $allowSessionCookies) { + if (!$cookie->getDiscard()) { + return \true; + } + } + return \false; + } + /** + * Finds and returns the cookie based on the name + * + * @param string $name cookie name to search for + * @return SetCookie|null cookie that was found or null if not found + */ + public function getCookieByName($name) + { + // don't allow a null name + if ($name === null) { + return null; + } + foreach ($this->cookies as $cookie) { + if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) { + return $cookie; + } + } + } + public function toArray() + { + return \array_map(function (\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie $cookie) { + return $cookie->toArray(); + }, $this->getIterator()->getArrayCopy()); + } + public function clear($domain = null, $path = null, $name = null) + { + if (!$domain) { + $this->cookies = []; + return; + } elseif (!$path) { + $this->cookies = \array_filter($this->cookies, function (\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie $cookie) use($path, $domain) { + return !$cookie->matchesDomain($domain); + }); + } elseif (!$name) { + $this->cookies = \array_filter($this->cookies, function (\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie $cookie) use($path, $domain) { + return !($cookie->matchesPath($path) && $cookie->matchesDomain($domain)); + }); + } else { + $this->cookies = \array_filter($this->cookies, function (\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie $cookie) use($path, $domain, $name) { + return !($cookie->getName() == $name && $cookie->matchesPath($path) && $cookie->matchesDomain($domain)); + }); + } + } + public function clearSessionCookies() + { + $this->cookies = \array_filter($this->cookies, function (\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie $cookie) { + return !$cookie->getDiscard() && $cookie->getExpires(); + }); + } + public function setCookie(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie $cookie) + { + // If the name string is empty (but not 0), ignore the set-cookie + // string entirely. + $name = $cookie->getName(); + if (!$name && $name !== '0') { + return \false; + } + // Only allow cookies with set and valid domain, name, value + $result = $cookie->validate(); + if ($result !== \true) { + if ($this->strictMode) { + throw new \RuntimeException('Invalid cookie: ' . $result); + } else { + $this->removeCookieIfEmpty($cookie); + return \false; + } + } + // Resolve conflicts with previously set cookies + foreach ($this->cookies as $i => $c) { + // Two cookies are identical, when their path, and domain are + // identical. + if ($c->getPath() != $cookie->getPath() || $c->getDomain() != $cookie->getDomain() || $c->getName() != $cookie->getName()) { + continue; + } + // The previously set cookie is a discard cookie and this one is + // not so allow the new cookie to be set + if (!$cookie->getDiscard() && $c->getDiscard()) { + unset($this->cookies[$i]); + continue; + } + // If the new cookie's expiration is further into the future, then + // replace the old cookie + if ($cookie->getExpires() > $c->getExpires()) { + unset($this->cookies[$i]); + continue; + } + // If the value has changed, we better change it + if ($cookie->getValue() !== $c->getValue()) { + unset($this->cookies[$i]); + continue; + } + // The cookie exists, so no need to continue + return \false; + } + $this->cookies[] = $cookie; + return \true; + } + public function count() + { + return \count($this->cookies); + } + public function getIterator() + { + return new \ArrayIterator(\array_values($this->cookies)); + } + public function extractCookies(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response) + { + if ($cookieHeader = $response->getHeader('Set-Cookie')) { + foreach ($cookieHeader as $cookie) { + $sc = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie::fromString($cookie); + if (!$sc->getDomain()) { + $sc->setDomain($request->getUri()->getHost()); + } + if (0 !== \strpos($sc->getPath(), '/')) { + $sc->setPath($this->getCookiePathFromRequest($request)); + } + $this->setCookie($sc); + } + } + } + /** + * Computes cookie path following RFC 6265 section 5.1.4 + * + * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 + * + * @param RequestInterface $request + * @return string + */ + private function getCookiePathFromRequest(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request) + { + $uriPath = $request->getUri()->getPath(); + if ('' === $uriPath) { + return '/'; + } + if (0 !== \strpos($uriPath, '/')) { + return '/'; + } + if ('/' === $uriPath) { + return '/'; + } + if (0 === ($lastSlashPos = \strrpos($uriPath, '/'))) { + return '/'; + } + return \substr($uriPath, 0, $lastSlashPos); + } + public function withCookieHeader(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request) + { + $values = []; + $uri = $request->getUri(); + $scheme = $uri->getScheme(); + $host = $uri->getHost(); + $path = $uri->getPath() ?: '/'; + foreach ($this->cookies as $cookie) { + if ($cookie->matchesPath($path) && $cookie->matchesDomain($host) && !$cookie->isExpired() && (!$cookie->getSecure() || $scheme === 'https')) { + $values[] = $cookie->getName() . '=' . $cookie->getValue(); + } + } + return $values ? $request->withHeader('Cookie', \implode('; ', $values)) : $request; + } + /** + * If a cookie already exists and the server asks to set it again with a + * null value, the cookie must be deleted. + * + * @param SetCookie $cookie + */ + private function removeCookieIfEmpty(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie $cookie) + { + $cookieValue = $cookie->getValue(); + if ($cookieValue === null || $cookieValue === '') { + $this->clear($cookie->getDomain(), $cookie->getPath(), $cookie->getName()); + } + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php new file mode 100644 index 00000000..445ac6c9 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php @@ -0,0 +1,76 @@ +filename = $cookieFile; + $this->storeSessionCookies = $storeSessionCookies; + if (\file_exists($cookieFile)) { + $this->load($cookieFile); + } + } + /** + * Saves the file when shutting down + */ + public function __destruct() + { + $this->save($this->filename); + } + /** + * Saves the cookies to a file. + * + * @param string $filename File to save + * @throws \RuntimeException if the file cannot be found or created + */ + public function save($filename) + { + $json = []; + foreach ($this as $cookie) { + /** @var SetCookie $cookie */ + if (\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { + $json[] = $cookie->toArray(); + } + } + $jsonStr = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\json_encode($json); + if (\false === \file_put_contents($filename, $jsonStr)) { + throw new \RuntimeException("Unable to save file {$filename}"); + } + } + /** + * Load cookies from a JSON formatted file. + * + * Old cookies are kept unless overwritten by newly loaded ones. + * + * @param string $filename Cookie file to load. + * @throws \RuntimeException if the file cannot be loaded. + */ + public function load($filename) + { + $json = \file_get_contents($filename); + if (\false === $json) { + throw new \RuntimeException("Unable to load file {$filename}"); + } elseif ($json === '') { + return; + } + $data = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\json_decode($json, \true); + if (\is_array($data)) { + foreach (\json_decode($json, \true) as $cookie) { + $this->setCookie(new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie($cookie)); + } + } elseif (\strlen($data)) { + throw new \RuntimeException("Invalid cookie file: {$filename}"); + } + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php new file mode 100644 index 00000000..16c6a68c --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php @@ -0,0 +1,66 @@ +sessionKey = $sessionKey; + $this->storeSessionCookies = $storeSessionCookies; + $this->load(); + } + /** + * Saves cookies to session when shutting down + */ + public function __destruct() + { + $this->save(); + } + /** + * Save cookies to the client session + */ + public function save() + { + $json = []; + foreach ($this as $cookie) { + /** @var SetCookie $cookie */ + if (\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { + $json[] = $cookie->toArray(); + } + } + $_SESSION[$this->sessionKey] = \json_encode($json); + } + /** + * Load the contents of the client session into the data array + */ + protected function load() + { + if (!isset($_SESSION[$this->sessionKey])) { + return; + } + $data = \json_decode($_SESSION[$this->sessionKey], \true); + if (\is_array($data)) { + foreach ($data as $cookie) { + $this->setCookie(new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Cookie\SetCookie($cookie)); + } + } elseif (\strlen($data)) { + throw new \RuntimeException("Invalid cookie data"); + } + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php new file mode 100644 index 00000000..fecf565f --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -0,0 +1,343 @@ + null, 'Value' => null, 'Domain' => null, 'Path' => '/', 'Max-Age' => null, 'Expires' => null, 'Secure' => \false, 'Discard' => \false, 'HttpOnly' => \false]; + /** @var array Cookie data */ + private $data; + /** + * Create a new SetCookie object from a string + * + * @param string $cookie Set-Cookie header string + * + * @return self + */ + public static function fromString($cookie) + { + // Create the default return array + $data = self::$defaults; + // Explode the cookie string using a series of semicolons + $pieces = \array_filter(\array_map('trim', \explode(';', $cookie))); + // The name of the cookie (first kvp) must exist and include an equal sign. + if (empty($pieces[0]) || !\strpos($pieces[0], '=')) { + return new self($data); + } + // Add the cookie pieces into the parsed data array + foreach ($pieces as $part) { + $cookieParts = \explode('=', $part, 2); + $key = \trim($cookieParts[0]); + $value = isset($cookieParts[1]) ? \trim($cookieParts[1], " \n\r\t\0\v") : \true; + // Only check for non-cookies when cookies have been found + if (empty($data['Name'])) { + $data['Name'] = $key; + $data['Value'] = $value; + } else { + foreach (\array_keys(self::$defaults) as $search) { + if (!\strcasecmp($search, $key)) { + $data[$search] = $value; + continue 2; + } + } + $data[$key] = $value; + } + } + return new self($data); + } + /** + * @param array $data Array of cookie data provided by a Cookie parser + */ + public function __construct(array $data = []) + { + $this->data = \array_replace(self::$defaults, $data); + // Extract the Expires value and turn it into a UNIX timestamp if needed + if (!$this->getExpires() && $this->getMaxAge()) { + // Calculate the Expires date + $this->setExpires(\time() + $this->getMaxAge()); + } elseif ($this->getExpires() && !\is_numeric($this->getExpires())) { + $this->setExpires($this->getExpires()); + } + } + public function __toString() + { + $str = $this->data['Name'] . '=' . $this->data['Value'] . '; '; + foreach ($this->data as $k => $v) { + if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== \false) { + if ($k === 'Expires') { + $str .= 'Expires=' . \gmdate('_PhpScoper5bbb1f4b001f3\\D, d M Y H:i:s \\G\\M\\T', $v) . '; '; + } else { + $str .= ($v === \true ? $k : "{$k}={$v}") . '; '; + } + } + } + return \rtrim($str, '; '); + } + public function toArray() + { + return $this->data; + } + /** + * Get the cookie name + * + * @return string + */ + public function getName() + { + return $this->data['Name']; + } + /** + * Set the cookie name + * + * @param string $name Cookie name + */ + public function setName($name) + { + $this->data['Name'] = $name; + } + /** + * Get the cookie value + * + * @return string + */ + public function getValue() + { + return $this->data['Value']; + } + /** + * Set the cookie value + * + * @param string $value Cookie value + */ + public function setValue($value) + { + $this->data['Value'] = $value; + } + /** + * Get the domain + * + * @return string|null + */ + public function getDomain() + { + return $this->data['Domain']; + } + /** + * Set the domain of the cookie + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->data['Domain'] = $domain; + } + /** + * Get the path + * + * @return string + */ + public function getPath() + { + return $this->data['Path']; + } + /** + * Set the path of the cookie + * + * @param string $path Path of the cookie + */ + public function setPath($path) + { + $this->data['Path'] = $path; + } + /** + * Maximum lifetime of the cookie in seconds + * + * @return int|null + */ + public function getMaxAge() + { + return $this->data['Max-Age']; + } + /** + * Set the max-age of the cookie + * + * @param int $maxAge Max age of the cookie in seconds + */ + public function setMaxAge($maxAge) + { + $this->data['Max-Age'] = $maxAge; + } + /** + * The UNIX timestamp when the cookie Expires + * + * @return mixed + */ + public function getExpires() + { + return $this->data['Expires']; + } + /** + * Set the unix timestamp for which the cookie will expire + * + * @param int $timestamp Unix timestamp + */ + public function setExpires($timestamp) + { + $this->data['Expires'] = \is_numeric($timestamp) ? (int) $timestamp : \strtotime($timestamp); + } + /** + * Get whether or not this is a secure cookie + * + * @return null|bool + */ + public function getSecure() + { + return $this->data['Secure']; + } + /** + * Set whether or not the cookie is secure + * + * @param bool $secure Set to true or false if secure + */ + public function setSecure($secure) + { + $this->data['Secure'] = $secure; + } + /** + * Get whether or not this is a session cookie + * + * @return null|bool + */ + public function getDiscard() + { + return $this->data['Discard']; + } + /** + * Set whether or not this is a session cookie + * + * @param bool $discard Set to true or false if this is a session cookie + */ + public function setDiscard($discard) + { + $this->data['Discard'] = $discard; + } + /** + * Get whether or not this is an HTTP only cookie + * + * @return bool + */ + public function getHttpOnly() + { + return $this->data['HttpOnly']; + } + /** + * Set whether or not this is an HTTP only cookie + * + * @param bool $httpOnly Set to true or false if this is HTTP only + */ + public function setHttpOnly($httpOnly) + { + $this->data['HttpOnly'] = $httpOnly; + } + /** + * Check if the cookie matches a path value. + * + * A request-path path-matches a given cookie-path if at least one of + * the following conditions holds: + * + * - The cookie-path and the request-path are identical. + * - The cookie-path is a prefix of the request-path, and the last + * character of the cookie-path is %x2F ("/"). + * - The cookie-path is a prefix of the request-path, and the first + * character of the request-path that is not included in the cookie- + * path is a %x2F ("/") character. + * + * @param string $requestPath Path to check against + * + * @return bool + */ + public function matchesPath($requestPath) + { + $cookiePath = $this->getPath(); + // Match on exact matches or when path is the default empty "/" + if ($cookiePath === '/' || $cookiePath == $requestPath) { + return \true; + } + // Ensure that the cookie-path is a prefix of the request path. + if (0 !== \strpos($requestPath, $cookiePath)) { + return \false; + } + // Match if the last character of the cookie-path is "/" + if (\substr($cookiePath, -1, 1) === '/') { + return \true; + } + // Match if the first character not included in cookie path is "/" + return \substr($requestPath, \strlen($cookiePath), 1) === '/'; + } + /** + * Check if the cookie matches a domain value + * + * @param string $domain Domain to check against + * + * @return bool + */ + public function matchesDomain($domain) + { + // Remove the leading '.' as per spec in RFC 6265. + // http://tools.ietf.org/html/rfc6265#section-5.2.3 + $cookieDomain = \ltrim($this->getDomain(), '.'); + // Domain not set or exact match. + if (!$cookieDomain || !\strcasecmp($domain, $cookieDomain)) { + return \true; + } + // Matching the subdomain according to RFC 6265. + // http://tools.ietf.org/html/rfc6265#section-5.1.3 + if (\filter_var($domain, \FILTER_VALIDATE_IP)) { + return \false; + } + return (bool) \preg_match('/\\.' . \preg_quote($cookieDomain, '/') . '$/', $domain); + } + /** + * Check if the cookie is expired + * + * @return bool + */ + public function isExpired() + { + return $this->getExpires() !== null && \time() > $this->getExpires(); + } + /** + * Check if the cookie is valid according to RFC 6265 + * + * @return bool|string Returns true if valid or an error message if invalid + */ + public function validate() + { + // Names must not be empty, but can be 0 + $name = $this->getName(); + if (empty($name) && !\is_numeric($name)) { + return 'The cookie name must not be empty'; + } + // Check if any of the invalid characters are present in the cookie name + if (\preg_match('/[\\x00-\\x20\\x22\\x28-\\x29\\x2c\\x2f\\x3a-\\x40\\x5c\\x7b\\x7d\\x7f]/', $name)) { + return 'Cookie name must not contain invalid characters: ASCII ' . 'Control characters (0-31;127), space, tab and the ' . 'following characters: ()<>@,;:\\"/?={}'; + } + // Value must not be empty, but can be 0 + $value = $this->getValue(); + if (empty($value) && !\is_numeric($value)) { + return 'The cookie value must not be empty'; + } + // Domains must not be empty, but can be 0 + // A "0" is not a valid internet domain, but may be used as server name + // in a private network. + $domain = $this->getDomain(); + if (empty($domain) && !\is_numeric($domain)) { + return 'The cookie domain must not be empty'; + } + return \true; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php new file mode 100644 index 00000000..941a52eb --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php @@ -0,0 +1,19 @@ +getStatusCode() : 0; + parent::__construct($message, $code, $previous); + $this->request = $request; + $this->response = $response; + $this->handlerContext = $handlerContext; + } + /** + * Wrap non-RequestExceptions with a RequestException + * + * @param RequestInterface $request + * @param \Exception $e + * + * @return RequestException + */ + public static function wrapException(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, \Exception $e) + { + return $e instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\RequestException ? $e : new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\RequestException($e->getMessage(), $request, null, $e); + } + /** + * Factory method to create a new exception with a normalized error message + * + * @param RequestInterface $request Request + * @param ResponseInterface $response Response received + * @param \Exception $previous Previous exception + * @param array $ctx Optional handler context. + * + * @return self + */ + public static function create(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response = null, \Exception $previous = null, array $ctx = []) + { + if (!$response) { + return new self('Error completing request', $request, null, $previous, $ctx); + } + $level = (int) \floor($response->getStatusCode() / 100); + if ($level === 4) { + $label = 'Client error'; + $className = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\ClientException::class; + } elseif ($level === 5) { + $label = 'Server error'; + $className = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\ServerException::class; + } else { + $label = 'Unsuccessful request'; + $className = __CLASS__; + } + $uri = $request->getUri(); + $uri = static::obfuscateUri($uri); + // Client Error: `GET /` resulted in a `404 Not Found` response: + // ... (truncated) + $message = \sprintf('%s: `%s %s` resulted in a `%s %s` response', $label, $request->getMethod(), $uri, $response->getStatusCode(), $response->getReasonPhrase()); + $summary = static::getResponseBodySummary($response); + if ($summary !== null) { + $message .= ":\n{$summary}\n"; + } + return new $className($message, $request, $response, $previous, $ctx); + } + /** + * Get a short summary of the response + * + * Will return `null` if the response is not printable. + * + * @param ResponseInterface $response + * + * @return string|null + */ + public static function getResponseBodySummary(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response) + { + $body = $response->getBody(); + if (!$body->isSeekable()) { + return null; + } + $size = $body->getSize(); + if ($size === 0) { + return null; + } + $summary = $body->read(120); + $body->rewind(); + if ($size > 120) { + $summary .= ' (truncated...)'; + } + // Matches any printable character, including unicode characters: + // letters, marks, numbers, punctuation, spacing, and separators. + if (\preg_match('/[^\\pL\\pM\\pN\\pP\\pS\\pZ\\n\\r\\t]/', $summary)) { + return null; + } + return $summary; + } + /** + * Obfuscates URI if there is an username and a password present + * + * @param UriInterface $uri + * + * @return UriInterface + */ + private static function obfuscateUri($uri) + { + $userInfo = $uri->getUserInfo(); + if (\false !== ($pos = \strpos($userInfo, ':'))) { + return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***'); + } + return $uri; + } + /** + * Get the request that caused the exception + * + * @return RequestInterface + */ + public function getRequest() + { + return $this->request; + } + /** + * Get the associated response + * + * @return ResponseInterface|null + */ + public function getResponse() + { + return $this->response; + } + /** + * Check if a response was received + * + * @return bool + */ + public function hasResponse() + { + return $this->response !== null; + } + /** + * Get contextual information about the error from the underlying handler. + * + * The contents of this array will vary depending on which handler you are + * using. It may also be just an empty array. Relying on this data will + * couple you to a specific handler, but can give more debug information + * when needed. + * + * @return array + */ + public function getHandlerContext() + { + return $this->handlerContext; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php new file mode 100644 index 00000000..a84cb992 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php @@ -0,0 +1,25 @@ +stream = $stream; + $msg = $msg ?: 'Could not seek the stream to position ' . $pos; + parent::__construct($msg); + } + /** + * @return StreamInterface + */ + public function getStream() + { + return $this->stream; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php new file mode 100644 index 00000000..0c52a191 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php @@ -0,0 +1,10 @@ +maxHandles = $maxHandles; + } + public function create(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + if (isset($options['curl']['body_as_string'])) { + $options['_body_as_string'] = $options['curl']['body_as_string']; + unset($options['curl']['body_as_string']); + } + $easy = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle(); + $easy->request = $request; + $easy->options = $options; + $conf = $this->getDefaultConf($easy); + $this->applyMethod($easy, $conf); + $this->applyHandlerOptions($easy, $conf); + $this->applyHeaders($easy, $conf); + unset($conf['_headers']); + // Add handler options from the request configuration options + if (isset($options['curl'])) { + $conf = \array_replace($conf, $options['curl']); + } + $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); + $easy->handle = $this->handles ? \array_pop($this->handles) : \curl_init(); + \curl_setopt_array($easy->handle, $conf); + return $easy; + } + public function release(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy) + { + $resource = $easy->handle; + unset($easy->handle); + if (\count($this->handles) >= $this->maxHandles) { + \curl_close($resource); + } else { + // Remove all callback functions as they can hold onto references + // and are not cleaned up by curl_reset. Using curl_setopt_array + // does not work for some reason, so removing each one + // individually. + \curl_setopt($resource, \CURLOPT_HEADERFUNCTION, null); + \curl_setopt($resource, \CURLOPT_READFUNCTION, null); + \curl_setopt($resource, \CURLOPT_WRITEFUNCTION, null); + \curl_setopt($resource, \CURLOPT_PROGRESSFUNCTION, null); + \curl_reset($resource); + $this->handles[] = $resource; + } + } + /** + * Completes a cURL transaction, either returning a response promise or a + * rejected promise. + * + * @param callable $handler + * @param EasyHandle $easy + * @param CurlFactoryInterface $factory Dictates how the handle is released + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public static function finish(callable $handler, \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy, \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\CurlFactoryInterface $factory) + { + if (isset($easy->options['on_stats'])) { + self::invokeStats($easy); + } + if (!$easy->response || $easy->errno) { + return self::finishError($handler, $easy, $factory); + } + // Return the response if it is present and there is no error. + $factory->release($easy); + // Rewind the body of the response if possible. + $body = $easy->response->getBody(); + if ($body->isSeekable()) { + $body->rewind(); + } + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\FulfilledPromise($easy->response); + } + private static function invokeStats(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy) + { + $curlStats = \curl_getinfo($easy->handle); + $stats = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\TransferStats($easy->request, $easy->response, $curlStats['total_time'], $easy->errno, $curlStats); + \call_user_func($easy->options['on_stats'], $stats); + } + private static function finishError(callable $handler, \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy, \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\CurlFactoryInterface $factory) + { + // Get error information and release the handle to the factory. + $ctx = ['errno' => $easy->errno, 'error' => \curl_error($easy->handle)] + \curl_getinfo($easy->handle); + $factory->release($easy); + // Retry when nothing is present or when curl failed to rewind. + if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) { + return self::retryFailedRewind($handler, $easy, $ctx); + } + return self::createRejection($easy, $ctx); + } + private static function createRejection(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy, array $ctx) + { + static $connectionErrors = [\CURLE_OPERATION_TIMEOUTED => \true, \CURLE_COULDNT_RESOLVE_HOST => \true, \CURLE_COULDNT_CONNECT => \true, \CURLE_SSL_CONNECT_ERROR => \true, \CURLE_GOT_NOTHING => \true]; + // If an exception was encountered during the onHeaders event, then + // return a rejected promise that wraps that exception. + if ($easy->onHeadersException) { + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\rejection_for(new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\RequestException('An error was encountered during the on_headers event', $easy->request, $easy->response, $easy->onHeadersException, $ctx)); + } + $message = \sprintf('cURL error %s: %s (%s)', $ctx['errno'], $ctx['error'], 'see http://curl.haxx.se/libcurl/c/libcurl-errors.html'); + // Create a connection exception if it was a specific error code. + $error = isset($connectionErrors[$easy->errno]) ? new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\ConnectException($message, $easy->request, null, $ctx) : new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\RequestException($message, $easy->request, $easy->response, null, $ctx); + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\rejection_for($error); + } + private function getDefaultConf(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy) + { + $conf = ['_headers' => $easy->request->getHeaders(), \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), \CURLOPT_RETURNTRANSFER => \false, \CURLOPT_HEADER => \false, \CURLOPT_CONNECTTIMEOUT => 150]; + if (\defined('CURLOPT_PROTOCOLS')) { + $conf[\CURLOPT_PROTOCOLS] = \CURLPROTO_HTTP | \CURLPROTO_HTTPS; + } + $version = $easy->request->getProtocolVersion(); + if ($version == 1.1) { + $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; + } elseif ($version == 2.0) { + $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; + } else { + $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; + } + return $conf; + } + private function applyMethod(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy, array &$conf) + { + $body = $easy->request->getBody(); + $size = $body->getSize(); + if ($size === null || $size > 0) { + $this->applyBody($easy->request, $easy->options, $conf); + return; + } + $method = $easy->request->getMethod(); + if ($method === 'PUT' || $method === 'POST') { + // See http://tools.ietf.org/html/rfc7230#section-3.3.2 + if (!$easy->request->hasHeader('Content-Length')) { + $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; + } + } elseif ($method === 'HEAD') { + $conf[\CURLOPT_NOBODY] = \true; + unset($conf[\CURLOPT_WRITEFUNCTION], $conf[\CURLOPT_READFUNCTION], $conf[\CURLOPT_FILE], $conf[\CURLOPT_INFILE]); + } + } + private function applyBody(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options, array &$conf) + { + $size = $request->hasHeader('Content-Length') ? (int) $request->getHeaderLine('Content-Length') : null; + // Send the body as a string if the size is less than 1MB OR if the + // [curl][body_as_string] request value is set. + if ($size !== null && $size < 1000000 || !empty($options['_body_as_string'])) { + $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody(); + // Don't duplicate the Content-Length header + $this->removeHeader('Content-Length', $conf); + $this->removeHeader('Transfer-Encoding', $conf); + } else { + $conf[\CURLOPT_UPLOAD] = \true; + if ($size !== null) { + $conf[\CURLOPT_INFILESIZE] = $size; + $this->removeHeader('Content-Length', $conf); + } + $body = $request->getBody(); + if ($body->isSeekable()) { + $body->rewind(); + } + $conf[\CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use($body) { + return $body->read($length); + }; + } + // If the Expect header is not present, prevent curl from adding it + if (!$request->hasHeader('Expect')) { + $conf[\CURLOPT_HTTPHEADER][] = 'Expect:'; + } + // cURL sometimes adds a content-type by default. Prevent this. + if (!$request->hasHeader('Content-Type')) { + $conf[\CURLOPT_HTTPHEADER][] = 'Content-Type:'; + } + } + private function applyHeaders(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy, array &$conf) + { + foreach ($conf['_headers'] as $name => $values) { + foreach ($values as $value) { + $value = (string) $value; + if ($value === '') { + // cURL requires a special format for empty headers. + // See https://github.com/guzzle/guzzle/issues/1882 for more details. + $conf[\CURLOPT_HTTPHEADER][] = "{$name};"; + } else { + $conf[\CURLOPT_HTTPHEADER][] = "{$name}: {$value}"; + } + } + } + // Remove the Accept header if one was not set + if (!$easy->request->hasHeader('Accept')) { + $conf[\CURLOPT_HTTPHEADER][] = 'Accept:'; + } + } + /** + * Remove a header from the options array. + * + * @param string $name Case-insensitive header to remove + * @param array $options Array of options to modify + */ + private function removeHeader($name, array &$options) + { + foreach (\array_keys($options['_headers']) as $key) { + if (!\strcasecmp($key, $name)) { + unset($options['_headers'][$key]); + return; + } + } + } + private function applyHandlerOptions(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy, array &$conf) + { + $options = $easy->options; + if (isset($options['verify'])) { + if ($options['verify'] === \false) { + unset($conf[\CURLOPT_CAINFO]); + $conf[\CURLOPT_SSL_VERIFYHOST] = 0; + $conf[\CURLOPT_SSL_VERIFYPEER] = \false; + } else { + $conf[\CURLOPT_SSL_VERIFYHOST] = 2; + $conf[\CURLOPT_SSL_VERIFYPEER] = \true; + if (\is_string($options['verify'])) { + // Throw an error if the file/folder/link path is not valid or doesn't exist. + if (!\file_exists($options['verify'])) { + throw new \InvalidArgumentException("SSL CA bundle not found: {$options['verify']}"); + } + // If it's a directory or a link to a directory use CURLOPT_CAPATH. + // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. + if (\is_dir($options['verify']) || \is_link($options['verify']) && \is_dir(\readlink($options['verify']))) { + $conf[\CURLOPT_CAPATH] = $options['verify']; + } else { + $conf[\CURLOPT_CAINFO] = $options['verify']; + } + } + } + } + if (!empty($options['decode_content'])) { + $accept = $easy->request->getHeaderLine('Accept-Encoding'); + if ($accept) { + $conf[\CURLOPT_ENCODING] = $accept; + } else { + $conf[\CURLOPT_ENCODING] = ''; + // Don't let curl send the header over the wire + $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; + } + } + if (isset($options['sink'])) { + $sink = $options['sink']; + if (!\is_string($sink)) { + $sink = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\stream_for($sink); + } elseif (!\is_dir(\dirname($sink))) { + // Ensure that the directory exists before failing in curl. + throw new \RuntimeException(\sprintf('Directory %s does not exist for sink value of %s', \dirname($sink), $sink)); + } else { + $sink = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\LazyOpenStream($sink, 'w+'); + } + $easy->sink = $sink; + $conf[\CURLOPT_WRITEFUNCTION] = function ($ch, $write) use($sink) { + return $sink->write($write); + }; + } else { + // Use a default temp stream if no sink was set. + $conf[\CURLOPT_FILE] = \fopen('php://temp', 'w+'); + $easy->sink = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\stream_for($conf[\CURLOPT_FILE]); + } + $timeoutRequiresNoSignal = \false; + if (isset($options['timeout'])) { + $timeoutRequiresNoSignal |= $options['timeout'] < 1; + $conf[\CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; + } + // CURL default value is CURL_IPRESOLVE_WHATEVER + if (isset($options['force_ip_resolve'])) { + if ('v4' === $options['force_ip_resolve']) { + $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4; + } elseif ('v6' === $options['force_ip_resolve']) { + $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V6; + } + } + if (isset($options['connect_timeout'])) { + $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; + $conf[\CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; + } + if ($timeoutRequiresNoSignal && \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN') { + $conf[\CURLOPT_NOSIGNAL] = \true; + } + if (isset($options['proxy'])) { + if (!\is_array($options['proxy'])) { + $conf[\CURLOPT_PROXY] = $options['proxy']; + } else { + $scheme = $easy->request->getUri()->getScheme(); + if (isset($options['proxy'][$scheme])) { + $host = $easy->request->getUri()->getHost(); + if (!isset($options['proxy']['no']) || !\_PhpScoper5bbb1f4b001f3\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no'])) { + $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme]; + } + } + } + } + if (isset($options['cert'])) { + $cert = $options['cert']; + if (\is_array($cert)) { + $conf[\CURLOPT_SSLCERTPASSWD] = $cert[1]; + $cert = $cert[0]; + } + if (!\file_exists($cert)) { + throw new \InvalidArgumentException("SSL certificate not found: {$cert}"); + } + $conf[\CURLOPT_SSLCERT] = $cert; + } + if (isset($options['ssl_key'])) { + $sslKey = $options['ssl_key']; + if (\is_array($sslKey)) { + $conf[\CURLOPT_SSLKEYPASSWD] = $sslKey[1]; + $sslKey = $sslKey[0]; + } + if (!\file_exists($sslKey)) { + throw new \InvalidArgumentException("SSL private key not found: {$sslKey}"); + } + $conf[\CURLOPT_SSLKEY] = $sslKey; + } + if (isset($options['progress'])) { + $progress = $options['progress']; + if (!\is_callable($progress)) { + throw new \InvalidArgumentException('progress client option must be callable'); + } + $conf[\CURLOPT_NOPROGRESS] = \false; + $conf[\CURLOPT_PROGRESSFUNCTION] = function () use($progress) { + $args = \func_get_args(); + // PHP 5.5 pushed the handle onto the start of the args + if (\is_resource($args[0])) { + \array_shift($args); + } + \call_user_func_array($progress, $args); + }; + } + if (!empty($options['debug'])) { + $conf[\CURLOPT_STDERR] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\debug_resource($options['debug']); + $conf[\CURLOPT_VERBOSE] = \true; + } + } + /** + * This function ensures that a response was set on a transaction. If one + * was not set, then the request is retried if possible. This error + * typically means you are sending a payload, curl encountered a + * "Connection died, retrying a fresh connect" error, tried to rewind the + * stream, and then encountered a "necessary data rewind wasn't possible" + * error, causing the request to be sent through curl_multi_info_read() + * without an error status. + */ + private static function retryFailedRewind(callable $handler, \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy, array $ctx) + { + try { + // Only rewind if the body has been read from. + $body = $easy->request->getBody(); + if ($body->tell() > 0) { + $body->rewind(); + } + } catch (\RuntimeException $e) { + $ctx['error'] = 'The connection unexpectedly failed without ' . 'providing an error. The request would have been retried, ' . 'but attempting to rewind the request body failed. ' . 'Exception: ' . $e; + return self::createRejection($easy, $ctx); + } + // Retry no more than 3 times before giving up. + if (!isset($easy->options['_curl_retries'])) { + $easy->options['_curl_retries'] = 1; + } elseif ($easy->options['_curl_retries'] == 2) { + $ctx['error'] = 'The cURL request was retried 3 times ' . 'and did not succeed. The most likely reason for the failure ' . 'is that cURL was unable to rewind the body of the request ' . 'and subsequent retries resulted in the same error. Turn on ' . 'the debug option to see what went wrong. See ' . 'https://bugs.php.net/bug.php?id=47204 for more information.'; + return self::createRejection($easy, $ctx); + } else { + $easy->options['_curl_retries']++; + } + return $handler($easy->request, $easy->options); + } + private function createHeaderFn(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\EasyHandle $easy) + { + if (isset($easy->options['on_headers'])) { + $onHeaders = $easy->options['on_headers']; + if (!\is_callable($onHeaders)) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + } else { + $onHeaders = null; + } + return function ($ch, $h) use($onHeaders, $easy, &$startingResponse) { + $value = \trim($h); + if ($value === '') { + $startingResponse = \true; + $easy->createResponse(); + if ($onHeaders !== null) { + try { + $onHeaders($easy->response); + } catch (\Exception $e) { + // Associate the exception with the handle and trigger + // a curl header write error by returning 0. + $easy->onHeadersException = $e; + return -1; + } + } + } elseif ($startingResponse) { + $startingResponse = \false; + $easy->headers = [$value]; + } else { + $easy->headers[] = $value; + } + return \strlen($h); + }; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php new file mode 100644 index 00000000..1326c66d --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php @@ -0,0 +1,26 @@ +factory = isset($options['handle_factory']) ? $options['handle_factory'] : new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\CurlFactory(3); + } + public function __invoke(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + if (isset($options['delay'])) { + \usleep($options['delay'] * 1000); + } + $easy = $this->factory->create($request, $options); + \curl_exec($easy->handle); + $easy->errno = \curl_errno($easy->handle); + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\CurlFactory::finish($this, $easy, $this->factory); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php new file mode 100644 index 00000000..1e6d83d7 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php @@ -0,0 +1,160 @@ +factory = isset($options['handle_factory']) ? $options['handle_factory'] : new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\CurlFactory(50); + $this->selectTimeout = isset($options['select_timeout']) ? $options['select_timeout'] : 1; + } + public function __get($name) + { + if ($name === '_mh') { + return $this->_mh = \curl_multi_init(); + } + throw new \BadMethodCallException(); + } + public function __destruct() + { + if (isset($this->_mh)) { + \curl_multi_close($this->_mh); + unset($this->_mh); + } + } + public function __invoke(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + $easy = $this->factory->create($request, $options); + $id = (int) $easy->handle; + $promise = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise([$this, 'execute'], function () use($id) { + return $this->cancel($id); + }); + $this->addRequest(['easy' => $easy, 'deferred' => $promise]); + return $promise; + } + /** + * Ticks the curl event loop. + */ + public function tick() + { + // Add any delayed handles if needed. + if ($this->delays) { + $currentTime = \microtime(\true); + foreach ($this->delays as $id => $delay) { + if ($currentTime >= $delay) { + unset($this->delays[$id]); + \curl_multi_add_handle($this->_mh, $this->handles[$id]['easy']->handle); + } + } + } + // Step through the task queue which may add additional requests. + \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\queue()->run(); + if ($this->active && \curl_multi_select($this->_mh, $this->selectTimeout) === -1) { + // Perform a usleep if a select returns -1. + // See: https://bugs.php.net/bug.php?id=61141 + \usleep(250); + } + while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { + } + $this->processMessages(); + } + /** + * Runs until all outstanding connections have completed. + */ + public function execute() + { + $queue = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\queue(); + while ($this->handles || !$queue->isEmpty()) { + // If there are no transfers, then sleep for the next delay + if (!$this->active && $this->delays) { + \usleep($this->timeToNext()); + } + $this->tick(); + } + } + private function addRequest(array $entry) + { + $easy = $entry['easy']; + $id = (int) $easy->handle; + $this->handles[$id] = $entry; + if (empty($easy->options['delay'])) { + \curl_multi_add_handle($this->_mh, $easy->handle); + } else { + $this->delays[$id] = \microtime(\true) + $easy->options['delay'] / 1000; + } + } + /** + * Cancels a handle from sending and removes references to it. + * + * @param int $id Handle ID to cancel and remove. + * + * @return bool True on success, false on failure. + */ + private function cancel($id) + { + // Cannot cancel if it has been processed. + if (!isset($this->handles[$id])) { + return \false; + } + $handle = $this->handles[$id]['easy']->handle; + unset($this->delays[$id], $this->handles[$id]); + \curl_multi_remove_handle($this->_mh, $handle); + \curl_close($handle); + return \true; + } + private function processMessages() + { + while ($done = \curl_multi_info_read($this->_mh)) { + $id = (int) $done['handle']; + \curl_multi_remove_handle($this->_mh, $done['handle']); + if (!isset($this->handles[$id])) { + // Probably was cancelled. + continue; + } + $entry = $this->handles[$id]; + unset($this->handles[$id], $this->delays[$id]); + $entry['easy']->errno = $done['result']; + $entry['deferred']->resolve(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\CurlFactory::finish($this, $entry['easy'], $this->factory)); + } + } + private function timeToNext() + { + $currentTime = \microtime(\true); + $nextTime = \PHP_INT_MAX; + foreach ($this->delays as $time) { + if ($time < $nextTime) { + $nextTime = $time; + } + } + return \max(0, $nextTime - $currentTime) * 1000000; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php new file mode 100644 index 00000000..a073a639 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php @@ -0,0 +1,67 @@ +headers)) { + throw new \RuntimeException('No headers have been received'); + } + // HTTP-version SP status-code SP reason-phrase + $startLine = \explode(' ', \array_shift($this->headers), 3); + $headers = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\headers_from_lines($this->headers); + $normalizedKeys = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\normalize_header_keys($headers); + if (!empty($this->options['decode_content']) && isset($normalizedKeys['content-encoding'])) { + $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; + unset($headers[$normalizedKeys['content-encoding']]); + if (isset($normalizedKeys['content-length'])) { + $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; + $bodyLength = (int) $this->sink->getSize(); + if ($bodyLength) { + $headers[$normalizedKeys['content-length']] = $bodyLength; + } else { + unset($headers[$normalizedKeys['content-length']]); + } + } + } + // Attach a response to the easy handle with the parsed headers. + $this->response = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Response($startLine[1], $headers, $this->sink, \substr($startLine[0], 5), isset($startLine[2]) ? (string) $startLine[2] : null); + } + public function __get($name) + { + $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: ' . $name; + throw new \BadMethodCallException($msg); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php new file mode 100644 index 00000000..99813a8e --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php @@ -0,0 +1,152 @@ +onFulfilled = $onFulfilled; + $this->onRejected = $onRejected; + if ($queue) { + \call_user_func_array([$this, 'append'], $queue); + } + } + public function __invoke(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + if (!$this->queue) { + throw new \OutOfBoundsException('Mock queue is empty'); + } + if (isset($options['delay'])) { + \usleep($options['delay'] * 1000); + } + $this->lastRequest = $request; + $this->lastOptions = $options; + $response = \array_shift($this->queue); + if (isset($options['on_headers'])) { + if (!\is_callable($options['on_headers'])) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + try { + $options['on_headers']($response); + } catch (\Exception $e) { + $msg = 'An error was encountered during the on_headers event'; + $response = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\RequestException($msg, $request, $response, $e); + } + } + if (\is_callable($response)) { + $response = \call_user_func($response, $request, $options); + } + $response = $response instanceof \Exception ? \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\rejection_for($response) : \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\promise_for($response); + return $response->then(function ($value) use($request, $options) { + $this->invokeStats($request, $options, $value); + if ($this->onFulfilled) { + \call_user_func($this->onFulfilled, $value); + } + if (isset($options['sink'])) { + $contents = (string) $value->getBody(); + $sink = $options['sink']; + if (\is_resource($sink)) { + \fwrite($sink, $contents); + } elseif (\is_string($sink)) { + \file_put_contents($sink, $contents); + } elseif ($sink instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface) { + $sink->write($contents); + } + } + return $value; + }, function ($reason) use($request, $options) { + $this->invokeStats($request, $options, null, $reason); + if ($this->onRejected) { + \call_user_func($this->onRejected, $reason); + } + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\rejection_for($reason); + }); + } + /** + * Adds one or more variadic requests, exceptions, callables, or promises + * to the queue. + */ + public function append() + { + foreach (\func_get_args() as $value) { + if ($value instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface || $value instanceof \Exception || $value instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface || \is_callable($value)) { + $this->queue[] = $value; + } else { + throw new \InvalidArgumentException('Expected a response or ' . 'exception. Found ' . \_PhpScoper5bbb1f4b001f3\GuzzleHttp\describe_type($value)); + } + } + } + /** + * Get the last received request. + * + * @return RequestInterface + */ + public function getLastRequest() + { + return $this->lastRequest; + } + /** + * Get the last received request options. + * + * @return array + */ + public function getLastOptions() + { + return $this->lastOptions; + } + /** + * Returns the number of remaining items in the queue. + * + * @return int + */ + public function count() + { + return \count($this->queue); + } + private function invokeStats(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response = null, $reason = null) + { + if (isset($options['on_stats'])) { + $stats = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\TransferStats($request, $response, 0, $reason); + \call_user_func($options['on_stats'], $stats); + } + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php new file mode 100644 index 00000000..04f27efb --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php @@ -0,0 +1,46 @@ +withoutHeader('Expect'); + // Append a content-length header if body size is zero to match + // cURL's behavior. + if (0 === $request->getBody()->getSize()) { + $request = $request->withHeader('Content-Length', 0); + } + return $this->createResponse($request, $options, $this->createStream($request, $options), $startTime); + } catch (\InvalidArgumentException $e) { + throw $e; + } catch (\Exception $e) { + // Determine if the error was a networking error. + $message = $e->getMessage(); + // This list can probably get more comprehensive. + if (\strpos($message, 'getaddrinfo') || \strpos($message, 'Connection refused') || \strpos($message, "couldn't connect to host") || \strpos($message, "connection attempt failed")) { + $e = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\ConnectException($e->getMessage(), $request, $e); + } + $e = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\RequestException::wrapException($request, $e); + $this->invokeStats($options, $request, $startTime, null, $e); + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\rejection_for($e); + } + } + private function invokeStats(array $options, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, $startTime, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response = null, $error = null) + { + if (isset($options['on_stats'])) { + $stats = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\TransferStats($request, $response, \microtime(\true) - $startTime, $error, []); + \call_user_func($options['on_stats'], $stats); + } + } + private function createResponse(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options, $stream, $startTime) + { + $hdrs = $this->lastHeaders; + $this->lastHeaders = []; + $parts = \explode(' ', \array_shift($hdrs), 3); + $ver = \explode('/', $parts[0])[1]; + $status = $parts[1]; + $reason = isset($parts[2]) ? $parts[2] : null; + $headers = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\headers_from_lines($hdrs); + list($stream, $headers) = $this->checkDecode($options, $headers, $stream); + $stream = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\stream_for($stream); + $sink = $stream; + if (\strcasecmp('HEAD', $request->getMethod())) { + $sink = $this->createSink($stream, $options); + } + $response = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Response($status, $headers, $sink, $ver, $reason); + if (isset($options['on_headers'])) { + try { + $options['on_headers']($response); + } catch (\Exception $e) { + $msg = 'An error was encountered during the on_headers event'; + $ex = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\RequestException($msg, $request, $response, $e); + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\rejection_for($ex); + } + } + // Do not drain when the request is a HEAD request because they have + // no body. + if ($sink !== $stream) { + $this->drain($stream, $sink, $response->getHeaderLine('Content-Length')); + } + $this->invokeStats($options, $request, $startTime, $response, null); + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\FulfilledPromise($response); + } + private function createSink(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $stream, array $options) + { + if (!empty($options['stream'])) { + return $stream; + } + $sink = isset($options['sink']) ? $options['sink'] : \fopen('php://temp', 'r+'); + return \is_string($sink) ? new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\LazyOpenStream($sink, 'w+') : \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\stream_for($sink); + } + private function checkDecode(array $options, array $headers, $stream) + { + // Automatically decode responses when instructed. + if (!empty($options['decode_content'])) { + $normalizedKeys = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\normalize_header_keys($headers); + if (isset($normalizedKeys['content-encoding'])) { + $encoding = $headers[$normalizedKeys['content-encoding']]; + if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { + $stream = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\InflateStream(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\stream_for($stream)); + $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; + // Remove content-encoding header + unset($headers[$normalizedKeys['content-encoding']]); + // Fix content-length header + if (isset($normalizedKeys['content-length'])) { + $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; + $length = (int) $stream->getSize(); + if ($length === 0) { + unset($headers[$normalizedKeys['content-length']]); + } else { + $headers[$normalizedKeys['content-length']] = [$length]; + } + } + } + } + } + return [$stream, $headers]; + } + /** + * Drains the source stream into the "sink" client option. + * + * @param StreamInterface $source + * @param StreamInterface $sink + * @param string $contentLength Header specifying the amount of + * data to read. + * + * @return StreamInterface + * @throws \RuntimeException when the sink option is invalid. + */ + private function drain(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $source, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $sink, $contentLength) + { + // If a content-length header is provided, then stop reading once + // that number of bytes has been read. This can prevent infinitely + // reading from a stream when dealing with servers that do not honor + // Connection: Close headers. + \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\copy_to_stream($source, $sink, \strlen($contentLength) > 0 && (int) $contentLength > 0 ? (int) $contentLength : -1); + $sink->seek(0); + $source->close(); + return $sink; + } + /** + * Create a resource and check to ensure it was created successfully + * + * @param callable $callback Callable that returns stream resource + * + * @return resource + * @throws \RuntimeException on error + */ + private function createResource(callable $callback) + { + $errors = null; + \set_error_handler(function ($_, $msg, $file, $line) use(&$errors) { + $errors[] = ['message' => $msg, 'file' => $file, 'line' => $line]; + return \true; + }); + $resource = $callback(); + \restore_error_handler(); + if (!$resource) { + $message = 'Error creating resource: '; + foreach ($errors as $err) { + foreach ($err as $key => $value) { + $message .= "[{$key}] {$value}" . \PHP_EOL; + } + } + throw new \RuntimeException(\trim($message)); + } + return $resource; + } + private function createStream(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + static $methods; + if (!$methods) { + $methods = \array_flip(\get_class_methods(__CLASS__)); + } + // HTTP/1.1 streams using the PHP stream wrapper require a + // Connection: close header + if ($request->getProtocolVersion() == '1.1' && !$request->hasHeader('Connection')) { + $request = $request->withHeader('Connection', 'close'); + } + // Ensure SSL is verified by default + if (!isset($options['verify'])) { + $options['verify'] = \true; + } + $params = []; + $context = $this->getDefaultContext($request); + if (isset($options['on_headers']) && !\is_callable($options['on_headers'])) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + if (!empty($options)) { + foreach ($options as $key => $value) { + $method = "add_{$key}"; + if (isset($methods[$method])) { + $this->{$method}($request, $context, $value, $params); + } + } + } + if (isset($options['stream_context'])) { + if (!\is_array($options['stream_context'])) { + throw new \InvalidArgumentException('stream_context must be an array'); + } + $context = \array_replace_recursive($context, $options['stream_context']); + } + // Microsoft NTLM authentication only supported with curl handler + if (isset($options['auth']) && \is_array($options['auth']) && isset($options['auth'][2]) && 'ntlm' == $options['auth'][2]) { + throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); + } + $uri = $this->resolveHost($request, $options); + $context = $this->createResource(function () use($context, $params) { + return \stream_context_create($context, $params); + }); + return $this->createResource(function () use($uri, &$http_response_header, $context, $options) { + $resource = \fopen((string) $uri, 'r', null, $context); + $this->lastHeaders = $http_response_header; + if (isset($options['read_timeout'])) { + $readTimeout = $options['read_timeout']; + $sec = (int) $readTimeout; + $usec = ($readTimeout - $sec) * 100000; + \stream_set_timeout($resource, $sec, $usec); + } + return $resource; + }); + } + private function resolveHost(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + $uri = $request->getUri(); + if (isset($options['force_ip_resolve']) && !\filter_var($uri->getHost(), \FILTER_VALIDATE_IP)) { + if ('v4' === $options['force_ip_resolve']) { + $records = \dns_get_record($uri->getHost(), \DNS_A); + if (!isset($records[0]['ip'])) { + throw new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); + } + $uri = $uri->withHost($records[0]['ip']); + } elseif ('v6' === $options['force_ip_resolve']) { + $records = \dns_get_record($uri->getHost(), \DNS_AAAA); + if (!isset($records[0]['ipv6'])) { + throw new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); + } + $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']'); + } + } + return $uri; + } + private function getDefaultContext(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request) + { + $headers = ''; + foreach ($request->getHeaders() as $name => $value) { + foreach ($value as $val) { + $headers .= "{$name}: {$val}\r\n"; + } + } + $context = ['http' => ['method' => $request->getMethod(), 'header' => $headers, 'protocol_version' => $request->getProtocolVersion(), 'ignore_errors' => \true, 'follow_location' => 0]]; + $body = (string) $request->getBody(); + if (!empty($body)) { + $context['http']['content'] = $body; + // Prevent the HTTP handler from adding a Content-Type header. + if (!$request->hasHeader('Content-Type')) { + $context['http']['header'] .= "Content-Type:\r\n"; + } + } + $context['http']['header'] = \rtrim($context['http']['header']); + return $context; + } + private function add_proxy(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) + { + if (!\is_array($value)) { + $options['http']['proxy'] = $value; + } else { + $scheme = $request->getUri()->getScheme(); + if (isset($value[$scheme])) { + if (!isset($value['no']) || !\_PhpScoper5bbb1f4b001f3\GuzzleHttp\is_host_in_noproxy($request->getUri()->getHost(), $value['no'])) { + $options['http']['proxy'] = $value[$scheme]; + } + } + } + } + private function add_timeout(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) + { + if ($value > 0) { + $options['http']['timeout'] = $value; + } + } + private function add_verify(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) + { + if ($value === \true) { + // PHP 5.6 or greater will find the system cert by default. When + // < 5.6, use the Guzzle bundled cacert. + if (\PHP_VERSION_ID < 50600) { + $options['ssl']['cafile'] = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\default_ca_bundle(); + } + } elseif (\is_string($value)) { + $options['ssl']['cafile'] = $value; + if (!\file_exists($value)) { + throw new \RuntimeException("SSL CA bundle not found: {$value}"); + } + } elseif ($value === \false) { + $options['ssl']['verify_peer'] = \false; + $options['ssl']['verify_peer_name'] = \false; + return; + } else { + throw new \InvalidArgumentException('Invalid verify request option'); + } + $options['ssl']['verify_peer'] = \true; + $options['ssl']['verify_peer_name'] = \true; + $options['ssl']['allow_self_signed'] = \false; + } + private function add_cert(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) + { + if (\is_array($value)) { + $options['ssl']['passphrase'] = $value[1]; + $value = $value[0]; + } + if (!\file_exists($value)) { + throw new \RuntimeException("SSL certificate not found: {$value}"); + } + $options['ssl']['local_cert'] = $value; + } + private function add_progress(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) + { + $this->addNotification($params, function ($code, $a, $b, $c, $transferred, $total) use($value) { + if ($code == \STREAM_NOTIFY_PROGRESS) { + $value($total, $transferred, null, null); + } + }); + } + private function add_debug(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, &$options, $value, &$params) + { + if ($value === \false) { + return; + } + static $map = [\STREAM_NOTIFY_CONNECT => 'CONNECT', \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', \STREAM_NOTIFY_PROGRESS => 'PROGRESS', \STREAM_NOTIFY_FAILURE => 'FAILURE', \STREAM_NOTIFY_COMPLETED => 'COMPLETED', \STREAM_NOTIFY_RESOLVE => 'RESOLVE']; + static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max']; + $value = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\debug_resource($value); + $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); + $this->addNotification($params, function () use($ident, $value, $map, $args) { + $passed = \func_get_args(); + $code = \array_shift($passed); + \fprintf($value, '<%s> [%s] ', $ident, $map[$code]); + foreach (\array_filter($passed) as $i => $v) { + \fwrite($value, $args[$i] . ': "' . $v . '" '); + } + \fwrite($value, "\n"); + }); + } + private function addNotification(array &$params, callable $notify) + { + // Wrap the existing function if needed. + if (!isset($params['notification'])) { + $params['notification'] = $notify; + } else { + $params['notification'] = $this->callArray([$params['notification'], $notify]); + } + } + private function callArray(array $functions) + { + return function () use($functions) { + $args = \func_get_args(); + foreach ($functions as $fn) { + \call_user_func_array($fn, $args); + } + }; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/HandlerStack.php new file mode 100644 index 00000000..ed573006 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/HandlerStack.php @@ -0,0 +1,239 @@ +push(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Middleware::httpErrors(), 'http_errors'); + $stack->push(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Middleware::redirect(), 'allow_redirects'); + $stack->push(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Middleware::cookies(), 'cookies'); + $stack->push(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Middleware::prepareBody(), 'prepare_body'); + return $stack; + } + /** + * @param callable $handler Underlying HTTP handler. + */ + public function __construct(callable $handler = null) + { + $this->handler = $handler; + } + /** + * Invokes the handler stack as a composed handler + * + * @param RequestInterface $request + * @param array $options + */ + public function __invoke(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + $handler = $this->resolve(); + return $handler($request, $options); + } + /** + * Dumps a string representation of the stack. + * + * @return string + */ + public function __toString() + { + $depth = 0; + $stack = []; + if ($this->handler) { + $stack[] = "0) Handler: " . $this->debugCallable($this->handler); + } + $result = ''; + foreach (\array_reverse($this->stack) as $tuple) { + $depth++; + $str = "{$depth}) Name: '{$tuple[1]}', "; + $str .= "Function: " . $this->debugCallable($tuple[0]); + $result = "> {$str}\n{$result}"; + $stack[] = $str; + } + foreach (\array_keys($stack) as $k) { + $result .= "< {$stack[$k]}\n"; + } + return $result; + } + /** + * Set the HTTP handler that actually returns a promise. + * + * @param callable $handler Accepts a request and array of options and + * returns a Promise. + */ + public function setHandler(callable $handler) + { + $this->handler = $handler; + $this->cached = null; + } + /** + * Returns true if the builder has a handler. + * + * @return bool + */ + public function hasHandler() + { + return (bool) $this->handler; + } + /** + * Unshift a middleware to the bottom of the stack. + * + * @param callable $middleware Middleware function + * @param string $name Name to register for this middleware. + */ + public function unshift(callable $middleware, $name = null) + { + \array_unshift($this->stack, [$middleware, $name]); + $this->cached = null; + } + /** + * Push a middleware to the top of the stack. + * + * @param callable $middleware Middleware function + * @param string $name Name to register for this middleware. + */ + public function push(callable $middleware, $name = '') + { + $this->stack[] = [$middleware, $name]; + $this->cached = null; + } + /** + * Add a middleware before another middleware by name. + * + * @param string $findName Middleware to find + * @param callable $middleware Middleware function + * @param string $withName Name to register for this middleware. + */ + public function before($findName, callable $middleware, $withName = '') + { + $this->splice($findName, $withName, $middleware, \true); + } + /** + * Add a middleware after another middleware by name. + * + * @param string $findName Middleware to find + * @param callable $middleware Middleware function + * @param string $withName Name to register for this middleware. + */ + public function after($findName, callable $middleware, $withName = '') + { + $this->splice($findName, $withName, $middleware, \false); + } + /** + * Remove a middleware by instance or name from the stack. + * + * @param callable|string $remove Middleware to remove by instance or name. + */ + public function remove($remove) + { + $this->cached = null; + $idx = \is_callable($remove) ? 0 : 1; + $this->stack = \array_values(\array_filter($this->stack, function ($tuple) use($idx, $remove) { + return $tuple[$idx] !== $remove; + })); + } + /** + * Compose the middleware and handler into a single callable function. + * + * @return callable + */ + public function resolve() + { + if (!$this->cached) { + if (!($prev = $this->handler)) { + throw new \LogicException('No handler has been specified'); + } + foreach (\array_reverse($this->stack) as $fn) { + $prev = $fn[0]($prev); + } + $this->cached = $prev; + } + return $this->cached; + } + /** + * @param $name + * @return int + */ + private function findByName($name) + { + foreach ($this->stack as $k => $v) { + if ($v[1] === $name) { + return $k; + } + } + throw new \InvalidArgumentException("Middleware not found: {$name}"); + } + /** + * Splices a function into the middleware list at a specific position. + * + * @param $findName + * @param $withName + * @param callable $middleware + * @param $before + */ + private function splice($findName, $withName, callable $middleware, $before) + { + $this->cached = null; + $idx = $this->findByName($findName); + $tuple = [$middleware, $withName]; + if ($before) { + if ($idx === 0) { + \array_unshift($this->stack, $tuple); + } else { + $replacement = [$tuple, $this->stack[$idx]]; + \array_splice($this->stack, $idx, 1, $replacement); + } + } elseif ($idx === \count($this->stack) - 1) { + $this->stack[] = $tuple; + } else { + $replacement = [$this->stack[$idx], $tuple]; + \array_splice($this->stack, $idx, 1, $replacement); + } + } + /** + * Provides a debug string for a given callable. + * + * @param array|callable $fn Function to write as a string. + * + * @return string + */ + private function debugCallable($fn) + { + if (\is_string($fn)) { + return "callable({$fn})"; + } + if (\is_array($fn)) { + return \is_string($fn[0]) ? "callable({$fn[0]}::{$fn[1]})" : "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])"; + } + return 'callable(' . \spl_object_hash($fn) . ')'; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/MessageFormatter.php new file mode 100644 index 00000000..92636250 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/MessageFormatter.php @@ -0,0 +1,151 @@ +>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; + const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; + /** @var string Template used to format log messages */ + private $template; + /** + * @param string $template Log message template + */ + public function __construct($template = self::CLF) + { + $this->template = $template ?: self::CLF; + } + /** + * Returns a formatted message string. + * + * @param RequestInterface $request Request that was sent + * @param ResponseInterface $response Response that was received + * @param \Exception $error Exception that was received + * + * @return string + */ + public function format(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response = null, \Exception $error = null) + { + $cache = []; + return \preg_replace_callback('/{\\s*([A-Za-z_\\-\\.0-9]+)\\s*}/', function (array $matches) use($request, $response, $error, &$cache) { + if (isset($cache[$matches[1]])) { + return $cache[$matches[1]]; + } + $result = ''; + switch ($matches[1]) { + case 'request': + $result = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\str($request); + break; + case 'response': + $result = $response ? \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\str($response) : ''; + break; + case 'req_headers': + $result = \trim($request->getMethod() . ' ' . $request->getRequestTarget()) . ' HTTP/' . $request->getProtocolVersion() . "\r\n" . $this->headers($request); + break; + case 'res_headers': + $result = $response ? \sprintf('HTTP/%s %d %s', $response->getProtocolVersion(), $response->getStatusCode(), $response->getReasonPhrase()) . "\r\n" . $this->headers($response) : 'NULL'; + break; + case 'req_body': + $result = $request->getBody(); + break; + case 'res_body': + $result = $response ? $response->getBody() : 'NULL'; + break; + case 'ts': + case 'date_iso_8601': + $result = \gmdate('c'); + break; + case 'date_common_log': + $result = \date('d/M/Y:H:i:s O'); + break; + case 'method': + $result = $request->getMethod(); + break; + case 'version': + $result = $request->getProtocolVersion(); + break; + case 'uri': + case 'url': + $result = $request->getUri(); + break; + case 'target': + $result = $request->getRequestTarget(); + break; + case 'req_version': + $result = $request->getProtocolVersion(); + break; + case 'res_version': + $result = $response ? $response->getProtocolVersion() : 'NULL'; + break; + case 'host': + $result = $request->getHeaderLine('Host'); + break; + case 'hostname': + $result = \gethostname(); + break; + case 'code': + $result = $response ? $response->getStatusCode() : 'NULL'; + break; + case 'phrase': + $result = $response ? $response->getReasonPhrase() : 'NULL'; + break; + case 'error': + $result = $error ? $error->getMessage() : 'NULL'; + break; + default: + // handle prefixed dynamic headers + if (\strpos($matches[1], 'req_header_') === 0) { + $result = $request->getHeaderLine(\substr($matches[1], 11)); + } elseif (\strpos($matches[1], 'res_header_') === 0) { + $result = $response ? $response->getHeaderLine(\substr($matches[1], 11)) : 'NULL'; + } + } + $cache[$matches[1]] = $result; + return $result; + }, $this->template); + } + private function headers(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\MessageInterface $message) + { + $result = ''; + foreach ($message->getHeaders() as $name => $values) { + $result .= $name . ': ' . \implode(', ', $values) . "\r\n"; + } + return \trim($result); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Middleware.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Middleware.php new file mode 100644 index 00000000..40134a43 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Middleware.php @@ -0,0 +1,222 @@ +withCookieHeader($request); + return $handler($request, $options)->then(function ($response) use($cookieJar, $request) { + $cookieJar->extractCookies($request, $response); + return $response; + }); + }; + }; + } + /** + * Middleware that throws exceptions for 4xx or 5xx responses when the + * "http_error" request option is set to true. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function httpErrors() + { + return function (callable $handler) { + return function ($request, array $options) use($handler) { + if (empty($options['http_errors'])) { + return $handler($request, $options); + } + return $handler($request, $options)->then(function (\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response) use($request, $handler) { + $code = $response->getStatusCode(); + if ($code < 400) { + return $response; + } + throw \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\RequestException::create($request, $response); + }); + }; + }; + } + /** + * Middleware that pushes history data to an ArrayAccess container. + * + * @param array|\ArrayAccess $container Container to hold the history (by reference). + * + * @return callable Returns a function that accepts the next handler. + * @throws \InvalidArgumentException if container is not an array or ArrayAccess. + */ + public static function history(&$container) + { + if (!\is_array($container) && !$container instanceof \ArrayAccess) { + throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); + } + return function (callable $handler) use(&$container) { + return function ($request, array $options) use($handler, &$container) { + return $handler($request, $options)->then(function ($value) use($request, &$container, $options) { + $container[] = ['request' => $request, 'response' => $value, 'error' => null, 'options' => $options]; + return $value; + }, function ($reason) use($request, &$container, $options) { + $container[] = ['request' => $request, 'response' => null, 'error' => $reason, 'options' => $options]; + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\rejection_for($reason); + }); + }; + }; + } + /** + * Middleware that invokes a callback before and after sending a request. + * + * The provided listener cannot modify or alter the response. It simply + * "taps" into the chain to be notified before returning the promise. The + * before listener accepts a request and options array, and the after + * listener accepts a request, options array, and response promise. + * + * @param callable $before Function to invoke before forwarding the request. + * @param callable $after Function invoked after forwarding. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function tap(callable $before = null, callable $after = null) + { + return function (callable $handler) use($before, $after) { + return function ($request, array $options) use($handler, $before, $after) { + if ($before) { + $before($request, $options); + } + $response = $handler($request, $options); + if ($after) { + $after($request, $options, $response); + } + return $response; + }; + }; + } + /** + * Middleware that handles request redirects. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function redirect() + { + return function (callable $handler) { + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\RedirectMiddleware($handler); + }; + } + /** + * Middleware that retries requests based on the boolean result of + * invoking the provided "decider" function. + * + * If no delay function is provided, a simple implementation of exponential + * backoff will be utilized. + * + * @param callable $decider Function that accepts the number of retries, + * a request, [response], and [exception] and + * returns true if the request is to be retried. + * @param callable $delay Function that accepts the number of retries and + * returns the number of milliseconds to delay. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function retry(callable $decider, callable $delay = null) + { + return function (callable $handler) use($decider, $delay) { + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\RetryMiddleware($decider, $handler, $delay); + }; + } + /** + * Middleware that logs requests, responses, and errors using a message + * formatter. + * + * @param LoggerInterface $logger Logs messages. + * @param MessageFormatter $formatter Formatter used to create message strings. + * @param string $logLevel Level at which to log requests. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function log(\_PhpScoper5bbb1f4b001f3\Psr\Log\LoggerInterface $logger, \_PhpScoper5bbb1f4b001f3\GuzzleHttp\MessageFormatter $formatter, $logLevel = \_PhpScoper5bbb1f4b001f3\Psr\Log\LogLevel::INFO) + { + return function (callable $handler) use($logger, $formatter, $logLevel) { + return function ($request, array $options) use($handler, $logger, $formatter, $logLevel) { + return $handler($request, $options)->then(function ($response) use($logger, $request, $formatter, $logLevel) { + $message = $formatter->format($request, $response); + $logger->log($logLevel, $message); + return $response; + }, function ($reason) use($logger, $request, $formatter) { + $response = $reason instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\RequestException ? $reason->getResponse() : null; + $message = $formatter->format($request, $response, $reason); + $logger->notice($message); + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\rejection_for($reason); + }); + }; + }; + } + /** + * This middleware adds a default content-type if possible, a default + * content-length or transfer-encoding header, and the expect header. + * + * @return callable + */ + public static function prepareBody() + { + return function (callable $handler) { + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\PrepareBodyMiddleware($handler); + }; + } + /** + * Middleware that applies a map function to the request before passing to + * the next handler. + * + * @param callable $fn Function that accepts a RequestInterface and returns + * a RequestInterface. + * @return callable + */ + public static function mapRequest(callable $fn) + { + return function (callable $handler) use($fn) { + return function ($request, array $options) use($handler, $fn) { + return $handler($fn($request), $options); + }; + }; + } + /** + * Middleware that applies a map function to the resolved promise's + * response. + * + * @param callable $fn Function that accepts a ResponseInterface and + * returns a ResponseInterface. + * @return callable + */ + public static function mapResponse(callable $fn) + { + return function (callable $handler) use($fn) { + return function ($request, array $options) use($handler, $fn) { + return $handler($request, $options)->then($fn); + }; + }; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Pool.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Pool.php new file mode 100644 index 00000000..84767858 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/Pool.php @@ -0,0 +1,106 @@ + $rfn) { + if ($rfn instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface) { + (yield $key => $client->sendAsync($rfn, $opts)); + } elseif (\is_callable($rfn)) { + (yield $key => $rfn($opts)); + } else { + throw new \InvalidArgumentException('Each value yielded by ' . 'the iterator must be a Psr7\\Http\\Message\\RequestInterface ' . 'or a callable that returns a promise that fulfills ' . 'with a Psr7\\Message\\Http\\ResponseInterface object.'); + } + } + }; + $this->each = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\EachPromise($requests(), $config); + } + public function promise() + { + return $this->each->promise(); + } + /** + * Sends multiple requests concurrently and returns an array of responses + * and exceptions that uses the same ordering as the provided requests. + * + * IMPORTANT: This method keeps every request and response in memory, and + * as such, is NOT recommended when sending a large number or an + * indeterminate number of requests concurrently. + * + * @param ClientInterface $client Client used to send the requests + * @param array|\Iterator $requests Requests to send concurrently. + * @param array $options Passes through the options available in + * {@see GuzzleHttp\Pool::__construct} + * + * @return array Returns an array containing the response or an exception + * in the same order that the requests were sent. + * @throws \InvalidArgumentException if the event format is incorrect. + */ + public static function batch(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\ClientInterface $client, $requests, array $options = []) + { + $res = []; + self::cmpCallback($options, 'fulfilled', $res); + self::cmpCallback($options, 'rejected', $res); + $pool = new static($client, $requests, $options); + $pool->promise()->wait(); + \ksort($res); + return $res; + } + private static function cmpCallback(array &$options, $name, array &$results) + { + if (!isset($options[$name])) { + $options[$name] = function ($v, $k) use(&$results) { + $results[$k] = $v; + }; + } else { + $currentFn = $options[$name]; + $options[$name] = function ($v, $k) use(&$results, $currentFn) { + $currentFn($v, $k); + $results[$k] = $v; + }; + } + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php new file mode 100644 index 00000000..550a1451 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php @@ -0,0 +1,86 @@ +nextHandler = $nextHandler; + } + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + $fn = $this->nextHandler; + // Don't do anything if the request has no body. + if ($request->getBody()->getSize() === 0) { + return $fn($request, $options); + } + $modify = []; + // Add a default content-type if possible. + if (!$request->hasHeader('Content-Type')) { + if ($uri = $request->getBody()->getMetadata('uri')) { + if ($type = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\mimetype_from_filename($uri)) { + $modify['set_headers']['Content-Type'] = $type; + } + } + } + // Add a default content-length or transfer-encoding header. + if (!$request->hasHeader('Content-Length') && !$request->hasHeader('Transfer-Encoding')) { + $size = $request->getBody()->getSize(); + if ($size !== null) { + $modify['set_headers']['Content-Length'] = $size; + } else { + $modify['set_headers']['Transfer-Encoding'] = 'chunked'; + } + } + // Add the expect header if needed. + $this->addExpectHeader($request, $options, $modify); + return $fn(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\modify_request($request, $modify), $options); + } + private function addExpectHeader(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options, array &$modify) + { + // Determine if the Expect header should be used + if ($request->hasHeader('Expect')) { + return; + } + $expect = isset($options['expect']) ? $options['expect'] : null; + // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0 + if ($expect === \false || $request->getProtocolVersion() < 1.1) { + return; + } + // The expect header is unconditionally enabled + if ($expect === \true) { + $modify['set_headers']['Expect'] = '100-Continue'; + return; + } + // By default, send the expect header when the payload is > 1mb + if ($expect === null) { + $expect = 1048576; + } + // Always add if the body cannot be rewound, the size cannot be + // determined, or the size is greater than the cutoff threshold + $body = $request->getBody(); + $size = $body->getSize(); + if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { + $modify['set_headers']['Expect'] = '100-Continue'; + } + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php new file mode 100644 index 00000000..c98267a8 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -0,0 +1,160 @@ + 5, 'protocols' => ['http', 'https'], 'strict' => \false, 'referer' => \false, 'track_redirects' => \false]; + /** @var callable */ + private $nextHandler; + /** + * @param callable $nextHandler Next handler to invoke. + */ + public function __construct(callable $nextHandler) + { + $this->nextHandler = $nextHandler; + } + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + $fn = $this->nextHandler; + if (empty($options['allow_redirects'])) { + return $fn($request, $options); + } + if ($options['allow_redirects'] === \true) { + $options['allow_redirects'] = self::$defaultSettings; + } elseif (!\is_array($options['allow_redirects'])) { + throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); + } else { + // Merge the default settings with the provided settings + $options['allow_redirects'] += self::$defaultSettings; + } + if (empty($options['allow_redirects']['max'])) { + return $fn($request, $options); + } + return $fn($request, $options)->then(function (\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response) use($request, $options) { + return $this->checkRedirect($request, $options, $response); + }); + } + /** + * @param RequestInterface $request + * @param array $options + * @param ResponseInterface|PromiseInterface $response + * + * @return ResponseInterface|PromiseInterface + */ + public function checkRedirect(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response) + { + if (\substr($response->getStatusCode(), 0, 1) != '3' || !$response->hasHeader('Location')) { + return $response; + } + $this->guardMax($request, $options); + $nextRequest = $this->modifyRequest($request, $options, $response); + if (isset($options['allow_redirects']['on_redirect'])) { + \call_user_func($options['allow_redirects']['on_redirect'], $request, $response, $nextRequest->getUri()); + } + /** @var PromiseInterface|ResponseInterface $promise */ + $promise = $this($nextRequest, $options); + // Add headers to be able to track history of redirects. + if (!empty($options['allow_redirects']['track_redirects'])) { + return $this->withTracking($promise, (string) $nextRequest->getUri(), $response->getStatusCode()); + } + return $promise; + } + private function withTracking(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface $promise, $uri, $statusCode) + { + return $promise->then(function (\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response) use($uri, $statusCode) { + // Note that we are pushing to the front of the list as this + // would be an earlier response than what is currently present + // in the history header. + $historyHeader = $response->getHeader(self::HISTORY_HEADER); + $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); + \array_unshift($historyHeader, $uri); + \array_unshift($statusHeader, $statusCode); + return $response->withHeader(self::HISTORY_HEADER, $historyHeader)->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); + }); + } + private function guardMax(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array &$options) + { + $current = isset($options['__redirect_count']) ? $options['__redirect_count'] : 0; + $options['__redirect_count'] = $current + 1; + $max = $options['allow_redirects']['max']; + if ($options['__redirect_count'] > $max) { + throw new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\TooManyRedirectsException("Will not follow more than {$max} redirects", $request); + } + } + /** + * @param RequestInterface $request + * @param array $options + * @param ResponseInterface $response + * + * @return RequestInterface + */ + public function modifyRequest(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response) + { + // Request modifications to apply. + $modify = []; + $protocols = $options['allow_redirects']['protocols']; + // Use a GET request if this is an entity enclosing request and we are + // not forcing RFC compliance, but rather emulating what all browsers + // would do. + $statusCode = $response->getStatusCode(); + if ($statusCode == 303 || $statusCode <= 302 && $request->getBody() && !$options['allow_redirects']['strict']) { + $modify['method'] = 'GET'; + $modify['body'] = ''; + } + $modify['uri'] = $this->redirectUri($request, $response, $protocols); + \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\rewind_body($request); + // Add the Referer header if it is told to do so and only + // add the header if we are not redirecting from https to http. + if ($options['allow_redirects']['referer'] && $modify['uri']->getScheme() === $request->getUri()->getScheme()) { + $uri = $request->getUri()->withUserInfo('', ''); + $modify['set_headers']['Referer'] = (string) $uri; + } else { + $modify['remove_headers'][] = 'Referer'; + } + // Remove Authorization header if host is different. + if ($request->getUri()->getHost() !== $modify['uri']->getHost()) { + $modify['remove_headers'][] = 'Authorization'; + } + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\modify_request($request, $modify); + } + /** + * Set the appropriate URL on the request based on the location header + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param array $protocols + * + * @return UriInterface + */ + private function redirectUri(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response, array $protocols) + { + $location = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\UriResolver::resolve($request->getUri(), new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Uri($response->getHeaderLine('Location'))); + // Ensure that the redirect URI is allowed based on the protocols. + if (!\in_array($location->getScheme(), $protocols)) { + throw new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Exception\BadResponseException(\sprintf('Redirect URI, %s, does not use one of the allowed redirect protocols: %s', $location, \implode(', ', $protocols)), $request, $response); + } + return $location; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/RequestOptions.php new file mode 100644 index 00000000..9f8a3d4d --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -0,0 +1,228 @@ +decider = $decider; + $this->nextHandler = $nextHandler; + $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; + } + /** + * Default exponential backoff delay function. + * + * @param $retries + * + * @return int + */ + public static function exponentialDelay($retries) + { + return (int) \pow(2, $retries - 1); + } + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options) + { + if (!isset($options['retries'])) { + $options['retries'] = 0; + } + $fn = $this->nextHandler; + return $fn($request, $options)->then($this->onFulfilled($request, $options), $this->onRejected($request, $options)); + } + private function onFulfilled(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $req, array $options) + { + return function ($value) use($req, $options) { + if (!\call_user_func($this->decider, $options['retries'], $req, $value, null)) { + return $value; + } + return $this->doRetry($req, $options, $value); + }; + } + private function onRejected(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $req, array $options) + { + return function ($reason) use($req, $options) { + if (!\call_user_func($this->decider, $options['retries'], $req, null, $reason)) { + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\rejection_for($reason); + } + return $this->doRetry($req, $options); + }; + } + private function doRetry(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $options, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface $response = null) + { + $options['delay'] = \call_user_func($this->delay, ++$options['retries'], $response); + return $this($request, $options); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/TransferStats.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/TransferStats.php new file mode 100644 index 00000000..d181a061 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/TransferStats.php @@ -0,0 +1,110 @@ +request = $request; + $this->response = $response; + $this->transferTime = $transferTime; + $this->handlerErrorData = $handlerErrorData; + $this->handlerStats = $handlerStats; + } + /** + * @return RequestInterface + */ + public function getRequest() + { + return $this->request; + } + /** + * Returns the response that was received (if any). + * + * @return ResponseInterface|null + */ + public function getResponse() + { + return $this->response; + } + /** + * Returns true if a response was received. + * + * @return bool + */ + public function hasResponse() + { + return $this->response !== null; + } + /** + * Gets handler specific error data. + * + * This might be an exception, a integer representing an error code, or + * anything else. Relying on this value assumes that you know what handler + * you are using. + * + * @return mixed + */ + public function getHandlerErrorData() + { + return $this->handlerErrorData; + } + /** + * Get the effective URI the request was sent to. + * + * @return UriInterface + */ + public function getEffectiveUri() + { + return $this->request->getUri(); + } + /** + * Get the estimated time the request was being transferred by the handler. + * + * @return float Time in seconds. + */ + public function getTransferTime() + { + return $this->transferTime; + } + /** + * Gets an array of all of the handler specific transfer data. + * + * @return array + */ + public function getHandlerStats() + { + return $this->handlerStats; + } + /** + * Get a specific handler statistic from the handler by name. + * + * @param string $stat Handler specific transfer stat to retrieve. + * + * @return mixed|null + */ + public function getHandlerStat($stat) + { + return isset($this->handlerStats[$stat]) ? $this->handlerStats[$stat] : null; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/UriTemplate.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/UriTemplate.php new file mode 100644 index 00000000..058b31bb --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/UriTemplate.php @@ -0,0 +1,191 @@ + ['prefix' => '', 'joiner' => ',', 'query' => \false], '+' => ['prefix' => '', 'joiner' => ',', 'query' => \false], '#' => ['prefix' => '#', 'joiner' => ',', 'query' => \false], '.' => ['prefix' => '.', 'joiner' => '.', 'query' => \false], '/' => ['prefix' => '/', 'joiner' => '/', 'query' => \false], ';' => ['prefix' => ';', 'joiner' => ';', 'query' => \true], '?' => ['prefix' => '?', 'joiner' => '&', 'query' => \true], '&' => ['prefix' => '&', 'joiner' => '&', 'query' => \true]]; + /** @var array Delimiters */ + private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '=']; + /** @var array Percent encoded delimiters */ + private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D', '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', '%3B', '%3D']; + public function expand($template, array $variables) + { + if (\false === \strpos($template, '{')) { + return $template; + } + $this->template = $template; + $this->variables = $variables; + return \preg_replace_callback('/\\{([^\\}]+)\\}/', [$this, 'expandMatch'], $this->template); + } + /** + * Parse an expression into parts + * + * @param string $expression Expression to parse + * + * @return array Returns an associative array of parts + */ + private function parseExpression($expression) + { + $result = []; + if (isset(self::$operatorHash[$expression[0]])) { + $result['operator'] = $expression[0]; + $expression = \substr($expression, 1); + } else { + $result['operator'] = ''; + } + foreach (\explode(',', $expression) as $value) { + $value = \trim($value); + $varspec = []; + if ($colonPos = \strpos($value, ':')) { + $varspec['value'] = \substr($value, 0, $colonPos); + $varspec['modifier'] = ':'; + $varspec['position'] = (int) \substr($value, $colonPos + 1); + } elseif (\substr($value, -1) === '*') { + $varspec['modifier'] = '*'; + $varspec['value'] = \substr($value, 0, -1); + } else { + $varspec['value'] = (string) $value; + $varspec['modifier'] = ''; + } + $result['values'][] = $varspec; + } + return $result; + } + /** + * Process an expansion + * + * @param array $matches Matches met in the preg_replace_callback + * + * @return string Returns the replacement string + */ + private function expandMatch(array $matches) + { + static $rfc1738to3986 = ['+' => '%20', '%7e' => '~']; + $replacements = []; + $parsed = self::parseExpression($matches[1]); + $prefix = self::$operatorHash[$parsed['operator']]['prefix']; + $joiner = self::$operatorHash[$parsed['operator']]['joiner']; + $useQuery = self::$operatorHash[$parsed['operator']]['query']; + foreach ($parsed['values'] as $value) { + if (!isset($this->variables[$value['value']])) { + continue; + } + $variable = $this->variables[$value['value']]; + $actuallyUseQuery = $useQuery; + $expanded = ''; + if (\is_array($variable)) { + $isAssoc = $this->isAssoc($variable); + $kvp = []; + foreach ($variable as $key => $var) { + if ($isAssoc) { + $key = \rawurlencode($key); + $isNestedArray = \is_array($var); + } else { + $isNestedArray = \false; + } + if (!$isNestedArray) { + $var = \rawurlencode($var); + if ($parsed['operator'] === '+' || $parsed['operator'] === '#') { + $var = $this->decodeReserved($var); + } + } + if ($value['modifier'] === '*') { + if ($isAssoc) { + if ($isNestedArray) { + // Nested arrays must allow for deeply nested + // structures. + $var = \strtr(\http_build_query([$key => $var]), $rfc1738to3986); + } else { + $var = $key . '=' . $var; + } + } elseif ($key > 0 && $actuallyUseQuery) { + $var = $value['value'] . '=' . $var; + } + } + $kvp[$key] = $var; + } + if (empty($variable)) { + $actuallyUseQuery = \false; + } elseif ($value['modifier'] === '*') { + $expanded = \implode($joiner, $kvp); + if ($isAssoc) { + // Don't prepend the value name when using the explode + // modifier with an associative array. + $actuallyUseQuery = \false; + } + } else { + if ($isAssoc) { + // When an associative array is encountered and the + // explode modifier is not set, then the result must be + // a comma separated list of keys followed by their + // respective values. + foreach ($kvp as $k => &$v) { + $v = $k . ',' . $v; + } + } + $expanded = \implode(',', $kvp); + } + } else { + if ($value['modifier'] === ':') { + $variable = \substr($variable, 0, $value['position']); + } + $expanded = \rawurlencode($variable); + if ($parsed['operator'] === '+' || $parsed['operator'] === '#') { + $expanded = $this->decodeReserved($expanded); + } + } + if ($actuallyUseQuery) { + if (!$expanded && $joiner !== '&') { + $expanded = $value['value']; + } else { + $expanded = $value['value'] . '=' . $expanded; + } + } + $replacements[] = $expanded; + } + $ret = \implode($joiner, $replacements); + if ($ret && $prefix) { + return $prefix . $ret; + } + return $ret; + } + /** + * Determines if an array is associative. + * + * This makes the assumption that input arrays are sequences or hashes. + * This assumption is a tradeoff for accuracy in favor of speed, but it + * should work in almost every case where input is supplied for a URI + * template. + * + * @param array $array Array to check + * + * @return bool + */ + private function isAssoc(array $array) + { + return $array && \array_keys($array)[0] !== 0; + } + /** + * Removes percent encoding on reserved characters (used with + and # + * modifiers). + * + * @param string $string String to fix + * + * @return string + */ + private function decodeReserved($string) + { + return \str_replace(self::$delimsPct, self::$delims, $string); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/functions.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/functions.php new file mode 100644 index 00000000..15211d64 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/guzzle/src/functions.php @@ -0,0 +1,294 @@ +expand($template, $variables); +} +/** + * Debug function used to describe the provided value type and class. + * + * @param mixed $input + * + * @return string Returns a string containing the type of the variable and + * if a class is provided, the class name. + */ +function describe_type($input) +{ + switch (\gettype($input)) { + case 'object': + return 'object(' . \get_class($input) . ')'; + case 'array': + return 'array(' . \count($input) . ')'; + default: + \ob_start(); + \var_dump($input); + // normalize float vs double + return \str_replace('double(', 'float(', \rtrim(\ob_get_clean())); + } +} +/** + * Parses an array of header lines into an associative array of headers. + * + * @param array $lines Header lines array of strings in the following + * format: "Name: Value" + * @return array + */ +function headers_from_lines($lines) +{ + $headers = []; + foreach ($lines as $line) { + $parts = \explode(':', $line, 2); + $headers[\trim($parts[0])][] = isset($parts[1]) ? \trim($parts[1]) : null; + } + return $headers; +} +/** + * Returns a debug stream based on the provided variable. + * + * @param mixed $value Optional value + * + * @return resource + */ +function debug_resource($value = null) +{ + if (\is_resource($value)) { + return $value; + } elseif (\defined('STDOUT')) { + return \STDOUT; + } + return \fopen('php://output', 'w'); +} +/** + * Chooses and creates a default handler to use based on the environment. + * + * The returned handler is not wrapped by any default middlewares. + * + * @throws \RuntimeException if no viable Handler is available. + * @return callable Returns the best handler for the given system. + */ +function choose_handler() +{ + $handler = null; + if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) { + $handler = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\Proxy::wrapSync(new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\CurlMultiHandler(), new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\CurlHandler()); + } elseif (\function_exists('curl_exec')) { + $handler = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\CurlHandler(); + } elseif (\function_exists('curl_multi_exec')) { + $handler = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\CurlMultiHandler(); + } + if (\ini_get('allow_url_fopen')) { + $handler = $handler ? \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\Proxy::wrapStreaming($handler, new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\StreamHandler()) : new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Handler\StreamHandler(); + } elseif (!$handler) { + throw new \RuntimeException('GuzzleHttp requires cURL, the ' . 'allow_url_fopen ini setting, or a custom HTTP handler.'); + } + return $handler; +} +/** + * Get the default User-Agent string to use with Guzzle + * + * @return string + */ +function default_user_agent() +{ + static $defaultAgent = ''; + if (!$defaultAgent) { + $defaultAgent = 'GuzzleHttp/' . \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Client::VERSION; + if (\extension_loaded('curl') && \function_exists('curl_version')) { + $defaultAgent .= ' curl/' . \curl_version()['version']; + } + $defaultAgent .= ' PHP/' . \PHP_VERSION; + } + return $defaultAgent; +} +/** + * Returns the default cacert bundle for the current system. + * + * First, the openssl.cafile and curl.cainfo php.ini settings are checked. + * If those settings are not configured, then the common locations for + * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X + * and Windows are checked. If any of these file locations are found on + * disk, they will be utilized. + * + * Note: the result of this function is cached for subsequent calls. + * + * @return string + * @throws \RuntimeException if no bundle can be found. + */ +function default_ca_bundle() +{ + static $cached = null; + static $cafiles = [ + // Red Hat, CentOS, Fedora (provided by the ca-certificates package) + '/etc/pki/tls/certs/ca-bundle.crt', + // Ubuntu, Debian (provided by the ca-certificates package) + '/etc/ssl/certs/ca-certificates.crt', + // FreeBSD (provided by the ca_root_nss package) + '/usr/local/share/certs/ca-root-nss.crt', + // SLES 12 (provided by the ca-certificates package) + '/var/lib/ca-certificates/ca-bundle.pem', + // OS X provided by homebrew (using the default path) + '/usr/local/etc/openssl/cert.pem', + // Google app engine + '/etc/ca-certificates.crt', + // Windows? + 'C:\\windows\\system32\\curl-ca-bundle.crt', + 'C:\\windows\\curl-ca-bundle.crt', + ]; + if ($cached) { + return $cached; + } + if ($ca = \ini_get('openssl.cafile')) { + return $cached = $ca; + } + if ($ca = \ini_get('curl.cainfo')) { + return $cached = $ca; + } + foreach ($cafiles as $filename) { + if (\file_exists($filename)) { + return $cached = $filename; + } + } + throw new \RuntimeException(<< + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/Makefile b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/Makefile new file mode 100644 index 00000000..8d5b3ef9 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/Makefile @@ -0,0 +1,13 @@ +all: clean test + +test: + vendor/bin/phpunit + +coverage: + vendor/bin/phpunit --coverage-html=artifacts/coverage + +view-coverage: + open artifacts/coverage/index.html + +clean: + rm -rf artifacts/* diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/README.md b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/README.md new file mode 100644 index 00000000..7b607e28 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/README.md @@ -0,0 +1,504 @@ +# Guzzle Promises + +[Promises/A+](https://promisesaplus.com/) implementation that handles promise +chaining and resolution iteratively, allowing for "infinite" promise chaining +while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/) +for a general introduction to promises. + +- [Features](#features) +- [Quick start](#quick-start) +- [Synchronous wait](#synchronous-wait) +- [Cancellation](#cancellation) +- [API](#api) + - [Promise](#promise) + - [FulfilledPromise](#fulfilledpromise) + - [RejectedPromise](#rejectedpromise) +- [Promise interop](#promise-interop) +- [Implementation notes](#implementation-notes) + + +# Features + +- [Promises/A+](https://promisesaplus.com/) implementation. +- Promise resolution and chaining is handled iteratively, allowing for + "infinite" promise chaining. +- Promises have a synchronous `wait` method. +- Promises can be cancelled. +- Works with any object that has a `then` function. +- C# style async/await coroutine promises using + `GuzzleHttp\Promise\coroutine()`. + + +# Quick start + +A *promise* represents the eventual result of an asynchronous operation. The +primary way of interacting with a promise is through its `then` method, which +registers callbacks to receive either a promise's eventual value or the reason +why the promise cannot be fulfilled. + + +## Callbacks + +Callbacks are registered with the `then` method by providing an optional +`$onFulfilled` followed by an optional `$onRejected` function. + + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then( + // $onFulfilled + function ($value) { + echo 'The promise was fulfilled.'; + }, + // $onRejected + function ($reason) { + echo 'The promise was rejected.'; + } +); +``` + +*Resolving* a promise means that you either fulfill a promise with a *value* or +reject a promise with a *reason*. Resolving a promises triggers callbacks +registered with the promises's `then` method. These callbacks are triggered +only once and in the order in which they were added. + + +## Resolving a promise + +Promises are fulfilled using the `resolve($value)` method. Resolving a promise +with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger +all of the onFulfilled callbacks (resolving a promise with a rejected promise +will reject the promise and trigger the `$onRejected` callbacks). + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise + ->then(function ($value) { + // Return a value and don't break the chain + return "Hello, " . $value; + }) + // This then is executed after the first then and receives the value + // returned from the first then. + ->then(function ($value) { + echo $value; + }); + +// Resolving the promise triggers the $onFulfilled callbacks and outputs +// "Hello, reader". +$promise->resolve('reader.'); +``` + + +## Promise forwarding + +Promises can be chained one after the other. Each then in the chain is a new +promise. The return value of a promise is what's forwarded to the next +promise in the chain. Returning a promise in a `then` callback will cause the +subsequent promises in the chain to only be fulfilled when the returned promise +has been fulfilled. The next promise in the chain will be invoked with the +resolved value of the promise. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$nextPromise = new Promise(); + +$promise + ->then(function ($value) use ($nextPromise) { + echo $value; + return $nextPromise; + }) + ->then(function ($value) { + echo $value; + }); + +// Triggers the first callback and outputs "A" +$promise->resolve('A'); +// Triggers the second callback and outputs "B" +$nextPromise->resolve('B'); +``` + +## Promise rejection + +When a promise is rejected, the `$onRejected` callbacks are invoked with the +rejection reason. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + echo $reason; +}); + +$promise->reject('Error!'); +// Outputs "Error!" +``` + +## Rejection forwarding + +If an exception is thrown in an `$onRejected` callback, subsequent +`$onRejected` callbacks are invoked with the thrown exception as the reason. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + throw new \Exception($reason); +})->then(null, function ($reason) { + assert($reason->getMessage() === 'Error!'); +}); + +$promise->reject('Error!'); +``` + +You can also forward a rejection down the promise chain by returning a +`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or +`$onRejected` callback. + +```php +use GuzzleHttp\Promise\Promise; +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + return new RejectedPromise($reason); +})->then(null, function ($reason) { + assert($reason === 'Error!'); +}); + +$promise->reject('Error!'); +``` + +If an exception is not thrown in a `$onRejected` callback and the callback +does not return a rejected promise, downstream `$onFulfilled` callbacks are +invoked using the value returned from the `$onRejected` callback. + +```php +use GuzzleHttp\Promise\Promise; +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new Promise(); +$promise + ->then(null, function ($reason) { + return "It's ok"; + }) + ->then(function ($value) { + assert($value === "It's ok"); + }); + +$promise->reject('Error!'); +``` + +# Synchronous wait + +You can synchronously force promises to complete using a promise's `wait` +method. When creating a promise, you can provide a wait function that is used +to synchronously force a promise to complete. When a wait function is invoked +it is expected to deliver a value to the promise or reject the promise. If the +wait function does not deliver a value, then an exception is thrown. The wait +function provided to a promise constructor is invoked when the `wait` function +of the promise is called. + +```php +$promise = new Promise(function () use (&$promise) { + $promise->resolve('foo'); +}); + +// Calling wait will return the value of the promise. +echo $promise->wait(); // outputs "foo" +``` + +If an exception is encountered while invoking the wait function of a promise, +the promise is rejected with the exception and the exception is thrown. + +```php +$promise = new Promise(function () use (&$promise) { + throw new \Exception('foo'); +}); + +$promise->wait(); // throws the exception. +``` + +Calling `wait` on a promise that has been fulfilled will not trigger the wait +function. It will simply return the previously resolved value. + +```php +$promise = new Promise(function () { die('this is not called!'); }); +$promise->resolve('foo'); +echo $promise->wait(); // outputs "foo" +``` + +Calling `wait` on a promise that has been rejected will throw an exception. If +the rejection reason is an instance of `\Exception` the reason is thrown. +Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason +can be obtained by calling the `getReason` method of the exception. + +```php +$promise = new Promise(); +$promise->reject('foo'); +$promise->wait(); +``` + +> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' + + +## Unwrapping a promise + +When synchronously waiting on a promise, you are joining the state of the +promise into the current state of execution (i.e., return the value of the +promise if it was fulfilled or throw an exception if it was rejected). This is +called "unwrapping" the promise. Waiting on a promise will by default unwrap +the promise state. + +You can force a promise to resolve and *not* unwrap the state of the promise +by passing `false` to the first argument of the `wait` function: + +```php +$promise = new Promise(); +$promise->reject('foo'); +// This will not throw an exception. It simply ensures the promise has +// been resolved. +$promise->wait(false); +``` + +When unwrapping a promise, the resolved value of the promise will be waited +upon until the unwrapped value is not a promise. This means that if you resolve +promise A with a promise B and unwrap promise A, the value returned by the +wait function will be the value delivered to promise B. + +**Note**: when you do not unwrap the promise, no value is returned. + + +# Cancellation + +You can cancel a promise that has not yet been fulfilled using the `cancel()` +method of a promise. When creating a promise you can provide an optional +cancel function that when invoked cancels the action of computing a resolution +of the promise. + + +# API + + +## Promise + +When creating a promise object, you can provide an optional `$waitFn` and +`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is +expected to resolve the promise. `$cancelFn` is a function with no arguments +that is expected to cancel the computation of a promise. It is invoked when the +`cancel()` method of a promise is called. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise( + function () use (&$promise) { + $promise->resolve('waited'); + }, + function () { + // do something that will cancel the promise computation (e.g., close + // a socket, cancel a database query, etc...) + } +); + +assert('waited' === $promise->wait()); +``` + +A promise has the following methods: + +- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface` + + Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler. + +- `otherwise(callable $onRejected) : PromiseInterface` + + Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled. + +- `wait($unwrap = true) : mixed` + + Synchronously waits on the promise to complete. + + `$unwrap` controls whether or not the value of the promise is returned for a + fulfilled promise or if an exception is thrown if the promise is rejected. + This is set to `true` by default. + +- `cancel()` + + Attempts to cancel the promise if possible. The promise being cancelled and + the parent most ancestor that has not yet been resolved will also be + cancelled. Any promises waiting on the cancelled promise to resolve will also + be cancelled. + +- `getState() : string` + + Returns the state of the promise. One of `pending`, `fulfilled`, or + `rejected`. + +- `resolve($value)` + + Fulfills the promise with the given `$value`. + +- `reject($reason)` + + Rejects the promise with the given `$reason`. + + +## FulfilledPromise + +A fulfilled promise can be created to represent a promise that has been +fulfilled. + +```php +use GuzzleHttp\Promise\FulfilledPromise; + +$promise = new FulfilledPromise('value'); + +// Fulfilled callbacks are immediately invoked. +$promise->then(function ($value) { + echo $value; +}); +``` + + +## RejectedPromise + +A rejected promise can be created to represent a promise that has been +rejected. + +```php +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new RejectedPromise('Error'); + +// Rejected callbacks are immediately invoked. +$promise->then(null, function ($reason) { + echo $reason; +}); +``` + + +# Promise interop + +This library works with foreign promises that have a `then` method. This means +you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) +for example. When a foreign promise is returned inside of a then method +callback, promise resolution will occur recursively. + +```php +// Create a React promise +$deferred = new React\Promise\Deferred(); +$reactPromise = $deferred->promise(); + +// Create a Guzzle promise that is fulfilled with a React promise. +$guzzlePromise = new \GuzzleHttp\Promise\Promise(); +$guzzlePromise->then(function ($value) use ($reactPromise) { + // Do something something with the value... + // Return the React promise + return $reactPromise; +}); +``` + +Please note that wait and cancel chaining is no longer possible when forwarding +a foreign promise. You will need to wrap a third-party promise with a Guzzle +promise in order to utilize wait and cancel functions with foreign promises. + + +## Event Loop Integration + +In order to keep the stack size constant, Guzzle promises are resolved +asynchronously using a task queue. When waiting on promises synchronously, the +task queue will be automatically run to ensure that the blocking promise and +any forwarded promises are resolved. When using promises asynchronously in an +event loop, you will need to run the task queue on each tick of the loop. If +you do not run the task queue, then promises will not be resolved. + +You can run the task queue using the `run()` method of the global task queue +instance. + +```php +// Get the global task queue +$queue = \GuzzleHttp\Promise\queue(); +$queue->run(); +``` + +For example, you could use Guzzle promises with React using a periodic timer: + +```php +$loop = React\EventLoop\Factory::create(); +$loop->addPeriodicTimer(0, [$queue, 'run']); +``` + +*TODO*: Perhaps adding a `futureTick()` on each tick would be faster? + + +# Implementation notes + + +## Promise resolution and chaining is handled iteratively + +By shuffling pending handlers from one owner to another, promises are +resolved iteratively, allowing for "infinite" then chaining. + +```php +then(function ($v) { + // The stack size remains constant (a good thing) + echo xdebug_get_stack_depth() . ', '; + return $v + 1; + }); +} + +$parent->resolve(0); +var_dump($p->wait()); // int(1000) + +``` + +When a promise is fulfilled or rejected with a non-promise value, the promise +then takes ownership of the handlers of each child promise and delivers values +down the chain without using recursion. + +When a promise is resolved with another promise, the original promise transfers +all of its pending handlers to the new promise. When the new promise is +eventually resolved, all of the pending handlers are delivered the forwarded +value. + + +## A promise is the deferred. + +Some promise libraries implement promises using a deferred object to represent +a computation and a promise object to represent the delivery of the result of +the computation. This is a nice separation of computation and delivery because +consumers of the promise cannot modify the value that will be eventually +delivered. + +One side effect of being able to implement promise resolution and chaining +iteratively is that you need to be able for one promise to reach into the state +of another promise to shuffle around ownership of handlers. In order to achieve +this without making the handlers of a promise publicly mutable, a promise is +also the deferred value, allowing promises of the same parent class to reach +into and modify the private properties of promises of the same type. While this +does allow consumers of the value to modify the resolution or rejection of the +deferred, it is a small price to pay for keeping the stack size constant. + +```php +$promise = new Promise(); +$promise->then(function ($value) { echo $value; }); +// The promise is the deferred value, so you can deliver a value to it. +$promise->resolve('foo'); +// prints "foo" +``` diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/composer.json b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/composer.json new file mode 100644 index 00000000..dfe076d5 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/composer.json @@ -0,0 +1,38 @@ +{ + "name": "guzzlehttp\/promises", + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https:\/\/github.com\/mtdowling" + } + ], + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit\/phpunit": "^4.0" + }, + "autoload": { + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Promise\\": "src\/" + }, + "files": [ + "src\/functions_include.php" + ] + }, + "scripts": { + "test": "vendor\/bin\/phpunit", + "test-ci": "vendor\/bin\/phpunit --coverage-text" + }, + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + } +} \ No newline at end of file diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/AggregateException.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/AggregateException.php new file mode 100644 index 00000000..86e7cc23 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/AggregateException.php @@ -0,0 +1,14 @@ +then(function ($v) { echo $v; }); + * + * @param callable $generatorFn Generator function to wrap into a promise. + * + * @return Promise + * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration + */ +final class Coroutine implements \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface +{ + /** + * @var PromiseInterface|null + */ + private $currentPromise; + /** + * @var Generator + */ + private $generator; + /** + * @var Promise + */ + private $result; + public function __construct(callable $generatorFn) + { + $this->generator = $generatorFn(); + $this->result = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise(function () { + while (isset($this->currentPromise)) { + $this->currentPromise->wait(); + } + }); + $this->nextCoroutine($this->generator->current()); + } + public function then(callable $onFulfilled = null, callable $onRejected = null) + { + return $this->result->then($onFulfilled, $onRejected); + } + public function otherwise(callable $onRejected) + { + return $this->result->otherwise($onRejected); + } + public function wait($unwrap = \true) + { + return $this->result->wait($unwrap); + } + public function getState() + { + return $this->result->getState(); + } + public function resolve($value) + { + $this->result->resolve($value); + } + public function reject($reason) + { + $this->result->reject($reason); + } + public function cancel() + { + $this->currentPromise->cancel(); + $this->result->cancel(); + } + private function nextCoroutine($yielded) + { + $this->currentPromise = promise_for($yielded)->then([$this, '_handleSuccess'], [$this, '_handleFailure']); + } + /** + * @internal + */ + public function _handleSuccess($value) + { + unset($this->currentPromise); + try { + $next = $this->generator->send($value); + if ($this->generator->valid()) { + $this->nextCoroutine($next); + } else { + $this->result->resolve($value); + } + } catch (\Exception $exception) { + $this->result->reject($exception); + } catch (\Throwable $throwable) { + $this->result->reject($throwable); + } + } + /** + * @internal + */ + public function _handleFailure($reason) + { + unset($this->currentPromise); + try { + $nextYield = $this->generator->throw(exception_for($reason)); + // The throw was caught, so keep iterating on the coroutine + $this->nextCoroutine($nextYield); + } catch (\Exception $exception) { + $this->result->reject($exception); + } catch (\Throwable $throwable) { + $this->result->reject($throwable); + } + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/EachPromise.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/EachPromise.php new file mode 100644 index 00000000..1aee2dcd --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/EachPromise.php @@ -0,0 +1,190 @@ +iterable = iter_for($iterable); + if (isset($config['concurrency'])) { + $this->concurrency = $config['concurrency']; + } + if (isset($config['fulfilled'])) { + $this->onFulfilled = $config['fulfilled']; + } + if (isset($config['rejected'])) { + $this->onRejected = $config['rejected']; + } + } + public function promise() + { + if ($this->aggregate) { + return $this->aggregate; + } + try { + $this->createPromise(); + $this->iterable->rewind(); + $this->refillPending(); + } catch (\Throwable $e) { + $this->aggregate->reject($e); + } catch (\Exception $e) { + $this->aggregate->reject($e); + } + return $this->aggregate; + } + private function createPromise() + { + $this->mutex = \false; + $this->aggregate = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise(function () { + \reset($this->pending); + if (empty($this->pending) && !$this->iterable->valid()) { + $this->aggregate->resolve(null); + return; + } + // Consume a potentially fluctuating list of promises while + // ensuring that indexes are maintained (precluding array_shift). + while ($promise = \current($this->pending)) { + \next($this->pending); + $promise->wait(); + if ($this->aggregate->getState() !== \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::PENDING) { + return; + } + } + }); + // Clear the references when the promise is resolved. + $clearFn = function () { + $this->iterable = $this->concurrency = $this->pending = null; + $this->onFulfilled = $this->onRejected = null; + }; + $this->aggregate->then($clearFn, $clearFn); + } + private function refillPending() + { + if (!$this->concurrency) { + // Add all pending promises. + while ($this->addPending() && $this->advanceIterator()) { + } + return; + } + // Add only up to N pending promises. + $concurrency = \is_callable($this->concurrency) ? \call_user_func($this->concurrency, \count($this->pending)) : $this->concurrency; + $concurrency = \max($concurrency - \count($this->pending), 0); + // Concurrency may be set to 0 to disallow new promises. + if (!$concurrency) { + return; + } + // Add the first pending promise. + $this->addPending(); + // Note this is special handling for concurrency=1 so that we do + // not advance the iterator after adding the first promise. This + // helps work around issues with generators that might not have the + // next value to yield until promise callbacks are called. + while (--$concurrency && $this->advanceIterator() && $this->addPending()) { + } + } + private function addPending() + { + if (!$this->iterable || !$this->iterable->valid()) { + return \false; + } + $promise = promise_for($this->iterable->current()); + $idx = $this->iterable->key(); + $this->pending[$idx] = $promise->then(function ($value) use($idx) { + if ($this->onFulfilled) { + \call_user_func($this->onFulfilled, $value, $idx, $this->aggregate); + } + $this->step($idx); + }, function ($reason) use($idx) { + if ($this->onRejected) { + \call_user_func($this->onRejected, $reason, $idx, $this->aggregate); + } + $this->step($idx); + }); + return \true; + } + private function advanceIterator() + { + // Place a lock on the iterator so that we ensure to not recurse, + // preventing fatal generator errors. + if ($this->mutex) { + return \false; + } + $this->mutex = \true; + try { + $this->iterable->next(); + $this->mutex = \false; + return \true; + } catch (\Throwable $e) { + $this->aggregate->reject($e); + $this->mutex = \false; + return \false; + } catch (\Exception $e) { + $this->aggregate->reject($e); + $this->mutex = \false; + return \false; + } + } + private function step($idx) + { + // If the promise was already resolved, then ignore this step. + if ($this->aggregate->getState() !== \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::PENDING) { + return; + } + unset($this->pending[$idx]); + // Only refill pending promises if we are not locked, preventing the + // EachPromise to recursively invoke the provided iterator, which + // cause a fatal error: "Cannot resume an already running generator" + if ($this->advanceIterator() && !$this->checkIfFinished()) { + // Add more pending promises if possible. + $this->refillPending(); + } + } + private function checkIfFinished() + { + if (!$this->pending && !$this->iterable->valid()) { + // Resolve the promise if there's nothing left to do. + $this->aggregate->resolve(null); + return \true; + } + return \false; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/FulfilledPromise.php new file mode 100644 index 00000000..25b762c9 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/FulfilledPromise.php @@ -0,0 +1,69 @@ +value = $value; + } + public function then(callable $onFulfilled = null, callable $onRejected = null) + { + // Return itself if there is no onFulfilled function. + if (!$onFulfilled) { + return $this; + } + $queue = queue(); + $p = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise([$queue, 'run']); + $value = $this->value; + $queue->add(static function () use($p, $value, $onFulfilled) { + if ($p->getState() === self::PENDING) { + try { + $p->resolve($onFulfilled($value)); + } catch (\Throwable $e) { + $p->reject($e); + } catch (\Exception $e) { + $p->reject($e); + } + } + }); + return $p; + } + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + public function wait($unwrap = \true, $defaultDelivery = null) + { + return $unwrap ? $this->value : null; + } + public function getState() + { + return self::FULFILLED; + } + public function resolve($value) + { + if ($value !== $this->value) { + throw new \LogicException("Cannot resolve a fulfilled promise"); + } + } + public function reject($reason) + { + throw new \LogicException("Cannot reject a fulfilled promise"); + } + public function cancel() + { + // pass + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/Promise.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/Promise.php new file mode 100644 index 00000000..ea79909a --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/Promise.php @@ -0,0 +1,231 @@ +waitFn = $waitFn; + $this->cancelFn = $cancelFn; + } + public function then(callable $onFulfilled = null, callable $onRejected = null) + { + if ($this->state === self::PENDING) { + $p = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise(null, [$this, 'cancel']); + $this->handlers[] = [$p, $onFulfilled, $onRejected]; + $p->waitList = $this->waitList; + $p->waitList[] = $this; + return $p; + } + // Return a fulfilled promise and immediately invoke any callbacks. + if ($this->state === self::FULFILLED) { + return $onFulfilled ? promise_for($this->result)->then($onFulfilled) : promise_for($this->result); + } + // It's either cancelled or rejected, so return a rejected promise + // and immediately invoke any callbacks. + $rejection = rejection_for($this->result); + return $onRejected ? $rejection->then(null, $onRejected) : $rejection; + } + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + public function wait($unwrap = \true) + { + $this->waitIfPending(); + $inner = $this->result instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface ? $this->result->wait($unwrap) : $this->result; + if ($unwrap) { + if ($this->result instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface || $this->state === self::FULFILLED) { + return $inner; + } else { + // It's rejected so "unwrap" and throw an exception. + throw exception_for($inner); + } + } + } + public function getState() + { + return $this->state; + } + public function cancel() + { + if ($this->state !== self::PENDING) { + return; + } + $this->waitFn = $this->waitList = null; + if ($this->cancelFn) { + $fn = $this->cancelFn; + $this->cancelFn = null; + try { + $fn(); + } catch (\Throwable $e) { + $this->reject($e); + } catch (\Exception $e) { + $this->reject($e); + } + } + // Reject the promise only if it wasn't rejected in a then callback. + if ($this->state === self::PENDING) { + $this->reject(new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\CancellationException('Promise has been cancelled')); + } + } + public function resolve($value) + { + $this->settle(self::FULFILLED, $value); + } + public function reject($reason) + { + $this->settle(self::REJECTED, $reason); + } + private function settle($state, $value) + { + if ($this->state !== self::PENDING) { + // Ignore calls with the same resolution. + if ($state === $this->state && $value === $this->result) { + return; + } + throw $this->state === $state ? new \LogicException("The promise is already {$state}.") : new \LogicException("Cannot change a {$this->state} promise to {$state}"); + } + if ($value === $this) { + throw new \LogicException('Cannot fulfill or reject a promise with itself'); + } + // Clear out the state of the promise but stash the handlers. + $this->state = $state; + $this->result = $value; + $handlers = $this->handlers; + $this->handlers = null; + $this->waitList = $this->waitFn = null; + $this->cancelFn = null; + if (!$handlers) { + return; + } + // If the value was not a settled promise or a thenable, then resolve + // it in the task queue using the correct ID. + if (!\method_exists($value, 'then')) { + $id = $state === self::FULFILLED ? 1 : 2; + // It's a success, so resolve the handlers in the queue. + queue()->add(static function () use($id, $value, $handlers) { + foreach ($handlers as $handler) { + self::callHandler($id, $value, $handler); + } + }); + } elseif ($value instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise && $value->getState() === self::PENDING) { + // We can just merge our handlers onto the next promise. + $value->handlers = \array_merge($value->handlers, $handlers); + } else { + // Resolve the handlers when the forwarded promise is resolved. + $value->then(static function ($value) use($handlers) { + foreach ($handlers as $handler) { + self::callHandler(1, $value, $handler); + } + }, static function ($reason) use($handlers) { + foreach ($handlers as $handler) { + self::callHandler(2, $reason, $handler); + } + }); + } + } + /** + * Call a stack of handlers using a specific callback index and value. + * + * @param int $index 1 (resolve) or 2 (reject). + * @param mixed $value Value to pass to the callback. + * @param array $handler Array of handler data (promise and callbacks). + * + * @return array Returns the next group to resolve. + */ + private static function callHandler($index, $value, array $handler) + { + /** @var PromiseInterface $promise */ + $promise = $handler[0]; + // The promise may have been cancelled or resolved before placing + // this thunk in the queue. + if ($promise->getState() !== self::PENDING) { + return; + } + try { + if (isset($handler[$index])) { + $promise->resolve($handler[$index]($value)); + } elseif ($index === 1) { + // Forward resolution values as-is. + $promise->resolve($value); + } else { + // Forward rejections down the chain. + $promise->reject($value); + } + } catch (\Throwable $reason) { + $promise->reject($reason); + } catch (\Exception $reason) { + $promise->reject($reason); + } + } + private function waitIfPending() + { + if ($this->state !== self::PENDING) { + return; + } elseif ($this->waitFn) { + $this->invokeWaitFn(); + } elseif ($this->waitList) { + $this->invokeWaitList(); + } else { + // If there's not wait function, then reject the promise. + $this->reject('Cannot wait on a promise that has ' . 'no internal wait function. You must provide a wait ' . 'function when constructing the promise to be able to ' . 'wait on a promise.'); + } + queue()->run(); + if ($this->state === self::PENDING) { + $this->reject('Invoking the wait callback did not resolve the promise'); + } + } + private function invokeWaitFn() + { + try { + $wfn = $this->waitFn; + $this->waitFn = null; + $wfn(\true); + } catch (\Exception $reason) { + if ($this->state === self::PENDING) { + // The promise has not been resolved yet, so reject the promise + // with the exception. + $this->reject($reason); + } else { + // The promise was already resolved, so there's a problem in + // the application. + throw $reason; + } + } + } + private function invokeWaitList() + { + $waitList = $this->waitList; + $this->waitList = null; + foreach ($waitList as $result) { + while (\true) { + $result->waitIfPending(); + if ($result->result instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise) { + $result = $result->result; + } else { + if ($result->result instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface) { + $result->result->wait(\false); + } + break; + } + } + } + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/PromiseInterface.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/PromiseInterface.php new file mode 100644 index 00000000..a8f00bbb --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/PromiseInterface.php @@ -0,0 +1,84 @@ +reason = $reason; + } + public function then(callable $onFulfilled = null, callable $onRejected = null) + { + // If there's no onRejected callback then just return self. + if (!$onRejected) { + return $this; + } + $queue = queue(); + $reason = $this->reason; + $p = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise([$queue, 'run']); + $queue->add(static function () use($p, $reason, $onRejected) { + if ($p->getState() === self::PENDING) { + try { + // Return a resolved promise if onRejected does not throw. + $p->resolve($onRejected($reason)); + } catch (\Throwable $e) { + // onRejected threw, so return a rejected promise. + $p->reject($e); + } catch (\Exception $e) { + // onRejected threw, so return a rejected promise. + $p->reject($e); + } + } + }); + return $p; + } + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + public function wait($unwrap = \true, $defaultDelivery = null) + { + if ($unwrap) { + throw exception_for($this->reason); + } + } + public function getState() + { + return self::REJECTED; + } + public function resolve($value) + { + throw new \LogicException("Cannot resolve a rejected promise"); + } + public function reject($reason) + { + if ($reason !== $this->reason) { + throw new \LogicException("Cannot reject a rejected promise"); + } + } + public function cancel() + { + // pass + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/RejectionException.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/RejectionException.php new file mode 100644 index 00000000..181627d2 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/RejectionException.php @@ -0,0 +1,40 @@ +reason = $reason; + $message = 'The promise was rejected'; + if ($description) { + $message .= ' with reason: ' . $description; + } elseif (\is_string($reason) || \is_object($reason) && \method_exists($reason, '__toString')) { + $message .= ' with reason: ' . $this->reason; + } elseif ($reason instanceof \JsonSerializable) { + $message .= ' with reason: ' . \json_encode($this->reason, \JSON_PRETTY_PRINT); + } + parent::__construct($message); + } + /** + * Returns the rejection reason. + * + * @return mixed + */ + public function getReason() + { + return $this->reason; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/TaskQueue.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/TaskQueue.php new file mode 100644 index 00000000..bc303450 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/TaskQueue.php @@ -0,0 +1,62 @@ +run(); + */ +class TaskQueue implements \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\TaskQueueInterface +{ + private $enableShutdown = \true; + private $queue = []; + public function __construct($withShutdown = \true) + { + if ($withShutdown) { + \register_shutdown_function(function () { + if ($this->enableShutdown) { + // Only run the tasks if an E_ERROR didn't occur. + $err = \error_get_last(); + if (!$err || $err['type'] ^ \E_ERROR) { + $this->run(); + } + } + }); + } + } + public function isEmpty() + { + return !$this->queue; + } + public function add(callable $task) + { + $this->queue[] = $task; + } + public function run() + { + /** @var callable $task */ + while ($task = \array_shift($this->queue)) { + $task(); + } + } + /** + * The task queue will be run and exhausted by default when the process + * exits IFF the exit is not the result of a PHP E_ERROR error. + * + * You can disable running the automatic shutdown of the queue by calling + * this function. If you disable the task queue shutdown process, then you + * MUST either run the task queue (as a result of running your event loop + * or manually using the run() method) or wait on each outstanding promise. + * + * Note: This shutdown will occur before any destructors are triggered. + */ + public function disableShutdown() + { + $this->enableShutdown = \false; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/TaskQueueInterface.php new file mode 100644 index 00000000..c42bd7a2 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/TaskQueueInterface.php @@ -0,0 +1,24 @@ + + * while ($eventLoop->isRunning()) { + * GuzzleHttp\Promise\queue()->run(); + * } + *
+ * + * @param TaskQueueInterface $assign Optionally specify a new queue instance. + * + * @return TaskQueueInterface + */ +function queue(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\TaskQueueInterface $assign = null) +{ + static $queue; + if ($assign) { + $queue = $assign; + } elseif (!$queue) { + $queue = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\TaskQueue(); + } + return $queue; +} +/** + * Adds a function to run in the task queue when it is next `run()` and returns + * a promise that is fulfilled or rejected with the result. + * + * @param callable $task Task function to run. + * + * @return PromiseInterface + */ +function task(callable $task) +{ + $queue = queue(); + $promise = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise([$queue, 'run']); + $queue->add(function () use($task, $promise) { + try { + $promise->resolve($task()); + } catch (\Throwable $e) { + $promise->reject($e); + } catch (\Exception $e) { + $promise->reject($e); + } + }); + return $promise; +} +/** + * Creates a promise for a value if the value is not a promise. + * + * @param mixed $value Promise or value. + * + * @return PromiseInterface + */ +function promise_for($value) +{ + if ($value instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface) { + return $value; + } + // Return a Guzzle promise that shadows the given promise. + if (\method_exists($value, 'then')) { + $wfn = \method_exists($value, 'wait') ? [$value, 'wait'] : null; + $cfn = \method_exists($value, 'cancel') ? [$value, 'cancel'] : null; + $promise = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise($wfn, $cfn); + $value->then([$promise, 'resolve'], [$promise, 'reject']); + return $promise; + } + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\FulfilledPromise($value); +} +/** + * Creates a rejected promise for a reason if the reason is not a promise. If + * the provided reason is a promise, then it is returned as-is. + * + * @param mixed $reason Promise or reason. + * + * @return PromiseInterface + */ +function rejection_for($reason) +{ + if ($reason instanceof \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface) { + return $reason; + } + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\RejectedPromise($reason); +} +/** + * Create an exception for a rejected promise value. + * + * @param mixed $reason + * + * @return \Exception|\Throwable + */ +function exception_for($reason) +{ + return $reason instanceof \Exception || $reason instanceof \Throwable ? $reason : new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\RejectionException($reason); +} +/** + * Returns an iterator for the given value. + * + * @param mixed $value + * + * @return \Iterator + */ +function iter_for($value) +{ + if ($value instanceof \Iterator) { + return $value; + } elseif (\is_array($value)) { + return new \ArrayIterator($value); + } else { + return new \ArrayIterator([$value]); + } +} +/** + * Synchronously waits on a promise to resolve and returns an inspection state + * array. + * + * Returns a state associative array containing a "state" key mapping to a + * valid promise state. If the state of the promise is "fulfilled", the array + * will contain a "value" key mapping to the fulfilled value of the promise. If + * the promise is rejected, the array will contain a "reason" key mapping to + * the rejection reason of the promise. + * + * @param PromiseInterface $promise Promise or value. + * + * @return array + */ +function inspect(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface $promise) +{ + try { + return ['state' => \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::FULFILLED, 'value' => $promise->wait()]; + } catch (\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\RejectionException $e) { + return ['state' => \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::REJECTED, 'reason' => $e->getReason()]; + } catch (\Throwable $e) { + return ['state' => \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::REJECTED, 'reason' => $e]; + } catch (\Exception $e) { + return ['state' => \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::REJECTED, 'reason' => $e]; + } +} +/** + * Waits on all of the provided promises, but does not unwrap rejected promises + * as thrown exception. + * + * Returns an array of inspection state arrays. + * + * @param PromiseInterface[] $promises Traversable of promises to wait upon. + * + * @return array + * @see GuzzleHttp\Promise\inspect for the inspection state array format. + */ +function inspect_all($promises) +{ + $results = []; + foreach ($promises as $key => $promise) { + $results[$key] = inspect($promise); + } + return $results; +} +/** + * Waits on all of the provided promises and returns the fulfilled values. + * + * Returns an array that contains the value of each promise (in the same order + * the promises were provided). An exception is thrown if any of the promises + * are rejected. + * + * @param mixed $promises Iterable of PromiseInterface objects to wait on. + * + * @return array + * @throws \Exception on error + * @throws \Throwable on error in PHP >=7 + */ +function unwrap($promises) +{ + $results = []; + foreach ($promises as $key => $promise) { + $results[$key] = $promise->wait(); + } + return $results; +} +/** + * Given an array of promises, return a promise that is fulfilled when all the + * items in the array are fulfilled. + * + * The promise's fulfillment value is an array with fulfillment values at + * respective positions to the original array. If any promise in the array + * rejects, the returned promise is rejected with the rejection reason. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function all($promises) +{ + $results = []; + return \each($promises, function ($value, $idx) use(&$results) { + $results[$idx] = $value; + }, function ($reason, $idx, \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Promise $aggregate) { + $aggregate->reject($reason); + })->then(function () use(&$results) { + \ksort($results); + return $results; + }); +} +/** + * Initiate a competitive race between multiple promises or values (values will + * become immediately fulfilled promises). + * + * When count amount of promises have been fulfilled, the returned promise is + * fulfilled with an array that contains the fulfillment values of the winners + * in order of resolution. + * + * This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException} + * if the number of fulfilled promises is less than the desired $count. + * + * @param int $count Total number of promises. + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function some($count, $promises) +{ + $results = []; + $rejections = []; + return \each($promises, function ($value, $idx, \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface $p) use(&$results, $count) { + if ($p->getState() !== \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::PENDING) { + return; + } + $results[$idx] = $value; + if (\count($results) >= $count) { + $p->resolve(null); + } + }, function ($reason) use(&$rejections) { + $rejections[] = $reason; + })->then(function () use(&$results, &$rejections, $count) { + if (\count($results) !== $count) { + throw new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\AggregateException('Not enough promises to fulfill count', $rejections); + } + \ksort($results); + return \array_values($results); + }); +} +/** + * Like some(), with 1 as count. However, if the promise fulfills, the + * fulfillment value is not an array of 1 but the value directly. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function any($promises) +{ + return some(1, $promises)->then(function ($values) { + return $values[0]; + }); +} +/** + * Returns a promise that is fulfilled when all of the provided promises have + * been fulfilled or rejected. + * + * The returned promise is fulfilled with an array of inspection state arrays. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + * @see GuzzleHttp\Promise\inspect for the inspection state array format. + */ +function settle($promises) +{ + $results = []; + return \each($promises, function ($value, $idx) use(&$results) { + $results[$idx] = ['state' => \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::FULFILLED, 'value' => $value]; + }, function ($reason, $idx) use(&$results) { + $results[$idx] = ['state' => \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::REJECTED, 'reason' => $reason]; + })->then(function () use(&$results) { + \ksort($results); + return $results; + }); +} +/** + * Given an iterator that yields promises or values, returns a promise that is + * fulfilled with a null value when the iterator has been consumed or the + * aggregate promise has been fulfilled or rejected. + * + * $onFulfilled is a function that accepts the fulfilled value, iterator + * index, and the aggregate promise. The callback can invoke any necessary side + * effects and choose to resolve or reject the aggregate promise if needed. + * + * $onRejected is a function that accepts the rejection reason, iterator + * index, and the aggregate promise. The callback can invoke any necessary side + * effects and choose to resolve or reject the aggregate promise if needed. + * + * @param mixed $iterable Iterator or array to iterate over. + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface + */ +function each($iterable, callable $onFulfilled = null, callable $onRejected = null) +{ + return (new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\EachPromise($iterable, ['fulfilled' => $onFulfilled, 'rejected' => $onRejected]))->promise(); +} +/** + * Like each, but only allows a certain number of outstanding promises at any + * given time. + * + * $concurrency may be an integer or a function that accepts the number of + * pending promises and returns a numeric concurrency limit value to allow for + * dynamic a concurrency size. + * + * @param mixed $iterable + * @param int|callable $concurrency + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface + */ +function each_limit($iterable, $concurrency, callable $onFulfilled = null, callable $onRejected = null) +{ + return (new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\EachPromise($iterable, ['fulfilled' => $onFulfilled, 'rejected' => $onRejected, 'concurrency' => $concurrency]))->promise(); +} +/** + * Like each_limit, but ensures that no promise in the given $iterable argument + * is rejected. If any promise is rejected, then the aggregate promise is + * rejected with the encountered rejection. + * + * @param mixed $iterable + * @param int|callable $concurrency + * @param callable $onFulfilled + * + * @return PromiseInterface + */ +function each_limit_all($iterable, $concurrency, callable $onFulfilled = null) +{ + return each_limit($iterable, $concurrency, $onFulfilled, function ($reason, $idx, \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface $aggregate) { + $aggregate->reject($reason); + }); +} +/** + * Returns true if a promise is fulfilled. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_fulfilled(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface $promise) +{ + return $promise->getState() === \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::FULFILLED; +} +/** + * Returns true if a promise is rejected. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_rejected(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface $promise) +{ + return $promise->getState() === \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::REJECTED; +} +/** + * Returns true if a promise is fulfilled or rejected. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_settled(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface $promise) +{ + return $promise->getState() !== \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\PromiseInterface::PENDING; +} +/** + * @see Coroutine + * + * @param callable $generatorFn + * + * @return PromiseInterface + */ +function coroutine(callable $generatorFn) +{ + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Promise\Coroutine($generatorFn); +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/functions_include.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/functions_include.php new file mode 100644 index 00000000..457514dd --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/promises/src/functions_include.php @@ -0,0 +1,8 @@ +withPath('foo')->withHost('example.com')` will throw an exception + because the path of a URI with an authority must start with a slash "/" or be empty + - `(new Uri())->withScheme('http')` will return `'http://localhost'` +* Fix compatibility of URIs with `file` scheme and empty host. +* Added common URI utility methods based on RFC 3986 (see documentation in the readme): + - `Uri::isDefaultPort` + - `Uri::isAbsolute` + - `Uri::isNetworkPathReference` + - `Uri::isAbsolutePathReference` + - `Uri::isRelativePathReference` + - `Uri::isSameDocumentReference` + - `Uri::composeComponents` + - `UriNormalizer::normalize` + - `UriNormalizer::isEquivalent` + - `UriResolver::relativize` +* Deprecated `Uri::resolve` in favor of `UriResolver::resolve` +* Deprecated `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` + +## 1.3.1 - 2016-06-25 + +* Fix `Uri::__toString` for network path references, e.g. `//example.org`. +* Fix missing lowercase normalization for host. +* Fix handling of URI components in case they are `'0'` in a lot of places, + e.g. as a user info password. +* Fix `Uri::withAddedHeader` to correctly merge headers with different case. +* Fix trimming of header values in `Uri::withAddedHeader`. Header values may + be surrounded by whitespace which should be ignored according to RFC 7230 + Section 3.2.4. This does not apply to header names. +* Fix `Uri::withAddedHeader` with an array of header values. +* Fix `Uri::resolve` when base path has no slash and handling of fragment. +* Fix handling of encoding in `Uri::with(out)QueryValue` so one can pass the + key/value both in encoded as well as decoded form to those methods. This is + consistent with withPath, withQuery etc. +* Fix `ServerRequest::withoutAttribute` when attribute value is null. + +## 1.3.0 - 2016-04-13 + +* Added remaining interfaces needed for full PSR7 compatibility + (ServerRequestInterface, UploadedFileInterface, etc.). +* Added support for stream_for from scalars. +* Can now extend Uri. +* Fixed a bug in validating request methods by making it more permissive. + +## 1.2.3 - 2016-02-18 + +* Fixed support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote + streams, which can sometimes return fewer bytes than requested with `fread`. +* Fixed handling of gzipped responses with FNAME headers. + +## 1.2.2 - 2016-01-22 + +* Added support for URIs without any authority. +* Added support for HTTP 451 'Unavailable For Legal Reasons.' +* Added support for using '0' as a filename. +* Added support for including non-standard ports in Host headers. + +## 1.2.1 - 2015-11-02 + +* Now supporting negative offsets when seeking to SEEK_END. + +## 1.2.0 - 2015-08-15 + +* Body as `"0"` is now properly added to a response. +* Now allowing forward seeking in CachingStream. +* Now properly parsing HTTP requests that contain proxy targets in + `parse_request`. +* functions.php is now conditionally required. +* user-info is no longer dropped when resolving URIs. + +## 1.1.0 - 2015-06-24 + +* URIs can now be relative. +* `multipart/form-data` headers are now overridden case-insensitively. +* URI paths no longer encode the following characters because they are allowed + in URIs: "(", ")", "*", "!", "'" +* A port is no longer added to a URI when the scheme is missing and no port is + present. + +## 1.0.0 - 2015-05-19 + +Initial release. + +Currently unsupported: + +- `Psr\Http\Message\ServerRequestInterface` +- `Psr\Http\Message\UploadedFileInterface` diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/LICENSE b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/LICENSE new file mode 100644 index 00000000..581d95f9 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/README.md b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/README.md new file mode 100644 index 00000000..16499358 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/README.md @@ -0,0 +1,739 @@ +# PSR-7 Message Implementation + +This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/) +message implementation, several stream decorators, and some helpful +functionality like query string parsing. + + +[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7) + + +# Stream implementation + +This package comes with a number of stream implementations and stream +decorators. + + +## AppendStream + +`GuzzleHttp\Psr7\AppendStream` + +Reads from multiple streams, one after the other. + +```php +use GuzzleHttp\Psr7; + +$a = Psr7\stream_for('abc, '); +$b = Psr7\stream_for('123.'); +$composed = new Psr7\AppendStream([$a, $b]); + +$composed->addStream(Psr7\stream_for(' Above all listen to me')); + +echo $composed; // abc, 123. Above all listen to me. +``` + + +## BufferStream + +`GuzzleHttp\Psr7\BufferStream` + +Provides a buffer stream that can be written to fill a buffer, and read +from to remove bytes from the buffer. + +This stream returns a "hwm" metadata value that tells upstream consumers +what the configured high water mark of the stream is, or the maximum +preferred size of the buffer. + +```php +use GuzzleHttp\Psr7; + +// When more than 1024 bytes are in the buffer, it will begin returning +// false to writes. This is an indication that writers should slow down. +$buffer = new Psr7\BufferStream(1024); +``` + + +## CachingStream + +The CachingStream is used to allow seeking over previously read bytes on +non-seekable streams. This can be useful when transferring a non-seekable +entity body fails due to needing to rewind the stream (for example, resulting +from a redirect). Data that is read from the remote stream will be buffered in +a PHP temp stream so that previously read bytes are cached first in memory, +then on disk. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for(fopen('http://www.google.com', 'r')); +$stream = new Psr7\CachingStream($original); + +$stream->read(1024); +echo $stream->tell(); +// 1024 + +$stream->seek(0); +echo $stream->tell(); +// 0 +``` + + +## DroppingStream + +`GuzzleHttp\Psr7\DroppingStream` + +Stream decorator that begins dropping data once the size of the underlying +stream becomes too full. + +```php +use GuzzleHttp\Psr7; + +// Create an empty stream +$stream = Psr7\stream_for(); + +// Start dropping data when the stream has more than 10 bytes +$dropping = new Psr7\DroppingStream($stream, 10); + +$dropping->write('01234567890123456789'); +echo $stream; // 0123456789 +``` + + +## FnStream + +`GuzzleHttp\Psr7\FnStream` + +Compose stream implementations based on a hash of functions. + +Allows for easy testing and extension of a provided stream without needing +to create a concrete class for a simple extension point. + +```php + +use GuzzleHttp\Psr7; + +$stream = Psr7\stream_for('hi'); +$fnStream = Psr7\FnStream::decorate($stream, [ + 'rewind' => function () use ($stream) { + echo 'About to rewind - '; + $stream->rewind(); + echo 'rewound!'; + } +]); + +$fnStream->rewind(); +// Outputs: About to rewind - rewound! +``` + + +## InflateStream + +`GuzzleHttp\Psr7\InflateStream` + +Uses PHP's zlib.inflate filter to inflate deflate or gzipped content. + +This stream decorator skips the first 10 bytes of the given stream to remove +the gzip header, converts the provided stream to a PHP stream resource, +then appends the zlib.inflate filter. The stream is then converted back +to a Guzzle stream resource to be used as a Guzzle stream. + + +## LazyOpenStream + +`GuzzleHttp\Psr7\LazyOpenStream` + +Lazily reads or writes to a file that is opened only after an IO operation +take place on the stream. + +```php +use GuzzleHttp\Psr7; + +$stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); +// The file has not yet been opened... + +echo $stream->read(10); +// The file is opened and read from only when needed. +``` + + +## LimitStream + +`GuzzleHttp\Psr7\LimitStream` + +LimitStream can be used to read a subset or slice of an existing stream object. +This can be useful for breaking a large file into smaller pieces to be sent in +chunks (e.g. Amazon S3's multipart upload API). + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+')); +echo $original->getSize(); +// >>> 1048576 + +// Limit the size of the body to 1024 bytes and start reading from byte 2048 +$stream = new Psr7\LimitStream($original, 1024, 2048); +echo $stream->getSize(); +// >>> 1024 +echo $stream->tell(); +// >>> 0 +``` + + +## MultipartStream + +`GuzzleHttp\Psr7\MultipartStream` + +Stream that when read returns bytes for a streaming multipart or +multipart/form-data stream. + + +## NoSeekStream + +`GuzzleHttp\Psr7\NoSeekStream` + +NoSeekStream wraps a stream and does not allow seeking. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for('foo'); +$noSeek = new Psr7\NoSeekStream($original); + +echo $noSeek->read(3); +// foo +var_export($noSeek->isSeekable()); +// false +$noSeek->seek(0); +var_export($noSeek->read(3)); +// NULL +``` + + +## PumpStream + +`GuzzleHttp\Psr7\PumpStream` + +Provides a read only stream that pumps data from a PHP callable. + +When invoking the provided callable, the PumpStream will pass the amount of +data requested to read to the callable. The callable can choose to ignore +this value and return fewer or more bytes than requested. Any extra data +returned by the provided callable is buffered internally until drained using +the read() function of the PumpStream. The provided callable MUST return +false when there is no more data to read. + + +## Implementing stream decorators + +Creating a stream decorator is very easy thanks to the +`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that +implement `Psr\Http\Message\StreamInterface` by proxying to an underlying +stream. Just `use` the `StreamDecoratorTrait` and implement your custom +methods. + +For example, let's say we wanted to call a specific function each time the last +byte is read from a stream. This could be implemented by overriding the +`read()` method. + +```php +use Psr\Http\Message\StreamInterface; +use GuzzleHttp\Psr7\StreamDecoratorTrait; + +class EofCallbackStream implements StreamInterface +{ + use StreamDecoratorTrait; + + private $callback; + + public function __construct(StreamInterface $stream, callable $cb) + { + $this->stream = $stream; + $this->callback = $cb; + } + + public function read($length) + { + $result = $this->stream->read($length); + + // Invoke the callback when EOF is hit. + if ($this->eof()) { + call_user_func($this->callback); + } + + return $result; + } +} +``` + +This decorator could be added to any existing stream and used like so: + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for('foo'); + +$eofStream = new EofCallbackStream($original, function () { + echo 'EOF!'; +}); + +$eofStream->read(2); +$eofStream->read(1); +// echoes "EOF!" +$eofStream->seek(0); +$eofStream->read(3); +// echoes "EOF!" +``` + + +## PHP StreamWrapper + +You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a +PSR-7 stream as a PHP stream resource. + +Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP +stream from a PSR-7 stream. + +```php +use GuzzleHttp\Psr7\StreamWrapper; + +$stream = GuzzleHttp\Psr7\stream_for('hello!'); +$resource = StreamWrapper::getResource($stream); +echo fread($resource, 6); // outputs hello! +``` + + +# Function API + +There are various functions available under the `GuzzleHttp\Psr7` namespace. + + +## `function str` + +`function str(MessageInterface $message)` + +Returns the string representation of an HTTP message. + +```php +$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); +echo GuzzleHttp\Psr7\str($request); +``` + + +## `function uri_for` + +`function uri_for($uri)` + +This function accepts a string or `Psr\Http\Message\UriInterface` and returns a +UriInterface for the given value. If the value is already a `UriInterface`, it +is returned as-is. + +```php +$uri = GuzzleHttp\Psr7\uri_for('http://example.com'); +assert($uri === GuzzleHttp\Psr7\uri_for($uri)); +``` + + +## `function stream_for` + +`function stream_for($resource = '', array $options = [])` + +Create a new stream based on the input type. + +Options is an associative array that can contain the following keys: + +* - metadata: Array of custom metadata. +* - size: Size of the stream. + +This method accepts the following `$resource` types: + +- `Psr\Http\Message\StreamInterface`: Returns the value as-is. +- `string`: Creates a stream object that uses the given string as the contents. +- `resource`: Creates a stream object that wraps the given PHP stream resource. +- `Iterator`: If the provided value implements `Iterator`, then a read-only + stream object will be created that wraps the given iterable. Each time the + stream is read from, data from the iterator will fill a buffer and will be + continuously called until the buffer is equal to the requested read size. + Subsequent read calls will first read from the buffer and then call `next` + on the underlying iterator until it is exhausted. +- `object` with `__toString()`: If the object has the `__toString()` method, + the object will be cast to a string and then a stream will be returned that + uses the string value. +- `NULL`: When `null` is passed, an empty stream object is returned. +- `callable` When a callable is passed, a read-only stream object will be + created that invokes the given callable. The callable is invoked with the + number of suggested bytes to read. The callable can return any number of + bytes, but MUST return `false` when there is no more data to return. The + stream object that wraps the callable will invoke the callable until the + number of requested bytes are available. Any additional bytes will be + buffered and used in subsequent reads. + +```php +$stream = GuzzleHttp\Psr7\stream_for('foo'); +$stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r')); + +$generator function ($bytes) { + for ($i = 0; $i < $bytes; $i++) { + yield ' '; + } +} + +$stream = GuzzleHttp\Psr7\stream_for($generator(100)); +``` + + +## `function parse_header` + +`function parse_header($header)` + +Parse an array of header values containing ";" separated data into an array of +associative arrays representing the header key value pair data of the header. +When a parameter does not contain a value, but just contains a key, this +function will inject a key with a '' string value. + + +## `function normalize_header` + +`function normalize_header($header)` + +Converts an array of header values that may contain comma separated headers +into an array of headers with no comma separated values. + + +## `function modify_request` + +`function modify_request(RequestInterface $request, array $changes)` + +Clone and modify a request with the given changes. This method is useful for +reducing the number of clones needed to mutate a message. + +The changes can be one of: + +- method: (string) Changes the HTTP method. +- set_headers: (array) Sets the given headers. +- remove_headers: (array) Remove the given headers. +- body: (mixed) Sets the given body. +- uri: (UriInterface) Set the URI. +- query: (string) Set the query string value of the URI. +- version: (string) Set the protocol version. + + +## `function rewind_body` + +`function rewind_body(MessageInterface $message)` + +Attempts to rewind a message body and throws an exception on failure. The body +of the message will only be rewound if a call to `tell()` returns a value other +than `0`. + + +## `function try_fopen` + +`function try_fopen($filename, $mode)` + +Safely opens a PHP stream resource using a filename. + +When fopen fails, PHP normally raises a warning. This function adds an error +handler that checks for errors and throws an exception instead. + + +## `function copy_to_string` + +`function copy_to_string(StreamInterface $stream, $maxLen = -1)` + +Copy the contents of a stream into a string until the given number of bytes +have been read. + + +## `function copy_to_stream` + +`function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)` + +Copy the contents of a stream into another stream until the given number of +bytes have been read. + + +## `function hash` + +`function hash(StreamInterface $stream, $algo, $rawOutput = false)` + +Calculate a hash of a Stream. This method reads the entire stream to calculate +a rolling hash (based on PHP's hash_init functions). + + +## `function readline` + +`function readline(StreamInterface $stream, $maxLength = null)` + +Read a line from the stream up to the maximum allowed buffer length. + + +## `function parse_request` + +`function parse_request($message)` + +Parses a request message string into a request object. + + +## `function parse_response` + +`function parse_response($message)` + +Parses a response message string into a response object. + + +## `function parse_query` + +`function parse_query($str, $urlEncoding = true)` + +Parse a query string into an associative array. + +If multiple values are found for the same key, the value of that key value pair +will become an array. This function does not parse nested PHP style arrays into +an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into +`['foo[a]' => '1', 'foo[b]' => '2']`). + + +## `function build_query` + +`function build_query(array $params, $encoding = PHP_QUERY_RFC3986)` + +Build a query string from an array of key value pairs. + +This function can use the return value of parse_query() to build a query string. +This function does not modify the provided keys when an array is encountered +(like http_build_query would). + + +## `function mimetype_from_filename` + +`function mimetype_from_filename($filename)` + +Determines the mimetype of a file by looking at its extension. + + +## `function mimetype_from_extension` + +`function mimetype_from_extension($extension)` + +Maps a file extensions to a mimetype. + + +# Additional URI Methods + +Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, +this library also provides additional functionality when working with URIs as static methods. + +## URI Types + +An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. +An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, +the base URI. Relative references can be divided into several forms according to +[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): + +- network-path references, e.g. `//example.com/path` +- absolute-path references, e.g. `/path` +- relative-path references, e.g. `subpath` + +The following methods can be used to identify the type of the URI. + +### `GuzzleHttp\Psr7\Uri::isAbsolute` + +`public static function isAbsolute(UriInterface $uri): bool` + +Whether the URI is absolute, i.e. it has a scheme. + +### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` + +`public static function isNetworkPathReference(UriInterface $uri): bool` + +Whether the URI is a network-path reference. A relative reference that begins with two slash characters is +termed an network-path reference. + +### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` + +`public static function isAbsolutePathReference(UriInterface $uri): bool` + +Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is +termed an absolute-path reference. + +### `GuzzleHttp\Psr7\Uri::isRelativePathReference` + +`public static function isRelativePathReference(UriInterface $uri): bool` + +Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is +termed a relative-path reference. + +### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` + +`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` + +Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its +fragment component, identical to the base URI. When no base URI is given, only an empty URI reference +(apart from its fragment) is considered a same-document reference. + +## URI Components + +Additional methods to work with URI components. + +### `GuzzleHttp\Psr7\Uri::isDefaultPort` + +`public static function isDefaultPort(UriInterface $uri): bool` + +Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null +or the standard port. This method can be used independently of the implementation. + +### `GuzzleHttp\Psr7\Uri::composeComponents` + +`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` + +Composes a URI reference string from its various components according to +[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called +manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. + +### `GuzzleHttp\Psr7\Uri::fromParts` + +`public static function fromParts(array $parts): UriInterface` + +Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. + + +### `GuzzleHttp\Psr7\Uri::withQueryValue` + +`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` + +Creates a new URI with a specific query string value. Any existing query string values that exactly match the +provided key are removed and replaced with the given key value pair. A value of null will set the query string +key without a value, e.g. "key" instead of "key=value". + + +### `GuzzleHttp\Psr7\Uri::withoutQueryValue` + +`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` + +Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the +provided key are removed. + +## Reference Resolution + +`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according +to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers +do when resolving a link in a website based on the current request URI. + +### `GuzzleHttp\Psr7\UriResolver::resolve` + +`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` + +Converts the relative URI into a new URI that is resolved against the base URI. + +### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` + +`public static function removeDotSegments(string $path): string` + +Removes dot segments from a path and returns the new path according to +[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). + +### `GuzzleHttp\Psr7\UriResolver::relativize` + +`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` + +Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): + +```php +(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) +``` + +One use-case is to use the current request URI as base URI and then generate relative links in your documents +to reduce the document size or offer self-contained downloadable document archives. + +```php +$base = new Uri('http://example.com/a/b/'); +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. +echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. +``` + +## Normalization and Comparison + +`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to +[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). + +### `GuzzleHttp\Psr7\UriNormalizer::normalize` + +`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` + +Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. +This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask +of normalizations to apply. The following normalizations are available: + +- `UriNormalizer::PRESERVING_NORMALIZATIONS` + + Default normalizations which only include the ones that preserve semantics. + +- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` + + All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. + + Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` + +- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` + + Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of + ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should + not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved + characters by URI normalizers. + + Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` + +- `UriNormalizer::CONVERT_EMPTY_PATH` + + Converts the empty path to "/" for http and https URIs. + + Example: `http://example.org` → `http://example.org/` + +- `UriNormalizer::REMOVE_DEFAULT_HOST` + + Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host + "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to + RFC 3986. + + Example: `file://localhost/myfile` → `file:///myfile` + +- `UriNormalizer::REMOVE_DEFAULT_PORT` + + Removes the default port of the given URI scheme from the URI. + + Example: `http://example.org:80/` → `http://example.org/` + +- `UriNormalizer::REMOVE_DOT_SEGMENTS` + + Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would + change the semantics of the URI reference. + + Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` + +- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` + + Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes + and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization + may change the semantics. Encoded slashes (%2F) are not removed. + + Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` + +- `UriNormalizer::SORT_QUERY_PARAMETERS` + + Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be + significant (this is not defined by the standard). So this normalization is not safe and may change the semantics + of the URI. + + Example: `?lang=en&article=fred` → `?article=fred&lang=en` + +### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` + +`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` + +Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given +`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. +This of course assumes they will be resolved against the same base URI. If this is not the case, determination of +equivalence or difference of relative references does not mean anything. diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/composer.json b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/composer.json new file mode 100644 index 00000000..220f2931 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/composer.json @@ -0,0 +1,49 @@ +{ + "name": "guzzlehttp\/psr7", + "type": "library", + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "request", + "response", + "message", + "stream", + "http", + "uri", + "url" + ], + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https:\/\/github.com\/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https:\/\/github.com\/Tobion" + } + ], + "require": { + "php": ">=5.4.0", + "psr\/http-message": "~1.0" + }, + "require-dev": { + "phpunit\/phpunit": "~4.0" + }, + "provide": { + "psr\/http-message-implementation": "1.0" + }, + "autoload": { + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\GuzzleHttp\\Psr7\\": "src\/" + }, + "files": [ + "src\/functions_include.php" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + } +} \ No newline at end of file diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/AppendStream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/AppendStream.php new file mode 100644 index 00000000..aae16bf0 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -0,0 +1,196 @@ +addStream($stream); + } + } + public function __toString() + { + try { + $this->rewind(); + return $this->getContents(); + } catch (\Exception $e) { + return ''; + } + } + /** + * Add a stream to the AppendStream + * + * @param StreamInterface $stream Stream to append. Must be readable. + * + * @throws \InvalidArgumentException if the stream is not readable + */ + public function addStream(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $stream) + { + if (!$stream->isReadable()) { + throw new \InvalidArgumentException('Each stream must be readable'); + } + // The stream is only seekable if all streams are seekable + if (!$stream->isSeekable()) { + $this->seekable = \false; + } + $this->streams[] = $stream; + } + public function getContents() + { + return copy_to_string($this); + } + /** + * Closes each attached stream. + * + * {@inheritdoc} + */ + public function close() + { + $this->pos = $this->current = 0; + foreach ($this->streams as $stream) { + $stream->close(); + } + $this->streams = []; + } + /** + * Detaches each attached stream + * + * {@inheritdoc} + */ + public function detach() + { + $this->close(); + $this->detached = \true; + } + public function tell() + { + return $this->pos; + } + /** + * Tries to calculate the size by adding the size of each stream. + * + * If any of the streams do not return a valid number, then the size of the + * append stream cannot be determined and null is returned. + * + * {@inheritdoc} + */ + public function getSize() + { + $size = 0; + foreach ($this->streams as $stream) { + $s = $stream->getSize(); + if ($s === null) { + return null; + } + $size += $s; + } + return $size; + } + public function eof() + { + return !$this->streams || $this->current >= \count($this->streams) - 1 && $this->streams[$this->current]->eof(); + } + public function rewind() + { + $this->seek(0); + } + /** + * Attempts to seek to the given position. Only supports SEEK_SET. + * + * {@inheritdoc} + */ + public function seek($offset, $whence = \SEEK_SET) + { + if (!$this->seekable) { + throw new \RuntimeException('This AppendStream is not seekable'); + } elseif ($whence !== \SEEK_SET) { + throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); + } + $this->pos = $this->current = 0; + // Rewind each stream + foreach ($this->streams as $i => $stream) { + try { + $stream->rewind(); + } catch (\Exception $e) { + throw new \RuntimeException('Unable to seek stream ' . $i . ' of the AppendStream', 0, $e); + } + } + // Seek to the actual position by reading from each stream + while ($this->pos < $offset && !$this->eof()) { + $result = $this->read(\min(8096, $offset - $this->pos)); + if ($result === '') { + break; + } + } + } + /** + * Reads from all of the appended streams until the length is met or EOF. + * + * {@inheritdoc} + */ + public function read($length) + { + $buffer = ''; + $total = \count($this->streams) - 1; + $remaining = $length; + $progressToNext = \false; + while ($remaining > 0) { + // Progress to the next stream if needed. + if ($progressToNext || $this->streams[$this->current]->eof()) { + $progressToNext = \false; + if ($this->current === $total) { + break; + } + $this->current++; + } + $result = $this->streams[$this->current]->read($remaining); + // Using a loose comparison here to match on '', false, and null + if ($result == null) { + $progressToNext = \true; + continue; + } + $buffer .= $result; + $remaining = $length - \strlen($buffer); + } + $this->pos += \strlen($buffer); + return $buffer; + } + public function isReadable() + { + return \true; + } + public function isWritable() + { + return \false; + } + public function isSeekable() + { + return $this->seekable; + } + public function write($string) + { + throw new \RuntimeException('Cannot write to an AppendStream'); + } + public function getMetadata($key = null) + { + return $key ? null : []; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/BufferStream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/BufferStream.php new file mode 100644 index 00000000..3b737ccd --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -0,0 +1,115 @@ +hwm = $hwm; + } + public function __toString() + { + return $this->getContents(); + } + public function getContents() + { + $buffer = $this->buffer; + $this->buffer = ''; + return $buffer; + } + public function close() + { + $this->buffer = ''; + } + public function detach() + { + $this->close(); + } + public function getSize() + { + return \strlen($this->buffer); + } + public function isReadable() + { + return \true; + } + public function isWritable() + { + return \true; + } + public function isSeekable() + { + return \false; + } + public function rewind() + { + $this->seek(0); + } + public function seek($offset, $whence = \SEEK_SET) + { + throw new \RuntimeException('Cannot seek a BufferStream'); + } + public function eof() + { + return \strlen($this->buffer) === 0; + } + public function tell() + { + throw new \RuntimeException('Cannot determine the position of a BufferStream'); + } + /** + * Reads data from the buffer. + */ + public function read($length) + { + $currentLength = \strlen($this->buffer); + if ($length >= $currentLength) { + // No need to slice the buffer because we don't have enough data. + $result = $this->buffer; + $this->buffer = ''; + } else { + // Slice up the result to provide a subset of the buffer. + $result = \substr($this->buffer, 0, $length); + $this->buffer = \substr($this->buffer, $length); + } + return $result; + } + /** + * Writes data to the buffer. + */ + public function write($string) + { + $this->buffer .= $string; + // TODO: What should happen here? + if (\strlen($this->buffer) >= $this->hwm) { + return \false; + } + return \strlen($string); + } + public function getMetadata($key = null) + { + if ($key == 'hwm') { + return $this->hwm; + } + return $key ? null : []; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/CachingStream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/CachingStream.php new file mode 100644 index 00000000..f8a79ba9 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/CachingStream.php @@ -0,0 +1,115 @@ +remoteStream = $stream; + $this->stream = $target ?: new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Stream(\fopen('php://temp', 'r+')); + } + public function getSize() + { + return \max($this->stream->getSize(), $this->remoteStream->getSize()); + } + public function rewind() + { + $this->seek(0); + } + public function seek($offset, $whence = \SEEK_SET) + { + if ($whence == \SEEK_SET) { + $byte = $offset; + } elseif ($whence == \SEEK_CUR) { + $byte = $offset + $this->tell(); + } elseif ($whence == \SEEK_END) { + $size = $this->remoteStream->getSize(); + if ($size === null) { + $size = $this->cacheEntireStream(); + } + $byte = $size + $offset; + } else { + throw new \InvalidArgumentException('Invalid whence'); + } + $diff = $byte - $this->stream->getSize(); + if ($diff > 0) { + // Read the remoteStream until we have read in at least the amount + // of bytes requested, or we reach the end of the file. + while ($diff > 0 && !$this->remoteStream->eof()) { + $this->read($diff); + $diff = $byte - $this->stream->getSize(); + } + } else { + // We can just do a normal seek since we've already seen this byte. + $this->stream->seek($byte); + } + } + public function read($length) + { + // Perform a regular read on any previously read data from the buffer + $data = $this->stream->read($length); + $remaining = $length - \strlen($data); + // More data was requested so read from the remote stream + if ($remaining) { + // If data was written to the buffer in a position that would have + // been filled from the remote stream, then we must skip bytes on + // the remote stream to emulate overwriting bytes from that + // position. This mimics the behavior of other PHP stream wrappers. + $remoteData = $this->remoteStream->read($remaining + $this->skipReadBytes); + if ($this->skipReadBytes) { + $len = \strlen($remoteData); + $remoteData = \substr($remoteData, $this->skipReadBytes); + $this->skipReadBytes = \max(0, $this->skipReadBytes - $len); + } + $data .= $remoteData; + $this->stream->write($remoteData); + } + return $data; + } + public function write($string) + { + // When appending to the end of the currently read stream, you'll want + // to skip bytes from being read from the remote stream to emulate + // other stream wrappers. Basically replacing bytes of data of a fixed + // length. + $overflow = \strlen($string) + $this->tell() - $this->remoteStream->tell(); + if ($overflow > 0) { + $this->skipReadBytes += $overflow; + } + return $this->stream->write($string); + } + public function eof() + { + return $this->stream->eof() && $this->remoteStream->eof(); + } + /** + * Close both the remote stream and buffer stream + */ + public function close() + { + $this->remoteStream->close() && $this->stream->close(); + } + private function cacheEntireStream() + { + $target = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\FnStream(['write' => 'strlen']); + copy_to_stream($this, $target); + return $this->tell(); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/DroppingStream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/DroppingStream.php new file mode 100644 index 00000000..100cfa22 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/DroppingStream.php @@ -0,0 +1,36 @@ +stream = $stream; + $this->maxLength = $maxLength; + } + public function write($string) + { + $diff = $this->maxLength - $this->stream->getSize(); + // Begin returning 0 when the underlying stream is too large. + if ($diff <= 0) { + return 0; + } + // Write the stream or a subset of the stream if needed. + if (\strlen($string) < $diff) { + return $this->stream->write($string); + } + return $this->stream->write(\substr($string, 0, $diff)); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/FnStream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/FnStream.php new file mode 100644 index 00000000..ea79cd27 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/FnStream.php @@ -0,0 +1,124 @@ +methods = $methods; + // Create the functions on the class + foreach ($methods as $name => $fn) { + $this->{'_fn_' . $name} = $fn; + } + } + /** + * Lazily determine which methods are not implemented. + * @throws \BadMethodCallException + */ + public function __get($name) + { + throw new \BadMethodCallException(\str_replace('_fn_', '', $name) . '() is not implemented in the FnStream'); + } + /** + * The close method is called on the underlying stream only if possible. + */ + public function __destruct() + { + if (isset($this->_fn_close)) { + \call_user_func($this->_fn_close); + } + } + /** + * Adds custom functionality to an underlying stream by intercepting + * specific method calls. + * + * @param StreamInterface $stream Stream to decorate + * @param array $methods Hash of method name to a closure + * + * @return FnStream + */ + public static function decorate(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $stream, array $methods) + { + // If any of the required methods were not provided, then simply + // proxy to the decorated stream. + foreach (\array_diff(self::$slots, \array_keys($methods)) as $diff) { + $methods[$diff] = [$stream, $diff]; + } + return new self($methods); + } + public function __toString() + { + return \call_user_func($this->_fn___toString); + } + public function close() + { + return \call_user_func($this->_fn_close); + } + public function detach() + { + return \call_user_func($this->_fn_detach); + } + public function getSize() + { + return \call_user_func($this->_fn_getSize); + } + public function tell() + { + return \call_user_func($this->_fn_tell); + } + public function eof() + { + return \call_user_func($this->_fn_eof); + } + public function isSeekable() + { + return \call_user_func($this->_fn_isSeekable); + } + public function rewind() + { + \call_user_func($this->_fn_rewind); + } + public function seek($offset, $whence = \SEEK_SET) + { + \call_user_func($this->_fn_seek, $offset, $whence); + } + public function isWritable() + { + return \call_user_func($this->_fn_isWritable); + } + public function write($string) + { + return \call_user_func($this->_fn_write, $string); + } + public function isReadable() + { + return \call_user_func($this->_fn_isReadable); + } + public function read($length) + { + return \call_user_func($this->_fn_read, $length); + } + public function getContents() + { + return \call_user_func($this->_fn_getContents); + } + public function getMetadata($key = null) + { + return \call_user_func($this->_fn_getMetadata, $key); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/InflateStream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/InflateStream.php new file mode 100644 index 00000000..936215e6 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -0,0 +1,48 @@ +read(10); + $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); + // Skip the header, that is 10 + length of filename + 1 (nil) bytes + $stream = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\LimitStream($stream, -1, 10 + $filenameHeaderLength); + $resource = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\StreamWrapper::getResource($stream); + \stream_filter_append($resource, 'zlib.inflate', \STREAM_FILTER_READ); + $this->stream = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Stream($resource); + } + /** + * @param StreamInterface $stream + * @param $header + * @return int + */ + private function getLengthOfPossibleFilenameHeader(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $stream, $header) + { + $filename_header_length = 0; + if (\substr(\bin2hex($header), 6, 2) === '08') { + // we have a filename, read until nil + $filename_header_length = 1; + while ($stream->read(1) !== \chr(0)) { + $filename_header_length++; + } + } + return $filename_header_length; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/LazyOpenStream.php new file mode 100644 index 00000000..b386ee06 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -0,0 +1,35 @@ +filename = $filename; + $this->mode = $mode; + } + /** + * Creates the underlying stream lazily when required. + * + * @return StreamInterface + */ + protected function createStream() + { + return stream_for(try_fopen($this->filename, $this->mode)); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/LimitStream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/LimitStream.php new file mode 100644 index 00000000..c9e894da --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -0,0 +1,128 @@ +stream = $stream; + $this->setLimit($limit); + $this->setOffset($offset); + } + public function eof() + { + // Always return true if the underlying stream is EOF + if ($this->stream->eof()) { + return \true; + } + // No limit and the underlying stream is not at EOF + if ($this->limit == -1) { + return \false; + } + return $this->stream->tell() >= $this->offset + $this->limit; + } + /** + * Returns the size of the limited subset of data + * {@inheritdoc} + */ + public function getSize() + { + if (null === ($length = $this->stream->getSize())) { + return null; + } elseif ($this->limit == -1) { + return $length - $this->offset; + } else { + return \min($this->limit, $length - $this->offset); + } + } + /** + * Allow for a bounded seek on the read limited stream + * {@inheritdoc} + */ + public function seek($offset, $whence = \SEEK_SET) + { + if ($whence !== \SEEK_SET || $offset < 0) { + throw new \RuntimeException(\sprintf('Cannot seek to offset % with whence %s', $offset, $whence)); + } + $offset += $this->offset; + if ($this->limit !== -1) { + if ($offset > $this->offset + $this->limit) { + $offset = $this->offset + $this->limit; + } + } + $this->stream->seek($offset); + } + /** + * Give a relative tell() + * {@inheritdoc} + */ + public function tell() + { + return $this->stream->tell() - $this->offset; + } + /** + * Set the offset to start limiting from + * + * @param int $offset Offset to seek to and begin byte limiting from + * + * @throws \RuntimeException if the stream cannot be seeked. + */ + public function setOffset($offset) + { + $current = $this->stream->tell(); + if ($current !== $offset) { + // If the stream cannot seek to the offset position, then read to it + if ($this->stream->isSeekable()) { + $this->stream->seek($offset); + } elseif ($current > $offset) { + throw new \RuntimeException("Could not seek to stream offset {$offset}"); + } else { + $this->stream->read($offset - $current); + } + } + $this->offset = $offset; + } + /** + * Set the limit of bytes that the decorator allows to be read from the + * stream. + * + * @param int $limit Number of bytes to allow to be read from the stream. + * Use -1 for no limit. + */ + public function setLimit($limit) + { + $this->limit = $limit; + } + public function read($length) + { + if ($this->limit == -1) { + return $this->stream->read($length); + } + // Check if the current position is less than the total allowed + // bytes + original offset + $remaining = $this->offset + $this->limit - $this->stream->tell(); + if ($remaining > 0) { + // Only return the amount of requested data, ensuring that the byte + // limit is not exceeded + return $this->stream->read(\min($remaining, $length)); + } + return ''; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/MessageTrait.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/MessageTrait.php new file mode 100644 index 00000000..f8b100f5 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -0,0 +1,150 @@ + array of values */ + private $headers = []; + /** @var array Map of lowercase header name => original name at registration */ + private $headerNames = []; + /** @var string */ + private $protocol = '1.1'; + /** @var StreamInterface */ + private $stream; + public function getProtocolVersion() + { + return $this->protocol; + } + public function withProtocolVersion($version) + { + if ($this->protocol === $version) { + return $this; + } + $new = clone $this; + $new->protocol = $version; + return $new; + } + public function getHeaders() + { + return $this->headers; + } + public function hasHeader($header) + { + return isset($this->headerNames[\strtolower($header)]); + } + public function getHeader($header) + { + $header = \strtolower($header); + if (!isset($this->headerNames[$header])) { + return []; + } + $header = $this->headerNames[$header]; + return $this->headers[$header]; + } + public function getHeaderLine($header) + { + return \implode(', ', $this->getHeader($header)); + } + public function withHeader($header, $value) + { + if (!\is_array($value)) { + $value = [$value]; + } + $value = $this->trimHeaderValues($value); + $normalized = \strtolower($header); + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + unset($new->headers[$new->headerNames[$normalized]]); + } + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + return $new; + } + public function withAddedHeader($header, $value) + { + if (!\is_array($value)) { + $value = [$value]; + } + $value = $this->trimHeaderValues($value); + $normalized = \strtolower($header); + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $new->headers[$header] = \array_merge($this->headers[$header], $value); + } else { + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + } + return $new; + } + public function withoutHeader($header) + { + $normalized = \strtolower($header); + if (!isset($this->headerNames[$normalized])) { + return $this; + } + $header = $this->headerNames[$normalized]; + $new = clone $this; + unset($new->headers[$header], $new->headerNames[$normalized]); + return $new; + } + public function getBody() + { + if (!$this->stream) { + $this->stream = stream_for(''); + } + return $this->stream; + } + public function withBody(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $body) + { + if ($body === $this->stream) { + return $this; + } + $new = clone $this; + $new->stream = $body; + return $new; + } + private function setHeaders(array $headers) + { + $this->headerNames = $this->headers = []; + foreach ($headers as $header => $value) { + if (!\is_array($value)) { + $value = [$value]; + } + $value = $this->trimHeaderValues($value); + $normalized = \strtolower($header); + if (isset($this->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $this->headers[$header] = \array_merge($this->headers[$header], $value); + } else { + $this->headerNames[$normalized] = $header; + $this->headers[$header] = $value; + } + } + } + /** + * Trims whitespace from the header values. + * + * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. + * + * header-field = field-name ":" OWS field-value OWS + * OWS = *( SP / HTAB ) + * + * @param string[] $values Header values + * + * @return string[] Trimmed header values + * + * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 + */ + private function trimHeaderValues(array $values) + { + return \array_map(function ($value) { + return \trim($value, " \t"); + }, $values); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/MultipartStream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/MultipartStream.php new file mode 100644 index 00000000..719dac2a --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -0,0 +1,123 @@ +boundary = $boundary ?: \sha1(\uniqid('', \true)); + $this->stream = $this->createStream($elements); + } + /** + * Get the boundary + * + * @return string + */ + public function getBoundary() + { + return $this->boundary; + } + public function isWritable() + { + return \false; + } + /** + * Get the headers needed before transferring the content of a POST file + */ + private function getHeaders(array $headers) + { + $str = ''; + foreach ($headers as $key => $value) { + $str .= "{$key}: {$value}\r\n"; + } + return "--{$this->boundary}\r\n" . \trim($str) . "\r\n\r\n"; + } + /** + * Create the aggregate stream that will be used to upload the POST data + */ + protected function createStream(array $elements) + { + $stream = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\AppendStream(); + foreach ($elements as $element) { + $this->addElement($stream, $element); + } + // Add the trailing boundary with CRLF + $stream->addStream(stream_for("--{$this->boundary}--\r\n")); + return $stream; + } + private function addElement(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\AppendStream $stream, array $element) + { + foreach (['contents', 'name'] as $key) { + if (!\array_key_exists($key, $element)) { + throw new \InvalidArgumentException("A '{$key}' key is required"); + } + } + $element['contents'] = stream_for($element['contents']); + if (empty($element['filename'])) { + $uri = $element['contents']->getMetadata('uri'); + if (\substr($uri, 0, 6) !== 'php://') { + $element['filename'] = $uri; + } + } + list($body, $headers) = $this->createElement($element['name'], $element['contents'], isset($element['filename']) ? $element['filename'] : null, isset($element['headers']) ? $element['headers'] : []); + $stream->addStream(stream_for($this->getHeaders($headers))); + $stream->addStream($body); + $stream->addStream(stream_for("\r\n")); + } + /** + * @return array + */ + private function createElement($name, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $stream, $filename, array $headers) + { + // Set a default content-disposition header if one was no provided + $disposition = $this->getHeader($headers, 'content-disposition'); + if (!$disposition) { + $headers['Content-Disposition'] = $filename === '0' || $filename ? \sprintf('form-data; name="%s"; filename="%s"', $name, \basename($filename)) : "form-data; name=\"{$name}\""; + } + // Set a default content-length header if one was no provided + $length = $this->getHeader($headers, 'content-length'); + if (!$length) { + if ($length = $stream->getSize()) { + $headers['Content-Length'] = (string) $length; + } + } + // Set a default Content-Type if one was not supplied + $type = $this->getHeader($headers, 'content-type'); + if (!$type && ($filename === '0' || $filename)) { + if ($type = mimetype_from_filename($filename)) { + $headers['Content-Type'] = $type; + } + } + return [$stream, $headers]; + } + private function getHeader(array $headers, $key) + { + $lowercaseHeader = \strtolower($key); + foreach ($headers as $k => $v) { + if (\strtolower($k) === $lowercaseHeader) { + return $v; + } + } + return null; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/NoSeekStream.php new file mode 100644 index 00000000..f08aa5b1 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/NoSeekStream.php @@ -0,0 +1,20 @@ +source = $source; + $this->size = isset($options['size']) ? $options['size'] : null; + $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; + $this->buffer = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\BufferStream(); + } + public function __toString() + { + try { + return copy_to_string($this); + } catch (\Exception $e) { + return ''; + } + } + public function close() + { + $this->detach(); + } + public function detach() + { + $this->tellPos = \false; + $this->source = null; + } + public function getSize() + { + return $this->size; + } + public function tell() + { + return $this->tellPos; + } + public function eof() + { + return !$this->source; + } + public function isSeekable() + { + return \false; + } + public function rewind() + { + $this->seek(0); + } + public function seek($offset, $whence = \SEEK_SET) + { + throw new \RuntimeException('Cannot seek a PumpStream'); + } + public function isWritable() + { + return \false; + } + public function write($string) + { + throw new \RuntimeException('Cannot write to a PumpStream'); + } + public function isReadable() + { + return \true; + } + public function read($length) + { + $data = $this->buffer->read($length); + $readLen = \strlen($data); + $this->tellPos += $readLen; + $remaining = $length - $readLen; + if ($remaining) { + $this->pump($remaining); + $data .= $this->buffer->read($remaining); + $this->tellPos += \strlen($data) - $readLen; + } + return $data; + } + public function getContents() + { + $result = ''; + while (!$this->eof()) { + $result .= $this->read(1000000); + } + return $result; + } + public function getMetadata($key = null) + { + if (!$key) { + return $this->metadata; + } + return isset($this->metadata[$key]) ? $this->metadata[$key] : null; + } + private function pump($length) + { + if ($this->source) { + do { + $data = \call_user_func($this->source, $length); + if ($data === \false || $data === null) { + $this->source = null; + return; + } + $this->buffer->write($data); + $length -= \strlen($data); + } while ($length > 0); + } + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Request.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Request.php new file mode 100644 index 00000000..820702a0 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Request.php @@ -0,0 +1,112 @@ +method = \strtoupper($method); + $this->uri = $uri; + $this->setHeaders($headers); + $this->protocol = $version; + if (!$this->hasHeader('Host')) { + $this->updateHostFromUri(); + } + if ($body !== '' && $body !== null) { + $this->stream = stream_for($body); + } + } + public function getRequestTarget() + { + if ($this->requestTarget !== null) { + return $this->requestTarget; + } + $target = $this->uri->getPath(); + if ($target == '') { + $target = '/'; + } + if ($this->uri->getQuery() != '') { + $target .= '?' . $this->uri->getQuery(); + } + return $target; + } + public function withRequestTarget($requestTarget) + { + if (\preg_match('#\\s#', $requestTarget)) { + throw new \InvalidArgumentException('Invalid request target provided; cannot contain whitespace'); + } + $new = clone $this; + $new->requestTarget = $requestTarget; + return $new; + } + public function getMethod() + { + return $this->method; + } + public function withMethod($method) + { + $new = clone $this; + $new->method = \strtoupper($method); + return $new; + } + public function getUri() + { + return $this->uri; + } + public function withUri(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri, $preserveHost = \false) + { + if ($uri === $this->uri) { + return $this; + } + $new = clone $this; + $new->uri = $uri; + if (!$preserveHost) { + $new->updateHostFromUri(); + } + return $new; + } + private function updateHostFromUri() + { + $host = $this->uri->getHost(); + if ($host == '') { + return; + } + if (($port = $this->uri->getPort()) !== null) { + $host .= ':' . $port; + } + if (isset($this->headerNames['host'])) { + $header = $this->headerNames['host']; + } else { + $header = 'Host'; + $this->headerNames['host'] = 'Host'; + } + // Ensure Host is the first header. + // See: http://tools.ietf.org/html/rfc7230#section-5.4 + $this->headers = [$header => [$host]] + $this->headers; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Response.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Response.php new file mode 100644 index 00000000..14c28d5f --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Response.php @@ -0,0 +1,58 @@ + 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-status', 208 => 'Already Reported', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => 'Switch Proxy', 307 => 'Temporary Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 425 => 'Unordered Collection', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 511 => 'Network Authentication Required']; + /** @var string */ + private $reasonPhrase = ''; + /** @var int */ + private $statusCode = 200; + /** + * @param int $status Status code + * @param array $headers Response headers + * @param string|null|resource|StreamInterface $body Response body + * @param string $version Protocol version + * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) + */ + public function __construct($status = 200, array $headers = [], $body = null, $version = '1.1', $reason = null) + { + $this->statusCode = (int) $status; + if ($body !== '' && $body !== null) { + $this->stream = stream_for($body); + } + $this->setHeaders($headers); + if ($reason == '' && isset(self::$phrases[$this->statusCode])) { + $this->reasonPhrase = self::$phrases[$this->statusCode]; + } else { + $this->reasonPhrase = (string) $reason; + } + $this->protocol = $version; + } + public function getStatusCode() + { + return $this->statusCode; + } + public function getReasonPhrase() + { + return $this->reasonPhrase; + } + public function withStatus($code, $reasonPhrase = '') + { + $new = clone $this; + $new->statusCode = (int) $code; + if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { + $reasonPhrase = self::$phrases[$new->statusCode]; + } + $new->reasonPhrase = $reasonPhrase; + return $new; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/ServerRequest.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/ServerRequest.php new file mode 100644 index 00000000..d53a104e --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -0,0 +1,289 @@ +serverParams = $serverParams; + parent::__construct($method, $uri, $headers, $body, $version); + } + /** + * Return an UploadedFile instance array. + * + * @param array $files A array which respect $_FILES structure + * @throws InvalidArgumentException for unrecognized values + * @return array + */ + public static function normalizeFiles(array $files) + { + $normalized = []; + foreach ($files as $key => $value) { + if ($value instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UploadedFileInterface) { + $normalized[$key] = $value; + } elseif (\is_array($value) && isset($value['tmp_name'])) { + $normalized[$key] = self::createUploadedFileFromSpec($value); + } elseif (\is_array($value)) { + $normalized[$key] = self::normalizeFiles($value); + continue; + } else { + throw new \InvalidArgumentException('Invalid value in files specification'); + } + } + return $normalized; + } + /** + * Create and return an UploadedFile instance from a $_FILES specification. + * + * If the specification represents an array of values, this method will + * delegate to normalizeNestedFileSpec() and return that return value. + * + * @param array $value $_FILES struct + * @return array|UploadedFileInterface + */ + private static function createUploadedFileFromSpec(array $value) + { + if (\is_array($value['tmp_name'])) { + return self::normalizeNestedFileSpec($value); + } + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\UploadedFile($value['tmp_name'], (int) $value['size'], (int) $value['error'], $value['name'], $value['type']); + } + /** + * Normalize an array of file specifications. + * + * Loops through all nested files and returns a normalized array of + * UploadedFileInterface instances. + * + * @param array $files + * @return UploadedFileInterface[] + */ + private static function normalizeNestedFileSpec(array $files = []) + { + $normalizedFiles = []; + foreach (\array_keys($files['tmp_name']) as $key) { + $spec = ['tmp_name' => $files['tmp_name'][$key], 'size' => $files['size'][$key], 'error' => $files['error'][$key], 'name' => $files['name'][$key], 'type' => $files['type'][$key]]; + $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); + } + return $normalizedFiles; + } + /** + * Return a ServerRequest populated with superglobals: + * $_GET + * $_POST + * $_COOKIE + * $_FILES + * $_SERVER + * + * @return ServerRequestInterface + */ + public static function fromGlobals() + { + $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; + $headers = \function_exists('_PhpScoper5bbb1f4b001f3\\getallheaders') ? getallheaders() : []; + $uri = self::getUriFromGlobals(); + $body = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\LazyOpenStream('php://input', 'r+'); + $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? \str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; + $serverRequest = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); + return $serverRequest->withCookieParams($_COOKIE)->withQueryParams($_GET)->withParsedBody($_POST)->withUploadedFiles(self::normalizeFiles($_FILES)); + } + /** + * Get a Uri populated with values from $_SERVER. + * + * @return UriInterface + */ + public static function getUriFromGlobals() + { + $uri = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Uri(''); + $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); + $hasPort = \false; + if (isset($_SERVER['HTTP_HOST'])) { + $hostHeaderParts = \explode(':', $_SERVER['HTTP_HOST']); + $uri = $uri->withHost($hostHeaderParts[0]); + if (isset($hostHeaderParts[1])) { + $hasPort = \true; + $uri = $uri->withPort($hostHeaderParts[1]); + } + } elseif (isset($_SERVER['SERVER_NAME'])) { + $uri = $uri->withHost($_SERVER['SERVER_NAME']); + } elseif (isset($_SERVER['SERVER_ADDR'])) { + $uri = $uri->withHost($_SERVER['SERVER_ADDR']); + } + if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { + $uri = $uri->withPort($_SERVER['SERVER_PORT']); + } + $hasQuery = \false; + if (isset($_SERVER['REQUEST_URI'])) { + $requestUriParts = \explode('?', $_SERVER['REQUEST_URI']); + $uri = $uri->withPath($requestUriParts[0]); + if (isset($requestUriParts[1])) { + $hasQuery = \true; + $uri = $uri->withQuery($requestUriParts[1]); + } + } + if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { + $uri = $uri->withQuery($_SERVER['QUERY_STRING']); + } + return $uri; + } + /** + * {@inheritdoc} + */ + public function getServerParams() + { + return $this->serverParams; + } + /** + * {@inheritdoc} + */ + public function getUploadedFiles() + { + return $this->uploadedFiles; + } + /** + * {@inheritdoc} + */ + public function withUploadedFiles(array $uploadedFiles) + { + $new = clone $this; + $new->uploadedFiles = $uploadedFiles; + return $new; + } + /** + * {@inheritdoc} + */ + public function getCookieParams() + { + return $this->cookieParams; + } + /** + * {@inheritdoc} + */ + public function withCookieParams(array $cookies) + { + $new = clone $this; + $new->cookieParams = $cookies; + return $new; + } + /** + * {@inheritdoc} + */ + public function getQueryParams() + { + return $this->queryParams; + } + /** + * {@inheritdoc} + */ + public function withQueryParams(array $query) + { + $new = clone $this; + $new->queryParams = $query; + return $new; + } + /** + * {@inheritdoc} + */ + public function getParsedBody() + { + return $this->parsedBody; + } + /** + * {@inheritdoc} + */ + public function withParsedBody($data) + { + $new = clone $this; + $new->parsedBody = $data; + return $new; + } + /** + * {@inheritdoc} + */ + public function getAttributes() + { + return $this->attributes; + } + /** + * {@inheritdoc} + */ + public function getAttribute($attribute, $default = null) + { + if (\false === \array_key_exists($attribute, $this->attributes)) { + return $default; + } + return $this->attributes[$attribute]; + } + /** + * {@inheritdoc} + */ + public function withAttribute($attribute, $value) + { + $new = clone $this; + $new->attributes[$attribute] = $value; + return $new; + } + /** + * {@inheritdoc} + */ + public function withoutAttribute($attribute) + { + if (\false === \array_key_exists($attribute, $this->attributes)) { + return $this; + } + $new = clone $this; + unset($new->attributes[$attribute]); + return $new; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Stream.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Stream.php new file mode 100644 index 00000000..bee2a3e8 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Stream.php @@ -0,0 +1,200 @@ + ['r' => \true, 'w+' => \true, 'r+' => \true, 'x+' => \true, 'c+' => \true, 'rb' => \true, 'w+b' => \true, 'r+b' => \true, 'x+b' => \true, 'c+b' => \true, 'rt' => \true, 'w+t' => \true, 'r+t' => \true, 'x+t' => \true, 'c+t' => \true, 'a+' => \true], 'write' => ['w' => \true, 'w+' => \true, 'rw' => \true, 'r+' => \true, 'x+' => \true, 'c+' => \true, 'wb' => \true, 'w+b' => \true, 'r+b' => \true, 'x+b' => \true, 'c+b' => \true, 'w+t' => \true, 'r+t' => \true, 'x+t' => \true, 'c+t' => \true, 'a' => \true, 'a+' => \true]]; + /** + * This constructor accepts an associative array of options. + * + * - size: (int) If a read stream would otherwise have an indeterminate + * size, but the size is known due to foreknowledge, then you can + * provide that size, in bytes. + * - metadata: (array) Any additional metadata to return when the metadata + * of the stream is accessed. + * + * @param resource $stream Stream resource to wrap. + * @param array $options Associative array of options. + * + * @throws \InvalidArgumentException if the stream is not a stream resource + */ + public function __construct($stream, $options = []) + { + if (!\is_resource($stream)) { + throw new \InvalidArgumentException('Stream must be a resource'); + } + if (isset($options['size'])) { + $this->size = $options['size']; + } + $this->customMetadata = isset($options['metadata']) ? $options['metadata'] : []; + $this->stream = $stream; + $meta = \stream_get_meta_data($this->stream); + $this->seekable = $meta['seekable']; + $this->readable = isset(self::$readWriteHash['read'][$meta['mode']]); + $this->writable = isset(self::$readWriteHash['write'][$meta['mode']]); + $this->uri = $this->getMetadata('uri'); + } + public function __get($name) + { + if ($name == 'stream') { + throw new \RuntimeException('The stream is detached'); + } + throw new \BadMethodCallException('No value for ' . $name); + } + /** + * Closes the stream when the destructed + */ + public function __destruct() + { + $this->close(); + } + public function __toString() + { + try { + $this->seek(0); + return (string) \stream_get_contents($this->stream); + } catch (\Exception $e) { + return ''; + } + } + public function getContents() + { + $contents = \stream_get_contents($this->stream); + if ($contents === \false) { + throw new \RuntimeException('Unable to read stream contents'); + } + return $contents; + } + public function close() + { + if (isset($this->stream)) { + if (\is_resource($this->stream)) { + \fclose($this->stream); + } + $this->detach(); + } + } + public function detach() + { + if (!isset($this->stream)) { + return null; + } + $result = $this->stream; + unset($this->stream); + $this->size = $this->uri = null; + $this->readable = $this->writable = $this->seekable = \false; + return $result; + } + public function getSize() + { + if ($this->size !== null) { + return $this->size; + } + if (!isset($this->stream)) { + return null; + } + // Clear the stat cache if the stream has a URI + if ($this->uri) { + \clearstatcache(\true, $this->uri); + } + $stats = \fstat($this->stream); + if (isset($stats['size'])) { + $this->size = $stats['size']; + return $this->size; + } + return null; + } + public function isReadable() + { + return $this->readable; + } + public function isWritable() + { + return $this->writable; + } + public function isSeekable() + { + return $this->seekable; + } + public function eof() + { + return !$this->stream || \feof($this->stream); + } + public function tell() + { + $result = \ftell($this->stream); + if ($result === \false) { + throw new \RuntimeException('Unable to determine stream position'); + } + return $result; + } + public function rewind() + { + $this->seek(0); + } + public function seek($offset, $whence = \SEEK_SET) + { + if (!$this->seekable) { + throw new \RuntimeException('Stream is not seekable'); + } elseif (\fseek($this->stream, $offset, $whence) === -1) { + throw new \RuntimeException('Unable to seek to stream position ' . $offset . ' with whence ' . \var_export($whence, \true)); + } + } + public function read($length) + { + if (!$this->readable) { + throw new \RuntimeException('Cannot read from non-readable stream'); + } + if ($length < 0) { + throw new \RuntimeException('Length parameter cannot be negative'); + } + if (0 === $length) { + return ''; + } + $string = \fread($this->stream, $length); + if (\false === $string) { + throw new \RuntimeException('Unable to read from stream'); + } + return $string; + } + public function write($string) + { + if (!$this->writable) { + throw new \RuntimeException('Cannot write to a non-writable stream'); + } + // We can't know the size after writing anything + $this->size = null; + $result = \fwrite($this->stream, $string); + if ($result === \false) { + throw new \RuntimeException('Unable to write to stream'); + } + return $result; + } + public function getMetadata($key = null) + { + if (!isset($this->stream)) { + return $key ? null : []; + } elseif (!$key) { + return $this->customMetadata + \stream_get_meta_data($this->stream); + } elseif (isset($this->customMetadata[$key])) { + return $this->customMetadata[$key]; + } + $meta = \stream_get_meta_data($this->stream); + return isset($meta[$key]) ? $meta[$key] : null; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php new file mode 100644 index 00000000..15381b4d --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -0,0 +1,128 @@ +stream = $stream; + } + /** + * Magic method used to create a new stream if streams are not added in + * the constructor of a decorator (e.g., LazyOpenStream). + * + * @param string $name Name of the property (allows "stream" only). + * + * @return StreamInterface + */ + public function __get($name) + { + if ($name == 'stream') { + $this->stream = $this->createStream(); + return $this->stream; + } + throw new \UnexpectedValueException("{$name} not found on class"); + } + public function __toString() + { + try { + if ($this->isSeekable()) { + $this->seek(0); + } + return $this->getContents(); + } catch (\Exception $e) { + // Really, PHP? https://bugs.php.net/bug.php?id=53648 + \trigger_error('StreamDecorator::__toString exception: ' . (string) $e, \E_USER_ERROR); + return ''; + } + } + public function getContents() + { + return copy_to_string($this); + } + /** + * Allow decorators to implement custom methods + * + * @param string $method Missing method name + * @param array $args Method arguments + * + * @return mixed + */ + public function __call($method, array $args) + { + $result = \call_user_func_array([$this->stream, $method], $args); + // Always return the wrapped object if the result is a return $this + return $result === $this->stream ? $this : $result; + } + public function close() + { + $this->stream->close(); + } + public function getMetadata($key = null) + { + return $this->stream->getMetadata($key); + } + public function detach() + { + return $this->stream->detach(); + } + public function getSize() + { + return $this->stream->getSize(); + } + public function eof() + { + return $this->stream->eof(); + } + public function tell() + { + return $this->stream->tell(); + } + public function isReadable() + { + return $this->stream->isReadable(); + } + public function isWritable() + { + return $this->stream->isWritable(); + } + public function isSeekable() + { + return $this->stream->isSeekable(); + } + public function rewind() + { + $this->seek(0); + } + public function seek($offset, $whence = \SEEK_SET) + { + $this->stream->seek($offset, $whence); + } + public function read($length) + { + return $this->stream->read($length); + } + public function write($string) + { + return $this->stream->write($string); + } + /** + * Implement in subclasses to dynamically create streams when requested. + * + * @return StreamInterface + * @throws \BadMethodCallException + */ + protected function createStream() + { + throw new \BadMethodCallException('Not implemented'); + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/StreamWrapper.php new file mode 100644 index 00000000..f542025d --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -0,0 +1,82 @@ +isReadable()) { + $mode = $stream->isWritable() ? 'r+' : 'r'; + } elseif ($stream->isWritable()) { + $mode = 'w'; + } else { + throw new \InvalidArgumentException('The stream must be readable, ' . 'writable, or both.'); + } + return \fopen('guzzle://stream', $mode, null, \stream_context_create(['guzzle' => ['stream' => $stream]])); + } + /** + * Registers the stream wrapper if needed + */ + public static function register() + { + if (!\in_array('guzzle', \stream_get_wrappers())) { + \stream_wrapper_register('guzzle', __CLASS__); + } + } + public function stream_open($path, $mode, $options, &$opened_path) + { + $options = \stream_context_get_options($this->context); + if (!isset($options['guzzle']['stream'])) { + return \false; + } + $this->mode = $mode; + $this->stream = $options['guzzle']['stream']; + return \true; + } + public function stream_read($count) + { + return $this->stream->read($count); + } + public function stream_write($data) + { + return (int) $this->stream->write($data); + } + public function stream_tell() + { + return $this->stream->tell(); + } + public function stream_eof() + { + return $this->stream->eof(); + } + public function stream_seek($offset, $whence) + { + $this->stream->seek($offset, $whence); + return \true; + } + public function stream_stat() + { + static $modeMap = ['r' => 33060, 'r+' => 33206, 'w' => 33188]; + return ['dev' => 0, 'ino' => 0, 'mode' => $modeMap[$this->mode], 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => $this->stream->getSize() ?: 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0]; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/UploadedFile.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/UploadedFile.php new file mode 100644 index 00000000..d1b57da2 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/UploadedFile.php @@ -0,0 +1,244 @@ +setError($errorStatus); + $this->setSize($size); + $this->setClientFilename($clientFilename); + $this->setClientMediaType($clientMediaType); + if ($this->isOk()) { + $this->setStreamOrFile($streamOrFile); + } + } + /** + * Depending on the value set file or stream variable + * + * @param mixed $streamOrFile + * @throws InvalidArgumentException + */ + private function setStreamOrFile($streamOrFile) + { + if (\is_string($streamOrFile)) { + $this->file = $streamOrFile; + } elseif (\is_resource($streamOrFile)) { + $this->stream = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Stream($streamOrFile); + } elseif ($streamOrFile instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface) { + $this->stream = $streamOrFile; + } else { + throw new \InvalidArgumentException('Invalid stream or file provided for UploadedFile'); + } + } + /** + * @param int $error + * @throws InvalidArgumentException + */ + private function setError($error) + { + if (\false === \is_int($error)) { + throw new \InvalidArgumentException('Upload file error status must be an integer'); + } + if (\false === \in_array($error, \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\UploadedFile::$errors)) { + throw new \InvalidArgumentException('Invalid error status for UploadedFile'); + } + $this->error = $error; + } + /** + * @param int $size + * @throws InvalidArgumentException + */ + private function setSize($size) + { + if (\false === \is_int($size)) { + throw new \InvalidArgumentException('Upload file size must be an integer'); + } + $this->size = $size; + } + /** + * @param mixed $param + * @return boolean + */ + private function isStringOrNull($param) + { + return \in_array(\gettype($param), ['string', 'NULL']); + } + /** + * @param mixed $param + * @return boolean + */ + private function isStringNotEmpty($param) + { + return \is_string($param) && \false === empty($param); + } + /** + * @param string|null $clientFilename + * @throws InvalidArgumentException + */ + private function setClientFilename($clientFilename) + { + if (\false === $this->isStringOrNull($clientFilename)) { + throw new \InvalidArgumentException('Upload file client filename must be a string or null'); + } + $this->clientFilename = $clientFilename; + } + /** + * @param string|null $clientMediaType + * @throws InvalidArgumentException + */ + private function setClientMediaType($clientMediaType) + { + if (\false === $this->isStringOrNull($clientMediaType)) { + throw new \InvalidArgumentException('Upload file client media type must be a string or null'); + } + $this->clientMediaType = $clientMediaType; + } + /** + * Return true if there is no upload error + * + * @return boolean + */ + private function isOk() + { + return $this->error === \UPLOAD_ERR_OK; + } + /** + * @return boolean + */ + public function isMoved() + { + return $this->moved; + } + /** + * @throws RuntimeException if is moved or not ok + */ + private function validateActive() + { + if (\false === $this->isOk()) { + throw new \RuntimeException('Cannot retrieve stream due to upload error'); + } + if ($this->isMoved()) { + throw new \RuntimeException('Cannot retrieve stream after it has already been moved'); + } + } + /** + * {@inheritdoc} + * @throws RuntimeException if the upload was not successful. + */ + public function getStream() + { + $this->validateActive(); + if ($this->stream instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface) { + return $this->stream; + } + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\LazyOpenStream($this->file, 'r+'); + } + /** + * {@inheritdoc} + * + * @see http://php.net/is_uploaded_file + * @see http://php.net/move_uploaded_file + * @param string $targetPath Path to which to move the uploaded file. + * @throws RuntimeException if the upload was not successful. + * @throws InvalidArgumentException if the $path specified is invalid. + * @throws RuntimeException on any error during the move operation, or on + * the second or subsequent call to the method. + */ + public function moveTo($targetPath) + { + $this->validateActive(); + if (\false === $this->isStringNotEmpty($targetPath)) { + throw new \InvalidArgumentException('Invalid path provided for move operation; must be a non-empty string'); + } + if ($this->file) { + $this->moved = \php_sapi_name() == 'cli' ? \rename($this->file, $targetPath) : \move_uploaded_file($this->file, $targetPath); + } else { + copy_to_stream($this->getStream(), new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\LazyOpenStream($targetPath, 'w')); + $this->moved = \true; + } + if (\false === $this->moved) { + throw new \RuntimeException(\sprintf('Uploaded file could not be moved to %s', $targetPath)); + } + } + /** + * {@inheritdoc} + * + * @return int|null The file size in bytes or null if unknown. + */ + public function getSize() + { + return $this->size; + } + /** + * {@inheritdoc} + * + * @see http://php.net/manual/en/features.file-upload.errors.php + * @return int One of PHP's UPLOAD_ERR_XXX constants. + */ + public function getError() + { + return $this->error; + } + /** + * {@inheritdoc} + * + * @return string|null The filename sent by the client or null if none + * was provided. + */ + public function getClientFilename() + { + return $this->clientFilename; + } + /** + * {@inheritdoc} + */ + public function getClientMediaType() + { + return $this->clientMediaType; + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Uri.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Uri.php new file mode 100644 index 00000000..dc0cf52d --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/Uri.php @@ -0,0 +1,555 @@ + 80, 'https' => 443, 'ftp' => 21, 'gopher' => 70, 'nntp' => 119, 'news' => 119, 'telnet' => 23, 'tn3270' => 23, 'imap' => 143, 'pop' => 110, 'ldap' => 389]; + private static $charUnreserved = 'a-zA-Z0-9_\\-\\.~'; + private static $charSubDelims = '!\\$&\'\\(\\)\\*\\+,;='; + private static $replaceQuery = ['=' => '%3D', '&' => '%26']; + /** @var string Uri scheme. */ + private $scheme = ''; + /** @var string Uri user info. */ + private $userInfo = ''; + /** @var string Uri host. */ + private $host = ''; + /** @var int|null Uri port. */ + private $port; + /** @var string Uri path. */ + private $path = ''; + /** @var string Uri query string. */ + private $query = ''; + /** @var string Uri fragment. */ + private $fragment = ''; + /** + * @param string $uri URI to parse + */ + public function __construct($uri = '') + { + // weak type check to also accept null until we can add scalar type hints + if ($uri != '') { + $parts = \parse_url($uri); + if ($parts === \false) { + throw new \InvalidArgumentException("Unable to parse URI: {$uri}"); + } + $this->applyParts($parts); + } + } + public function __toString() + { + return self::composeComponents($this->scheme, $this->getAuthority(), $this->path, $this->query, $this->fragment); + } + /** + * Composes a URI reference string from its various components. + * + * Usually this method does not need to be called manually but instead is used indirectly via + * `Psr\Http\Message\UriInterface::__toString`. + * + * PSR-7 UriInterface treats an empty component the same as a missing component as + * getQuery(), getFragment() etc. always return a string. This explains the slight + * difference to RFC 3986 Section 5.3. + * + * Another adjustment is that the authority separator is added even when the authority is missing/empty + * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with + * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But + * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to + * that format). + * + * @param string $scheme + * @param string $authority + * @param string $path + * @param string $query + * @param string $fragment + * + * @return string + * + * @link https://tools.ietf.org/html/rfc3986#section-5.3 + */ + public static function composeComponents($scheme, $authority, $path, $query, $fragment) + { + $uri = ''; + // weak type checks to also accept null until we can add scalar type hints + if ($scheme != '') { + $uri .= $scheme . ':'; + } + if ($authority != '' || $scheme === 'file') { + $uri .= '//' . $authority; + } + $uri .= $path; + if ($query != '') { + $uri .= '?' . $query; + } + if ($fragment != '') { + $uri .= '#' . $fragment; + } + return $uri; + } + /** + * Whether the URI has the default port of the current scheme. + * + * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used + * independently of the implementation. + * + * @param UriInterface $uri + * + * @return bool + */ + public static function isDefaultPort(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri) + { + return $uri->getPort() === null || isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]; + } + /** + * Whether the URI is absolute, i.e. it has a scheme. + * + * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true + * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative + * to another URI, the base URI. Relative references can be divided into several forms: + * - network-path references, e.g. '//example.com/path' + * - absolute-path references, e.g. '/path' + * - relative-path references, e.g. 'subpath' + * + * @param UriInterface $uri + * + * @return bool + * @see Uri::isNetworkPathReference + * @see Uri::isAbsolutePathReference + * @see Uri::isRelativePathReference + * @link https://tools.ietf.org/html/rfc3986#section-4 + */ + public static function isAbsolute(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri) + { + return $uri->getScheme() !== ''; + } + /** + * Whether the URI is a network-path reference. + * + * A relative reference that begins with two slash characters is termed an network-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isNetworkPathReference(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri) + { + return $uri->getScheme() === '' && $uri->getAuthority() !== ''; + } + /** + * Whether the URI is a absolute-path reference. + * + * A relative reference that begins with a single slash character is termed an absolute-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isAbsolutePathReference(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri) + { + return $uri->getScheme() === '' && $uri->getAuthority() === '' && isset($uri->getPath()[0]) && $uri->getPath()[0] === '/'; + } + /** + * Whether the URI is a relative-path reference. + * + * A relative reference that does not begin with a slash character is termed a relative-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isRelativePathReference(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri) + { + return $uri->getScheme() === '' && $uri->getAuthority() === '' && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); + } + /** + * Whether the URI is a same-document reference. + * + * A same-document reference refers to a URI that is, aside from its fragment + * component, identical to the base URI. When no base URI is given, only an empty + * URI reference (apart from its fragment) is considered a same-document reference. + * + * @param UriInterface $uri The URI to check + * @param UriInterface|null $base An optional base URI to compare against + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.4 + */ + public static function isSameDocumentReference(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $base = null) + { + if ($base !== null) { + $uri = \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\UriResolver::resolve($base, $uri); + return $uri->getScheme() === $base->getScheme() && $uri->getAuthority() === $base->getAuthority() && $uri->getPath() === $base->getPath() && $uri->getQuery() === $base->getQuery(); + } + return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; + } + /** + * Removes dot segments from a path and returns the new path. + * + * @param string $path + * + * @return string + * + * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. + * @see UriResolver::removeDotSegments + */ + public static function removeDotSegments($path) + { + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\UriResolver::removeDotSegments($path); + } + /** + * Converts the relative URI into a new URI that is resolved against the base URI. + * + * @param UriInterface $base Base URI + * @param string|UriInterface $rel Relative URI + * + * @return UriInterface + * + * @deprecated since version 1.4. Use UriResolver::resolve instead. + * @see UriResolver::resolve + */ + public static function resolve(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $base, $rel) + { + if (!$rel instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface) { + $rel = new self($rel); + } + return \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\UriResolver::resolve($base, $rel); + } + /** + * Creates a new URI with a specific query string value removed. + * + * Any existing query string values that exactly match the provided key are + * removed. + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Query string key to remove. + * + * @return UriInterface + */ + public static function withoutQueryValue(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri, $key) + { + $current = $uri->getQuery(); + if ($current === '') { + return $uri; + } + $decodedKey = \rawurldecode($key); + $result = \array_filter(\explode('&', $current), function ($part) use($decodedKey) { + return \rawurldecode(\explode('=', $part)[0]) !== $decodedKey; + }); + return $uri->withQuery(\implode('&', $result)); + } + /** + * Creates a new URI with a specific query string value. + * + * Any existing query string values that exactly match the provided key are + * removed and replaced with the given key value pair. + * + * A value of null will set the query string key without a value, e.g. "key" + * instead of "key=value". + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Key to set. + * @param string|null $value Value to set + * + * @return UriInterface + */ + public static function withQueryValue(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri, $key, $value) + { + $current = $uri->getQuery(); + if ($current === '') { + $result = []; + } else { + $decodedKey = \rawurldecode($key); + $result = \array_filter(\explode('&', $current), function ($part) use($decodedKey) { + return \rawurldecode(\explode('=', $part)[0]) !== $decodedKey; + }); + } + // Query string separators ("=", "&") within the key or value need to be encoded + // (while preventing double-encoding) before setting the query string. All other + // chars that need percent-encoding will be encoded by withQuery(). + $key = \strtr($key, self::$replaceQuery); + if ($value !== null) { + $result[] = $key . '=' . \strtr($value, self::$replaceQuery); + } else { + $result[] = $key; + } + return $uri->withQuery(\implode('&', $result)); + } + /** + * Creates a URI from a hash of `parse_url` components. + * + * @param array $parts + * + * @return UriInterface + * @link http://php.net/manual/en/function.parse-url.php + * + * @throws \InvalidArgumentException If the components do not form a valid URI. + */ + public static function fromParts(array $parts) + { + $uri = new self(); + $uri->applyParts($parts); + $uri->validateState(); + return $uri; + } + public function getScheme() + { + return $this->scheme; + } + public function getAuthority() + { + $authority = $this->host; + if ($this->userInfo !== '') { + $authority = $this->userInfo . '@' . $authority; + } + if ($this->port !== null) { + $authority .= ':' . $this->port; + } + return $authority; + } + public function getUserInfo() + { + return $this->userInfo; + } + public function getHost() + { + return $this->host; + } + public function getPort() + { + return $this->port; + } + public function getPath() + { + return $this->path; + } + public function getQuery() + { + return $this->query; + } + public function getFragment() + { + return $this->fragment; + } + public function withScheme($scheme) + { + $scheme = $this->filterScheme($scheme); + if ($this->scheme === $scheme) { + return $this; + } + $new = clone $this; + $new->scheme = $scheme; + $new->removeDefaultPort(); + $new->validateState(); + return $new; + } + public function withUserInfo($user, $password = null) + { + $info = $user; + if ($password != '') { + $info .= ':' . $password; + } + if ($this->userInfo === $info) { + return $this; + } + $new = clone $this; + $new->userInfo = $info; + $new->validateState(); + return $new; + } + public function withHost($host) + { + $host = $this->filterHost($host); + if ($this->host === $host) { + return $this; + } + $new = clone $this; + $new->host = $host; + $new->validateState(); + return $new; + } + public function withPort($port) + { + $port = $this->filterPort($port); + if ($this->port === $port) { + return $this; + } + $new = clone $this; + $new->port = $port; + $new->removeDefaultPort(); + $new->validateState(); + return $new; + } + public function withPath($path) + { + $path = $this->filterPath($path); + if ($this->path === $path) { + return $this; + } + $new = clone $this; + $new->path = $path; + $new->validateState(); + return $new; + } + public function withQuery($query) + { + $query = $this->filterQueryAndFragment($query); + if ($this->query === $query) { + return $this; + } + $new = clone $this; + $new->query = $query; + return $new; + } + public function withFragment($fragment) + { + $fragment = $this->filterQueryAndFragment($fragment); + if ($this->fragment === $fragment) { + return $this; + } + $new = clone $this; + $new->fragment = $fragment; + return $new; + } + /** + * Apply parse_url parts to a URI. + * + * @param array $parts Array of parse_url parts to apply. + */ + private function applyParts(array $parts) + { + $this->scheme = isset($parts['scheme']) ? $this->filterScheme($parts['scheme']) : ''; + $this->userInfo = isset($parts['user']) ? $parts['user'] : ''; + $this->host = isset($parts['host']) ? $this->filterHost($parts['host']) : ''; + $this->port = isset($parts['port']) ? $this->filterPort($parts['port']) : null; + $this->path = isset($parts['path']) ? $this->filterPath($parts['path']) : ''; + $this->query = isset($parts['query']) ? $this->filterQueryAndFragment($parts['query']) : ''; + $this->fragment = isset($parts['fragment']) ? $this->filterQueryAndFragment($parts['fragment']) : ''; + if (isset($parts['pass'])) { + $this->userInfo .= ':' . $parts['pass']; + } + $this->removeDefaultPort(); + } + /** + * @param string $scheme + * + * @return string + * + * @throws \InvalidArgumentException If the scheme is invalid. + */ + private function filterScheme($scheme) + { + if (!\is_string($scheme)) { + throw new \InvalidArgumentException('Scheme must be a string'); + } + return \strtolower($scheme); + } + /** + * @param string $host + * + * @return string + * + * @throws \InvalidArgumentException If the host is invalid. + */ + private function filterHost($host) + { + if (!\is_string($host)) { + throw new \InvalidArgumentException('Host must be a string'); + } + return \strtolower($host); + } + /** + * @param int|null $port + * + * @return int|null + * + * @throws \InvalidArgumentException If the port is invalid. + */ + private function filterPort($port) + { + if ($port === null) { + return null; + } + $port = (int) $port; + if (1 > $port || 0xffff < $port) { + throw new \InvalidArgumentException(\sprintf('Invalid port: %d. Must be between 1 and 65535', $port)); + } + return $port; + } + private function removeDefaultPort() + { + if ($this->port !== null && self::isDefaultPort($this)) { + $this->port = null; + } + } + /** + * Filters the path of a URI + * + * @param string $path + * + * @return string + * + * @throws \InvalidArgumentException If the path is invalid. + */ + private function filterPath($path) + { + if (!\is_string($path)) { + throw new \InvalidArgumentException('Path must be a string'); + } + return \preg_replace_callback('/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\\/]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $path); + } + /** + * Filters the query string or fragment of a URI. + * + * @param string $str + * + * @return string + * + * @throws \InvalidArgumentException If the query or fragment is invalid. + */ + private function filterQueryAndFragment($str) + { + if (!\is_string($str)) { + throw new \InvalidArgumentException('Query and fragment must be a string'); + } + return \preg_replace_callback('/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\\/\\?]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $str); + } + private function rawurlencodeMatchZero(array $match) + { + return \rawurlencode($match[0]); + } + private function validateState() + { + if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { + $this->host = self::HTTP_DEFAULT_HOST; + } + if ($this->getAuthority() === '') { + if (0 === \strpos($this->path, '//')) { + throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); + } + if ($this->scheme === '' && \false !== \strpos(\explode('/', $this->path, 2)[0], ':')) { + throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); + } + } elseif (isset($this->path[0]) && $this->path[0] !== '/') { + @\trigger_error('The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', \E_USER_DEPRECATED); + $this->path = '/' . $this->path; + //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); + } + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/UriNormalizer.php new file mode 100644 index 00000000..bee41ff6 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -0,0 +1,179 @@ +getPath() === '' && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https')) { + $uri = $uri->withPath('/'); + } + if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { + $uri = $uri->withHost(''); + } + if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Uri::isDefaultPort($uri)) { + $uri = $uri->withPort(null); + } + if ($flags & self::REMOVE_DOT_SEGMENTS && !\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Uri::isRelativePathReference($uri)) { + $uri = $uri->withPath(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\UriResolver::removeDotSegments($uri->getPath())); + } + if ($flags & self::REMOVE_DUPLICATE_SLASHES) { + $uri = $uri->withPath(\preg_replace('#//++#', '/', $uri->getPath())); + } + if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { + $queryKeyValues = \explode('&', $uri->getQuery()); + \sort($queryKeyValues); + $uri = $uri->withQuery(\implode('&', $queryKeyValues)); + } + return $uri; + } + /** + * Whether two URIs can be considered equivalent. + * + * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also + * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be + * resolved against the same base URI. If this is not the case, determination of equivalence or difference of + * relative references does not mean anything. + * + * @param UriInterface $uri1 An URI to compare + * @param UriInterface $uri2 An URI to compare + * @param int $normalizations A bitmask of normalizations to apply, see constants + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-6.1 + */ + public static function isEquivalent(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri1, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) + { + return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); + } + private static function capitalizePercentEncoding(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri) + { + $regex = '/(?:%[A-Fa-f0-9]{2})++/'; + $callback = function (array $match) { + return \strtoupper($match[0]); + }; + return $uri->withPath(\preg_replace_callback($regex, $callback, $uri->getPath()))->withQuery(\preg_replace_callback($regex, $callback, $uri->getQuery())); + } + private static function decodeUnreservedCharacters(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $uri) + { + $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; + $callback = function (array $match) { + return \rawurldecode($match[0]); + }; + return $uri->withPath(\preg_replace_callback($regex, $callback, $uri->getPath()))->withQuery(\preg_replace_callback($regex, $callback, $uri->getQuery())); + } + private function __construct() + { + // cannot be instantiated + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/UriResolver.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/UriResolver.php new file mode 100644 index 00000000..d53941935 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -0,0 +1,190 @@ +getScheme() != '') { + return $rel->withPath(self::removeDotSegments($rel->getPath())); + } + if ($rel->getAuthority() != '') { + $targetAuthority = $rel->getAuthority(); + $targetPath = self::removeDotSegments($rel->getPath()); + $targetQuery = $rel->getQuery(); + } else { + $targetAuthority = $base->getAuthority(); + if ($rel->getPath() === '') { + $targetPath = $base->getPath(); + $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); + } else { + if ($rel->getPath()[0] === '/') { + $targetPath = $rel->getPath(); + } else { + if ($targetAuthority != '' && $base->getPath() === '') { + $targetPath = '/' . $rel->getPath(); + } else { + $lastSlashPos = \strrpos($base->getPath(), '/'); + if ($lastSlashPos === \false) { + $targetPath = $rel->getPath(); + } else { + $targetPath = \substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); + } + } + } + $targetPath = self::removeDotSegments($targetPath); + $targetQuery = $rel->getQuery(); + } + } + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Uri(\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Uri::composeComponents($base->getScheme(), $targetAuthority, $targetPath, $targetQuery, $rel->getFragment())); + } + /** + * Returns the target URI as a relative reference from the base URI. + * + * This method is the counterpart to resolve(): + * + * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) + * + * One use-case is to use the current request URI as base URI and then generate relative links in your documents + * to reduce the document size or offer self-contained downloadable document archives. + * + * $base = new Uri('http://example.com/a/b/'); + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. + * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. + * + * This method also accepts a target that is already relative and will try to relativize it further. Only a + * relative-path reference will be returned as-is. + * + * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well + * + * @param UriInterface $base Base URI + * @param UriInterface $target Target URI + * + * @return UriInterface The relative URI reference + */ + public static function relativize(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $base, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $target) + { + if ($target->getScheme() !== '' && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')) { + return $target; + } + if (\_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Uri::isRelativePathReference($target)) { + // As the target is already highly relative we return it as-is. It would be possible to resolve + // the target with `$target = self::resolve($base, $target);` and then try make it more relative + // by removing a duplicate query. But let's not do that automatically. + return $target; + } + if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { + return $target->withScheme(''); + } + // We must remove the path before removing the authority because if the path starts with two slashes, the URI + // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also + // invalid. + $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); + if ($base->getPath() !== $target->getPath()) { + return $emptyPathUri->withPath(self::getRelativePath($base, $target)); + } + if ($base->getQuery() === $target->getQuery()) { + // Only the target fragment is left. And it must be returned even if base and target fragment are the same. + return $emptyPathUri->withQuery(''); + } + // If the base URI has a query but the target has none, we cannot return an empty path reference as it would + // inherit the base query component when resolving. + if ($target->getQuery() === '') { + $segments = \explode('/', $target->getPath()); + $lastSegment = \end($segments); + return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); + } + return $emptyPathUri; + } + private static function getRelativePath(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $base, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface $target) + { + $sourceSegments = \explode('/', $base->getPath()); + $targetSegments = \explode('/', $target->getPath()); + \array_pop($sourceSegments); + $targetLastSegment = \array_pop($targetSegments); + foreach ($sourceSegments as $i => $segment) { + if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { + unset($sourceSegments[$i], $targetSegments[$i]); + } else { + break; + } + } + $targetSegments[] = $targetLastSegment; + $relativePath = \str_repeat('../', \count($sourceSegments)) . \implode('/', $targetSegments); + // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". + // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used + // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. + if ('' === $relativePath || \false !== \strpos(\explode('/', $relativePath, 2)[0], ':')) { + $relativePath = "./{$relativePath}"; + } elseif ('/' === $relativePath[0]) { + if ($base->getAuthority() != '' && $base->getPath() === '') { + // In this case an extra slash is added by resolve() automatically. So we must not add one here. + $relativePath = ".{$relativePath}"; + } else { + $relativePath = "./{$relativePath}"; + } + } + return $relativePath; + } + private function __construct() + { + // cannot be instantiated + } +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/functions.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/functions.php new file mode 100644 index 00000000..0dc2ca9a --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/functions.php @@ -0,0 +1,614 @@ +getMethod() . ' ' . $message->getRequestTarget()) . ' HTTP/' . $message->getProtocolVersion(); + if (!$message->hasHeader('host')) { + $msg .= "\r\nHost: " . $message->getUri()->getHost(); + } + } elseif ($message instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ResponseInterface) { + $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' . $message->getStatusCode() . ' ' . $message->getReasonPhrase(); + } else { + throw new \InvalidArgumentException('Unknown message type'); + } + foreach ($message->getHeaders() as $name => $values) { + $msg .= "\r\n{$name}: " . \implode(', ', $values); + } + return "{$msg}\r\n\r\n" . $message->getBody(); +} +/** + * Returns a UriInterface for the given value. + * + * This function accepts a string or {@see Psr\Http\Message\UriInterface} and + * returns a UriInterface for the given value. If the value is already a + * `UriInterface`, it is returned as-is. + * + * @param string|UriInterface $uri + * + * @return UriInterface + * @throws \InvalidArgumentException + */ +function uri_for($uri) +{ + if ($uri instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\UriInterface) { + return $uri; + } elseif (\is_string($uri)) { + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Uri($uri); + } + throw new \InvalidArgumentException('URI must be a string or UriInterface'); +} +/** + * Create a new stream based on the input type. + * + * Options is an associative array that can contain the following keys: + * - metadata: Array of custom metadata. + * - size: Size of the stream. + * + * @param resource|string|null|int|float|bool|StreamInterface|callable $resource Entity body data + * @param array $options Additional options + * + * @return Stream + * @throws \InvalidArgumentException if the $resource arg is not valid. + */ +function stream_for($resource = '', array $options = []) +{ + if (\is_scalar($resource)) { + $stream = \fopen('php://temp', 'r+'); + if ($resource !== '') { + \fwrite($stream, $resource); + \fseek($stream, 0); + } + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Stream($stream, $options); + } + switch (\gettype($resource)) { + case 'resource': + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Stream($resource, $options); + case 'object': + if ($resource instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface) { + return $resource; + } elseif ($resource instanceof \Iterator) { + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\PumpStream(function () use($resource) { + if (!$resource->valid()) { + return \false; + } + $result = $resource->current(); + $resource->next(); + return $result; + }, $options); + } elseif (\method_exists($resource, '__toString')) { + return stream_for((string) $resource, $options); + } + break; + case 'NULL': + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Stream(\fopen('php://temp', 'r+'), $options); + } + if (\is_callable($resource)) { + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\PumpStream($resource, $options); + } + throw new \InvalidArgumentException('Invalid resource type: ' . \gettype($resource)); +} +/** + * Parse an array of header values containing ";" separated data into an + * array of associative arrays representing the header key value pair + * data of the header. When a parameter does not contain a value, but just + * contains a key, this function will inject a key with a '' string value. + * + * @param string|array $header Header to parse into components. + * + * @return array Returns the parsed header values. + */ +function parse_header($header) +{ + static $trimmed = "\"' \n\t\r"; + $params = $matches = []; + foreach (normalize_header($header) as $val) { + $part = []; + foreach (\preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { + if (\preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { + $m = $matches[0]; + if (isset($m[1])) { + $part[\trim($m[0], $trimmed)] = \trim($m[1], $trimmed); + } else { + $part[] = \trim($m[0], $trimmed); + } + } + } + if ($part) { + $params[] = $part; + } + } + return $params; +} +/** + * Converts an array of header values that may contain comma separated + * headers into an array of headers with no comma separated values. + * + * @param string|array $header Header to normalize. + * + * @return array Returns the normalized header field values. + */ +function normalize_header($header) +{ + if (!\is_array($header)) { + return \array_map('trim', \explode(',', $header)); + } + $result = []; + foreach ($header as $value) { + foreach ((array) $value as $v) { + if (\strpos($v, ',') === \false) { + $result[] = $v; + continue; + } + foreach (\preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { + $result[] = \trim($vv); + } + } + } + return $result; +} +/** + * Clone and modify a request with the given changes. + * + * The changes can be one of: + * - method: (string) Changes the HTTP method. + * - set_headers: (array) Sets the given headers. + * - remove_headers: (array) Remove the given headers. + * - body: (mixed) Sets the given body. + * - uri: (UriInterface) Set the URI. + * - query: (string) Set the query string value of the URI. + * - version: (string) Set the protocol version. + * + * @param RequestInterface $request Request to clone and modify. + * @param array $changes Changes to apply. + * + * @return RequestInterface + */ +function modify_request(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\RequestInterface $request, array $changes) +{ + if (!$changes) { + return $request; + } + $headers = $request->getHeaders(); + if (!isset($changes['uri'])) { + $uri = $request->getUri(); + } else { + // Remove the host header if one is on the URI + if ($host = $changes['uri']->getHost()) { + $changes['set_headers']['Host'] = $host; + if ($port = $changes['uri']->getPort()) { + $standardPorts = ['http' => 80, 'https' => 443]; + $scheme = $changes['uri']->getScheme(); + if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { + $changes['set_headers']['Host'] .= ':' . $port; + } + } + } + $uri = $changes['uri']; + } + if (!empty($changes['remove_headers'])) { + $headers = _caseless_remove($changes['remove_headers'], $headers); + } + if (!empty($changes['set_headers'])) { + $headers = _caseless_remove(\array_keys($changes['set_headers']), $headers); + $headers = $changes['set_headers'] + $headers; + } + if (isset($changes['query'])) { + $uri = $uri->withQuery($changes['query']); + } + if ($request instanceof \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\ServerRequestInterface) { + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\ServerRequest(isset($changes['method']) ? $changes['method'] : $request->getMethod(), $uri, $headers, isset($changes['body']) ? $changes['body'] : $request->getBody(), isset($changes['version']) ? $changes['version'] : $request->getProtocolVersion(), $request->getServerParams()); + } + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Request(isset($changes['method']) ? $changes['method'] : $request->getMethod(), $uri, $headers, isset($changes['body']) ? $changes['body'] : $request->getBody(), isset($changes['version']) ? $changes['version'] : $request->getProtocolVersion()); +} +/** + * Attempts to rewind a message body and throws an exception on failure. + * + * The body of the message will only be rewound if a call to `tell()` returns a + * value other than `0`. + * + * @param MessageInterface $message Message to rewind + * + * @throws \RuntimeException + */ +function rewind_body(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\MessageInterface $message) +{ + $body = $message->getBody(); + if ($body->tell()) { + $body->rewind(); + } +} +/** + * Safely opens a PHP stream resource using a filename. + * + * When fopen fails, PHP normally raises a warning. This function adds an + * error handler that checks for errors and throws an exception instead. + * + * @param string $filename File to open + * @param string $mode Mode used to open the file + * + * @return resource + * @throws \RuntimeException if the file cannot be opened + */ +function try_fopen($filename, $mode) +{ + $ex = null; + \set_error_handler(function () use($filename, $mode, &$ex) { + $ex = new \RuntimeException(\sprintf('Unable to open %s using mode %s: %s', $filename, $mode, \func_get_args()[1])); + }); + $handle = \fopen($filename, $mode); + \restore_error_handler(); + if ($ex) { + /** @var $ex \RuntimeException */ + throw $ex; + } + return $handle; +} +/** + * Copy the contents of a stream into a string until the given number of + * bytes have been read. + * + * @param StreamInterface $stream Stream to read + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * @return string + * @throws \RuntimeException on error. + */ +function copy_to_string(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $stream, $maxLen = -1) +{ + $buffer = ''; + if ($maxLen === -1) { + while (!$stream->eof()) { + $buf = $stream->read(1048576); + // Using a loose equality here to match on '' and false. + if ($buf == null) { + break; + } + $buffer .= $buf; + } + return $buffer; + } + $len = 0; + while (!$stream->eof() && $len < $maxLen) { + $buf = $stream->read($maxLen - $len); + // Using a loose equality here to match on '' and false. + if ($buf == null) { + break; + } + $buffer .= $buf; + $len = \strlen($buffer); + } + return $buffer; +} +/** + * Copy the contents of a stream into another stream until the given number + * of bytes have been read. + * + * @param StreamInterface $source Stream to read from + * @param StreamInterface $dest Stream to write to + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * + * @throws \RuntimeException on error. + */ +function copy_to_stream(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $source, \_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $dest, $maxLen = -1) +{ + $bufferSize = 8192; + if ($maxLen === -1) { + while (!$source->eof()) { + if (!$dest->write($source->read($bufferSize))) { + break; + } + } + } else { + $remaining = $maxLen; + while ($remaining > 0 && !$source->eof()) { + $buf = $source->read(\min($bufferSize, $remaining)); + $len = \strlen($buf); + if (!$len) { + break; + } + $remaining -= $len; + $dest->write($buf); + } + } +} +/** + * Calculate a hash of a Stream + * + * @param StreamInterface $stream Stream to calculate the hash for + * @param string $algo Hash algorithm (e.g. md5, crc32, etc) + * @param bool $rawOutput Whether or not to use raw output + * + * @return string Returns the hash of the stream + * @throws \RuntimeException on error. + */ +function hash(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $stream, $algo, $rawOutput = \false) +{ + $pos = $stream->tell(); + if ($pos > 0) { + $stream->rewind(); + } + $ctx = \hash_init($algo); + while (!$stream->eof()) { + \hash_update($ctx, $stream->read(1048576)); + } + $out = \hash_final($ctx, (bool) $rawOutput); + $stream->seek($pos); + return $out; +} +/** + * Read a line from the stream up to the maximum allowed buffer length + * + * @param StreamInterface $stream Stream to read from + * @param int $maxLength Maximum buffer length + * + * @return string|bool + */ +function readline(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $stream, $maxLength = null) +{ + $buffer = ''; + $size = 0; + while (!$stream->eof()) { + // Using a loose equality here to match on '' and false. + if (null == ($byte = $stream->read(1))) { + return $buffer; + } + $buffer .= $byte; + // Break when a new line is found or the max length - 1 is reached + if ($byte === "\n" || ++$size === $maxLength - 1) { + break; + } + } + return $buffer; +} +/** + * Parses a request message string into a request object. + * + * @param string $message Request message string. + * + * @return Request + */ +function parse_request($message) +{ + $data = _parse_message($message); + $matches = []; + if (!\preg_match('/^[\\S]+\\s+([a-zA-Z]+:\\/\\/|\\/).*/', $data['start-line'], $matches)) { + throw new \InvalidArgumentException('Invalid request string'); + } + $parts = \explode(' ', $data['start-line'], 3); + $version = isset($parts[2]) ? \explode('/', $parts[2])[1] : '1.1'; + $request = new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Request($parts[0], $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1], $data['headers'], $data['body'], $version); + return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); +} +/** + * Parses a response message string into a response object. + * + * @param string $message Response message string. + * + * @return Response + */ +function parse_response($message) +{ + $data = _parse_message($message); + // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space + // between status-code and reason-phrase is required. But browsers accept + // responses without space and reason as well. + if (!\preg_match('/^HTTP\\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { + throw new \InvalidArgumentException('Invalid response string'); + } + $parts = \explode(' ', $data['start-line'], 3); + return new \_PhpScoper5bbb1f4b001f3\GuzzleHttp\Psr7\Response($parts[1], $data['headers'], $data['body'], \explode('/', $parts[0])[1], isset($parts[2]) ? $parts[2] : null); +} +/** + * Parse a query string into an associative array. + * + * If multiple values are found for the same key, the value of that key + * value pair will become an array. This function does not parse nested + * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will + * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']). + * + * @param string $str Query string to parse + * @param bool|string $urlEncoding How the query string is encoded + * + * @return array + */ +function parse_query($str, $urlEncoding = \true) +{ + $result = []; + if ($str === '') { + return $result; + } + if ($urlEncoding === \true) { + $decoder = function ($value) { + return \rawurldecode(\str_replace('+', ' ', $value)); + }; + } elseif ($urlEncoding == \PHP_QUERY_RFC3986) { + $decoder = 'rawurldecode'; + } elseif ($urlEncoding == \PHP_QUERY_RFC1738) { + $decoder = 'urldecode'; + } else { + $decoder = function ($str) { + return $str; + }; + } + foreach (\explode('&', $str) as $kvp) { + $parts = \explode('=', $kvp, 2); + $key = $decoder($parts[0]); + $value = isset($parts[1]) ? $decoder($parts[1]) : null; + if (!isset($result[$key])) { + $result[$key] = $value; + } else { + if (!\is_array($result[$key])) { + $result[$key] = [$result[$key]]; + } + $result[$key][] = $value; + } + } + return $result; +} +/** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of parse_query() to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like http_build_query would). + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + * @return string + */ +function build_query(array $params, $encoding = \PHP_QUERY_RFC3986) +{ + if (!$params) { + return ''; + } + if ($encoding === \false) { + $encoder = function ($str) { + return $str; + }; + } elseif ($encoding === \PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === \PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder($k); + if (!\is_array($v)) { + $qs .= $k; + if ($v !== null) { + $qs .= '=' . $encoder($v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + if ($vv !== null) { + $qs .= '=' . $encoder($vv); + } + $qs .= '&'; + } + } + } + return $qs ? (string) \substr($qs, 0, -1) : ''; +} +/** + * Determines the mimetype of a file by looking at its extension. + * + * @param $filename + * + * @return null|string + */ +function mimetype_from_filename($filename) +{ + return mimetype_from_extension(\pathinfo($filename, \PATHINFO_EXTENSION)); +} +/** + * Maps a file extensions to a mimetype. + * + * @param $extension string The file extension. + * + * @return string|null + * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types + */ +function mimetype_from_extension($extension) +{ + static $mimetypes = ['7z' => 'application/x-7z-compressed', 'aac' => 'audio/x-aac', 'ai' => 'application/postscript', 'aif' => 'audio/x-aiff', 'asc' => 'text/plain', 'asf' => 'video/x-ms-asf', 'atom' => 'application/atom+xml', 'avi' => 'video/x-msvideo', 'bmp' => 'image/bmp', 'bz2' => 'application/x-bzip2', 'cer' => 'application/pkix-cert', 'crl' => 'application/pkix-crl', 'crt' => 'application/x-x509-ca-cert', 'css' => 'text/css', 'csv' => 'text/csv', 'cu' => 'application/cu-seeme', 'deb' => 'application/x-debian-package', 'doc' => 'application/msword', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'dvi' => 'application/x-dvi', 'eot' => 'application/vnd.ms-fontobject', 'eps' => 'application/postscript', 'epub' => 'application/epub+zip', 'etx' => 'text/x-setext', 'flac' => 'audio/flac', 'flv' => 'video/x-flv', 'gif' => 'image/gif', 'gz' => 'application/gzip', 'htm' => 'text/html', 'html' => 'text/html', 'ico' => 'image/x-icon', 'ics' => 'text/calendar', 'ini' => 'text/plain', 'iso' => 'application/x-iso9660-image', 'jar' => 'application/java-archive', 'jpe' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'jpg' => 'image/jpeg', 'js' => 'text/javascript', 'json' => 'application/json', 'latex' => 'application/x-latex', 'log' => 'text/plain', 'm4a' => 'audio/mp4', 'm4v' => 'video/mp4', 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'mov' => 'video/quicktime', 'mp3' => 'audio/mpeg', 'mp4' => 'video/mp4', 'mp4a' => 'audio/mp4', 'mp4v' => 'video/mp4', 'mpe' => 'video/mpeg', 'mpeg' => 'video/mpeg', 'mpg' => 'video/mpeg', 'mpg4' => 'video/mp4', 'oga' => 'audio/ogg', 'ogg' => 'audio/ogg', 'ogv' => 'video/ogg', 'ogx' => 'application/ogg', 'pbm' => 'image/x-portable-bitmap', 'pdf' => 'application/pdf', 'pgm' => 'image/x-portable-graymap', 'png' => 'image/png', 'pnm' => 'image/x-portable-anymap', 'ppm' => 'image/x-portable-pixmap', 'ppt' => 'application/vnd.ms-powerpoint', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'ps' => 'application/postscript', 'qt' => 'video/quicktime', 'rar' => 'application/x-rar-compressed', 'ras' => 'image/x-cmu-raster', 'rss' => 'application/rss+xml', 'rtf' => 'application/rtf', 'sgm' => 'text/sgml', 'sgml' => 'text/sgml', 'svg' => 'image/svg+xml', 'swf' => 'application/x-shockwave-flash', 'tar' => 'application/x-tar', 'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'torrent' => 'application/x-bittorrent', 'ttf' => 'application/x-font-ttf', 'txt' => 'text/plain', 'wav' => 'audio/x-wav', 'webm' => 'video/webm', 'wma' => 'audio/x-ms-wma', 'wmv' => 'video/x-ms-wmv', 'woff' => 'application/x-font-woff', 'wsdl' => 'application/wsdl+xml', 'xbm' => 'image/x-xbitmap', 'xls' => 'application/vnd.ms-excel', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xml' => 'application/xml', 'xpm' => 'image/x-xpixmap', 'xwd' => 'image/x-xwindowdump', 'yaml' => 'text/yaml', 'yml' => 'text/yaml', 'zip' => 'application/zip']; + $extension = \strtolower($extension); + return isset($mimetypes[$extension]) ? $mimetypes[$extension] : null; +} +/** + * Parses an HTTP message into an associative array. + * + * The array contains the "start-line" key containing the start line of + * the message, "headers" key containing an associative array of header + * array values, and a "body" key containing the body of the message. + * + * @param string $message HTTP request or response to parse. + * + * @return array + * @internal + */ +function _parse_message($message) +{ + if (!$message) { + throw new \InvalidArgumentException('Invalid message'); + } + // Iterate over each line in the message, accounting for line endings + $lines = \preg_split('/(\\r?\\n)/', $message, -1, \PREG_SPLIT_DELIM_CAPTURE); + $result = ['start-line' => \array_shift($lines), 'headers' => [], 'body' => '']; + \array_shift($lines); + for ($i = 0, $totalLines = \count($lines); $i < $totalLines; $i += 2) { + $line = $lines[$i]; + // If two line breaks were encountered, then this is the end of body + if (empty($line)) { + if ($i < $totalLines - 1) { + $result['body'] = \implode('', \array_slice($lines, $i + 2)); + } + break; + } + if (\strpos($line, ':')) { + $parts = \explode(':', $line, 2); + $key = \trim($parts[0]); + $value = isset($parts[1]) ? \trim($parts[1]) : ''; + $result['headers'][$key][] = $value; + } + } + return $result; +} +/** + * Constructs a URI for an HTTP request message. + * + * @param string $path Path from the start-line + * @param array $headers Array of headers (each value an array). + * + * @return string + * @internal + */ +function _parse_request_uri($path, array $headers) +{ + $hostKey = \array_filter(\array_keys($headers), function ($k) { + return \strtolower($k) === 'host'; + }); + // If no host is found, then a full URI cannot be constructed. + if (!$hostKey) { + return $path; + } + $host = $headers[\reset($hostKey)][0]; + $scheme = \substr($host, -4) === ':443' ? 'https' : 'http'; + return $scheme . '://' . $host . '/' . \ltrim($path, '/'); +} +/** @internal */ +function _caseless_remove($keys, array $data) +{ + $result = []; + foreach ($keys as &$key) { + $key = \strtolower($key); + } + foreach ($data as $k => $v) { + if (!\in_array(\strtolower($k), $keys)) { + $result[$k] = $v; + } + } + return $result; +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/functions_include.php b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/functions_include.php new file mode 100644 index 00000000..212874d4 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/guzzlehttp/psr7/src/functions_include.php @@ -0,0 +1,8 @@ +=5.3.0" + }, + "autoload": { + "psr-4": { + "_PhpScoper5bbb1f4b001f3\\Psr\\Http\\Message\\": "src\/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} \ No newline at end of file diff --git a/catalog/controller/payment/mollie-api-client/vendor/psr/http-message/src/MessageInterface.php b/catalog/controller/payment/mollie-api-client/vendor/psr/http-message/src/MessageInterface.php new file mode 100644 index 00000000..e0f5da21 --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/psr/http-message/src/MessageInterface.php @@ -0,0 +1,177 @@ +getHeaders() as $name => $values) { + * echo $name . ": " . implode(", ", $values); + * } + * + * // Emit headers iteratively: + * foreach ($message->getHeaders() as $name => $values) { + * foreach ($values as $value) { + * header(sprintf('%s: %s', $name, $value), false); + * } + * } + * + * While header names are not case-sensitive, getHeaders() will preserve the + * exact case in which headers were originally specified. + * + * @return string[][] Returns an associative array of the message's headers. Each + * key MUST be a header name, and each value MUST be an array of strings + * for that header. + */ + public function getHeaders(); + /** + * Checks if a header exists by the given case-insensitive name. + * + * @param string $name Case-insensitive header field name. + * @return bool Returns true if any header names match the given header + * name using a case-insensitive string comparison. Returns false if + * no matching header name is found in the message. + */ + public function hasHeader($name); + /** + * Retrieves a message header value by the given case-insensitive name. + * + * This method returns an array of all the header values of the given + * case-insensitive header name. + * + * If the header does not appear in the message, this method MUST return an + * empty array. + * + * @param string $name Case-insensitive header field name. + * @return string[] An array of string values as provided for the given + * header. If the header does not appear in the message, this method MUST + * return an empty array. + */ + public function getHeader($name); + /** + * Retrieves a comma-separated string of the values for a single header. + * + * This method returns all of the header values of the given + * case-insensitive header name as a string concatenated together using + * a comma. + * + * NOTE: Not all header values may be appropriately represented using + * comma concatenation. For such headers, use getHeader() instead + * and supply your own delimiter when concatenating. + * + * If the header does not appear in the message, this method MUST return + * an empty string. + * + * @param string $name Case-insensitive header field name. + * @return string A string of values as provided for the given header + * concatenated together using a comma. If the header does not appear in + * the message, this method MUST return an empty string. + */ + public function getHeaderLine($name); + /** + * Return an instance with the provided value replacing the specified header. + * + * While header names are case-insensitive, the casing of the header will + * be preserved by this function, and returned from getHeaders(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new and/or updated header and value. + * + * @param string $name Case-insensitive header field name. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withHeader($name, $value); + /** + * Return an instance with the specified header appended with the given value. + * + * Existing values for the specified header will be maintained. The new + * value(s) will be appended to the existing list. If the header did not + * exist previously, it will be added. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * new header and/or value. + * + * @param string $name Case-insensitive header field name to add. + * @param string|string[] $value Header value(s). + * @return static + * @throws \InvalidArgumentException for invalid header names or values. + */ + public function withAddedHeader($name, $value); + /** + * Return an instance without the specified header. + * + * Header resolution MUST be done without case-sensitivity. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the named header. + * + * @param string $name Case-insensitive header field name to remove. + * @return static + */ + public function withoutHeader($name); + /** + * Gets the body of the message. + * + * @return StreamInterface Returns the body as a stream. + */ + public function getBody(); + /** + * Return an instance with the specified message body. + * + * The body MUST be a StreamInterface object. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return a new instance that has the + * new body stream. + * + * @param StreamInterface $body Body. + * @return static + * @throws \InvalidArgumentException When the body is not valid. + */ + public function withBody(\_PhpScoper5bbb1f4b001f3\Psr\Http\Message\StreamInterface $body); +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/psr/http-message/src/RequestInterface.php b/catalog/controller/payment/mollie-api-client/vendor/psr/http-message/src/RequestInterface.php new file mode 100644 index 00000000..c95bd14d --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/psr/http-message/src/RequestInterface.php @@ -0,0 +1,124 @@ +getQuery()` + * or from the `QUERY_STRING` server param. + * + * @return array + */ + public function getQueryParams(); + /** + * Return an instance with the specified query string arguments. + * + * These values SHOULD remain immutable over the course of the incoming + * request. They MAY be injected during instantiation, such as from PHP's + * $_GET superglobal, or MAY be derived from some other value such as the + * URI. In cases where the arguments are parsed from the URI, the data + * MUST be compatible with what PHP's parse_str() would return for + * purposes of how duplicate query parameters are handled, and how nested + * sets are handled. + * + * Setting query string arguments MUST NOT change the URI stored by the + * request, nor the values in the server params. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated query string arguments. + * + * @param array $query Array of query string arguments, typically from + * $_GET. + * @return static + */ + public function withQueryParams(array $query); + /** + * Retrieve normalized file upload data. + * + * This method returns upload metadata in a normalized tree, with each leaf + * an instance of Psr\Http\Message\UploadedFileInterface. + * + * These values MAY be prepared from $_FILES or the message body during + * instantiation, or MAY be injected via withUploadedFiles(). + * + * @return array An array tree of UploadedFileInterface instances; an empty + * array MUST be returned if no data is present. + */ + public function getUploadedFiles(); + /** + * Create a new instance with the specified uploaded files. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param array $uploadedFiles An array tree of UploadedFileInterface instances. + * @return static + * @throws \InvalidArgumentException if an invalid structure is provided. + */ + public function withUploadedFiles(array $uploadedFiles); + /** + * Retrieve any parameters provided in the request body. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, this method MUST + * return the contents of $_POST. + * + * Otherwise, this method may return any results of deserializing + * the request body content; as parsing returns structured content, the + * potential types MUST be arrays or objects only. A null value indicates + * the absence of body content. + * + * @return null|array|object The deserialized body parameters, if any. + * These will typically be an array or object. + */ + public function getParsedBody(); + /** + * Return an instance with the specified body parameters. + * + * These MAY be injected during instantiation. + * + * If the request Content-Type is either application/x-www-form-urlencoded + * or multipart/form-data, and the request method is POST, use this method + * ONLY to inject the contents of $_POST. + * + * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of + * deserializing the request body content. Deserialization/parsing returns + * structured data, and, as such, this method ONLY accepts arrays or objects, + * or a null value if nothing was available to parse. + * + * As an example, if content negotiation determines that the request data + * is a JSON payload, this method could be used to create a request + * instance with the deserialized parameters. + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated body parameters. + * + * @param null|array|object $data The deserialized body data. This will + * typically be in an array or object. + * @return static + * @throws \InvalidArgumentException if an unsupported argument type is + * provided. + */ + public function withParsedBody($data); + /** + * Retrieve attributes derived from the request. + * + * The request "attributes" may be used to allow injection of any + * parameters derived from the request: e.g., the results of path + * match operations; the results of decrypting cookies; the results of + * deserializing non-form-encoded message bodies; etc. Attributes + * will be application and request specific, and CAN be mutable. + * + * @return array Attributes derived from the request. + */ + public function getAttributes(); + /** + * Retrieve a single derived request attribute. + * + * Retrieves a single derived request attribute as described in + * getAttributes(). If the attribute has not been previously set, returns + * the default value as provided. + * + * This method obviates the need for a hasAttribute() method, as it allows + * specifying a default value to return if the attribute is not found. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $default Default value to return if the attribute does not exist. + * @return mixed + */ + public function getAttribute($name, $default = null); + /** + * Return an instance with the specified derived request attribute. + * + * This method allows setting a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that has the + * updated attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @param mixed $value The value of the attribute. + * @return static + */ + public function withAttribute($name, $value); + /** + * Return an instance that removes the specified derived request attribute. + * + * This method allows removing a single derived request attribute as + * described in getAttributes(). + * + * This method MUST be implemented in such a way as to retain the + * immutability of the message, and MUST return an instance that removes + * the attribute. + * + * @see getAttributes() + * @param string $name The attribute name. + * @return static + */ + public function withoutAttribute($name); +} diff --git a/catalog/controller/payment/mollie-api-client/vendor/psr/http-message/src/StreamInterface.php b/catalog/controller/payment/mollie-api-client/vendor/psr/http-message/src/StreamInterface.php new file mode 100644 index 00000000..7c5b548d --- /dev/null +++ b/catalog/controller/payment/mollie-api-client/vendor/psr/http-message/src/StreamInterface.php @@ -0,0 +1,144 @@ + + * [user-info@]host[:port] + * + * + * If the port component is not set or is the standard port for the current + * scheme, it SHOULD NOT be included. + * + * @see https://tools.ietf.org/html/rfc3986#section-3.2 + * @return string The URI authority, in "[user-info@]host[:port]" format. + */ + public function getAuthority(); + /** + * Retrieve the user information component of the URI. + * + * If no user information is present, this method MUST return an empty + * string. + * + * If a user is present in the URI, this will return that value; + * additionally, if the password is also present, it will be appended to the + * user value, with a colon (":") separating the values. + * + * The trailing "@" character is not part of the user information and MUST + * NOT be added. + * + * @return string The URI user information, in "username[:password]" format. + */ + public function getUserInfo(); + /** + * Retrieve the host component of the URI. + * + * If no host is present, this method MUST return an empty string. + * + * The value returned MUST be normalized to lowercase, per RFC 3986 + * Section 3.2.2. + * + * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 + * @return string The URI host. + */ + public function getHost(); + /** + * Retrieve the port component of the URI. + * + * If a port is present, and it is non-standard for the current scheme, + * this method MUST return it as an integer. If the port is the standard port + * used with the current scheme, this method SHOULD return null. + * + * If no port is present, and no scheme is present, this method MUST return + * a null value. + * + * If no port is present, but a scheme is present, this method MAY return + * the standard port for that scheme, but SHOULD return null. + * + * @return null|int The URI port. + */ + public function getPort(); + /** + * Retrieve the path component of the URI. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * Normally, the empty path "" and absolute path "/" are considered equal as + * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically + * do this normalization because in contexts with a trimmed base path, e.g. + * the front controller, this difference becomes significant. It's the task + * of the user to handle both "" and "/". + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.3. + * + * As an example, if the value should include a slash ("/") not intended as + * delimiter between path segments, that value MUST be passed in encoded + * form (e.g., "%2F") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.3 + * @return string The URI path. + */ + public function getPath(); + /** + * Retrieve the query string of the URI. + * + * If no query string is present, this method MUST return an empty string. + * + * The leading "?" character is not part of the query and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.4. + * + * As an example, if a value in a key/value pair of the query string should + * include an ampersand ("&") not intended as a delimiter between values, + * that value MUST be passed in encoded form (e.g., "%26") to the instance. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.4 + * @return string The URI query string. + */ + public function getQuery(); + /** + * Retrieve the fragment component of the URI. + * + * If no fragment is present, this method MUST return an empty string. + * + * The leading "#" character is not part of the fragment and MUST NOT be + * added. + * + * The value returned MUST be percent-encoded, but MUST NOT double-encode + * any characters. To determine what characters to encode, please refer to + * RFC 3986, Sections 2 and 3.5. + * + * @see https://tools.ietf.org/html/rfc3986#section-2 + * @see https://tools.ietf.org/html/rfc3986#section-3.5 + * @return string The URI fragment. + */ + public function getFragment(); + /** + * Return an instance with the specified scheme. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified scheme. + * + * Implementations MUST support the schemes "http" and "https" case + * insensitively, and MAY accommodate other schemes if required. + * + * An empty scheme is equivalent to removing the scheme. + * + * @param string $scheme The scheme to use with the new instance. + * @return static A new instance with the specified scheme. + * @throws \InvalidArgumentException for invalid or unsupported schemes. + */ + public function withScheme($scheme); + /** + * Return an instance with the specified user information. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified user information. + * + * Password is optional, but the user information MUST include the + * user; an empty string for the user is equivalent to removing user + * information. + * + * @param string $user The user name to use for authority. + * @param null|string $password The password associated with $user. + * @return static A new instance with the specified user information. + */ + public function withUserInfo($user, $password = null); + /** + * Return an instance with the specified host. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified host. + * + * An empty host value is equivalent to removing the host. + * + * @param string $host The hostname to use with the new instance. + * @return static A new instance with the specified host. + * @throws \InvalidArgumentException for invalid hostnames. + */ + public function withHost($host); + /** + * Return an instance with the specified port. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified port. + * + * Implementations MUST raise an exception for ports outside the + * established TCP and UDP port ranges. + * + * A null value provided for the port is equivalent to removing the port + * information. + * + * @param null|int $port The port to use with the new instance; a null value + * removes the port information. + * @return static A new instance with the specified port. + * @throws \InvalidArgumentException for invalid ports. + */ + public function withPort($port); + /** + * Return an instance with the specified path. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified path. + * + * The path can either be empty or absolute (starting with a slash) or + * rootless (not starting with a slash). Implementations MUST support all + * three syntaxes. + * + * If the path is intended to be domain-relative rather than path relative then + * it must begin with a slash ("/"). Paths not starting with a slash ("/") + * are assumed to be relative to some base path known to the application or + * consumer. + * + * Users can provide both encoded and decoded path characters. + * Implementations ensure the correct encoding as outlined in getPath(). + * + * @param string $path The path to use with the new instance. + * @return static A new instance with the specified path. + * @throws \InvalidArgumentException for invalid paths. + */ + public function withPath($path); + /** + * Return an instance with the specified query string. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified query string. + * + * Users can provide both encoded and decoded query characters. + * Implementations ensure the correct encoding as outlined in getQuery(). + * + * An empty query string value is equivalent to removing the query string. + * + * @param string $query The query string to use with the new instance. + * @return static A new instance with the specified query string. + * @throws \InvalidArgumentException for invalid query strings. + */ + public function withQuery($query); + /** + * Return an instance with the specified URI fragment. + * + * This method MUST retain the state of the current instance, and return + * an instance that contains the specified URI fragment. + * + * Users can provide both encoded and decoded fragment characters. + * Implementations ensure the correct encoding as outlined in getFragment(). + * + * An empty fragment value is equivalent to removing the fragment. + * + * @param string $fragment The fragment to use with the new instance. + * @return static A new instance with the specified fragment. + */ + public function withFragment($fragment); + /** + * Return the string representation as a URI reference. + * + * Depending on which components of the URI are present, the resulting + * string is either a full URI or relative reference according to RFC 3986, + * Section 4.1. The method concatenates the various components of the URI, + * using the appropriate delimiters: + * + * - If a scheme is present, it MUST be suffixed by ":". + * - If an authority is present, it MUST be prefixed by "//". + * - The path can be concatenated without delimiters. But there are two + * cases where the path has to be adjusted to make the URI reference + * valid as PHP does not allow to throw an exception in __toString(): + * - If the path is rootless and an authority is present, the path MUST + * be prefixed by "/". + * - If the path is starting with more than one "/" and no authority is + * present, the starting slashes MUST be reduced to one. + * - If a query is present, it MUST be prefixed by "?". + * - If a fragment is present, it MUST be prefixed by "#". + * + * @see http://tools.ietf.org/html/rfc3986#section-4.1 + * @return string + */ + public function __toString(); +} diff --git a/catalog/controller/payment/mollie/base.php b/catalog/controller/payment/mollie/base.php new file mode 100644 index 00000000..09664c53 --- /dev/null +++ b/catalog/controller/payment/mollie/base.php @@ -0,0 +1,1305 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + * + * @property Config $config + * @property Currency $currency + * @property array $data + * @property Document $document + * @property Language $language + * @property Loader $load + * @property Log $log + * @property ModelCheckoutOrder $model_checkout_order + * @property Request $request + * @property Response $response + * @property Session $session + * @property URL $url + * + * @method render + */ +use Mollie\Api\MollieApiClient; +use Mollie\Api\Types\PaymentStatus; + +require_once(dirname(DIR_SYSTEM) . "/catalog/controller/payment/mollie/helper.php"); + +use comercia\Util; + +class ControllerPaymentMollieBase extends Controller +{ + // Current module name - should be overwritten by subclass using one of the values below. + const MODULE_NAME = null; + + /** + * @return MollieApiClient + */ + protected function getAPIClient() + { + return MollieHelper::getAPIClient($this->config); + } + + /** + * + * Keep a log of Mollie transactions. + * + * @param $line string + * @param $alsoEcho bool + */ + protected function writeToMollieLog($line, $alsoEcho = false) + { + $log = new Log('Mollie.log'); + $log->write($line); + if ($alsoEcho) echo $line; + } + + /** + * @return ModelExtensionPaymentMollieBase + */ + protected function getModuleModel() + { + $model_name = "model_payment_mollie_" . static::MODULE_NAME; + + if (!isset($this->$model_name)) { + Util::load()->model("payment/mollie_" . static::MODULE_NAME); + } + + return $this->$model_name; + } + + /** + * @return bool + */ + protected function getOrderID() + { + if (empty($this->session->data['order_id']) && !isset($this->request->get['order_id'])) { + return false; + } + if (isset($this->request->get['order_id'])) { + return $this->request->get['order_id']; + } + return $this->session->data['order_id']; + } + + /** + * Get the order we are processing from OpenCart. + * + * @return array + */ + protected function getOpenCartOrder($order_id) + { + $orderModel = Util::load()->model("checkout/order"); + // Load last order from session + return $orderModel->getOrder($order_id); + } + + //Get order products + protected function getOrderProducts($order_id) + { + $model = Util::load()->model("payment/mollie_" . static::MODULE_NAME); + + return $model->getOrderProducts($order_id); + } + + //Get tax rate + protected function getTaxRate($tax_rates = array()) + { + $rates = array(); + if(!empty($tax_rates)) { + foreach($tax_rates as $tax) { + $rates[] = $tax['rate']; + } + } + return $rates; + } + + //Get Coupon Details + protected function getCouponDetails($orderID) + { + $model = Util::load()->model("payment/mollie_" . static::MODULE_NAME); + + return $model->getCouponDetails($orderID); + } + + //Get Voucher Details + protected function getVoucherDetails($orderID) { + $model = Util::load()->model("payment/mollie_" . static::MODULE_NAME); + + return $model->getVoucherDetails($orderID); + } + + + //Get Reward Point Details + protected function getRewardPointDetails($orderID) { + $model = Util::load()->model("payment/mollie_" . static::MODULE_NAME); + + return $model->getRewardPointDetails($orderID); + } + + /** + * This gets called by OpenCart at the final checkout step and should generate a confirmation button. + * @return string + */ + public function index() + { + Util::load()->language("payment/mollie"); + + $payment_method = $this->getAPIClient()->methods->get(static::MODULE_NAME, array('include' => 'issuers')); + + // Set template data. + $data['action'] = $this->url->link("payment/mollie_" . static::MODULE_NAME . "/payment", "", "SSL"); + $data['image'] = $payment_method->image->size1x; + $data['message'] = $this->language; + $data['issuers'] = isset($payment_method->issuers) ? $payment_method->issuers : array(); + $data['text_issuer'] = $this->language->get("text_issuer_" . static::MODULE_NAME); + $data['set_issuer_url'] = $this->url->link("payment/mollie_" . static::MODULE_NAME . "/set_issuer", "", "SSL"); + + // Return HTML output - it will get appended to confirm.tpl. + if (Util::version()->isMaximal("1.5.6.4")) { + return $this->renderTemplate('mollie_checkout_form', $data, array(), false); + } + return Util::load()->view('payment/mollie_checkout_form', $data); + } + + protected function convertCurrency($amount) { + $currency = $this->session->data['currency']; + $configCurrency = $this->config->get("config_currency"); + return $this->currency->convert($amount, $configCurrency, $currency); + } + + //Format text + protected function formatText($text) { + return html_entity_decode($text, ENT_QUOTES, 'UTF-8'); + } + + /** + * The payment action creates the payment and redirects the customer to the selected bank. + * + * It is called when the customer submits the button generated in the mollie_checkout_form template. + */ + public function payment() + { + if (Util::request()->server()->REQUEST_METHOD != 'POST') { + return; + } + try { + $api = $this->getAPIClient(); + } catch (Mollie\Api\Exceptions\ApiException $e) { + $this->showErrorPage($e->getMessage()); + $this->writeToMollieLog("Creating payment failed, API did not load; " . $e->getMessage()); + return; + } + + // Load essentials + Util::load()->language("payment/mollie"); + + $model = $this->getModuleModel(); + $order_id = $this->getOrderID(); + $order = $this->getOpenCartOrder($order_id); + + $currency = $this->session->data['currency']; + $currency_value = $this->currency->getValue($this->session->data['currency']); + $amount = $this->convertCurrency($order['total']); + $description = str_replace("%", $order['order_id'], html_entity_decode($this->config->get(MollieHelper::getModuleCode() . "_ideal_description"), ENT_QUOTES, "UTF-8")); + $return_url = $this->url->link("payment/mollie_" . static::MODULE_NAME . "/callback&order_id=" . $order['order_id'], "", "SSL"); + $issuer = $this->getIssuer(); + + try { + $data = array( + "amount" => ["currency" => $currency, "value" => (string)number_format((float)$amount, 2, '.', '')], + "orderNumber" => $order['order_id'], + "redirectUrl" => $this->formatText($return_url), + "webhookUrl" => $this->getWebhookUrl(), + "metadata" => array("order_id" => $order['order_id'], "description" => $this->formatText($description)), + "method" => static::MODULE_NAME, + ); + + $data['payment'] = array( + "issuer" => $this->formatText($issuer), + "webhookUrl" => $this->getWebhookUrl() + ); + + //Order line data + $orderProducts = $this->getOrderProducts($order['order_id']); + $lines = array(); + + $productModel = Util::load()->model('catalog/product'); + foreach($orderProducts as $orderProduct) { + $productDetails = $productModel->getProduct($orderProduct['product_id']); + $tax_rates = $this->tax->getRates($orderProduct['price'], $productDetails['tax_class_id']); + $rates = $this->getTaxRate($tax_rates); + //Since Mollie only supports VAT so '$rates' must contains only one(VAT) rate. + $vatRate = isset($rates[0]) ? $rates[0] : 0; + $total = number_format((float)$this->convertCurrency(($orderProduct['price'] + $orderProduct['tax']) * $orderProduct['quantity']), 2, '.', ''); + + // Fix for qty < 1 + if($orderProduct['quantity'] % 1 != 0) { + $qty = 1; + $price = $orderProduct['price'] * $orderProduct['quantity']; + } else { + $qty = $orderProduct['quantity']; + $price = $orderProduct['price']; + } + + $vatAmount = $total * ( $vatRate / (100 + $vatRate)); + $lines[] = array( + 'type' => 'physical', + 'name' => $this->formatText($orderProduct['name']), + 'quantity' => $qty, + 'unitPrice' => ["currency" => $currency, "value" => (string)number_format((float)$this->convertCurrency($price + $orderProduct['tax']), 2, '.', '')], + 'totalAmount' => ["currency" => $currency, "value" => (string)number_format((float)$total, 2, '.', '')], + 'vatRate' => (string)number_format((float)$vatRate, 2, '.', ''), + 'vatAmount' => ["currency" => $currency, "value" => (string)number_format((float)$vatAmount, 2, '.', '')] + ); + } + + //Check for shipping fee + if(isset($this->session->data['shipping_method'])) { + $title = $this->session->data['shipping_method']['title']; + $cost = $this->session->data['shipping_method']['cost']; + $taxClass = $this->session->data['shipping_method']['tax_class_id']; + $tax_rates = $this->tax->getRates($cost, $taxClass); + $rates = $this->getTaxRate($tax_rates); + $vatRate = isset($rates[0]) ? $rates[0] : 0; + $costWithTax = $this->tax->calculate($cost, $taxClass, true); + $costWithTax = number_format((float)$this->convertCurrency($costWithTax), 2, '.', ''); + $shippingVATAmount = $costWithTax * ( $vatRate / (100 + $vatRate)); + $lineForShipping[] = array( + 'type' => 'shipping_fee', + 'name' => $this->formatText($title), + 'quantity' => 1, + 'unitPrice' => ["currency" => $currency, "value" => (string)$costWithTax], + 'totalAmount' => ["currency" => $currency, "value" => (string)$costWithTax], + 'vatRate' => (string)number_format((float)$vatRate, 2, '.', ''), + 'vatAmount' => ["currency" => $currency, "value" => (string)number_format((float)$shippingVATAmount, 2, '.', '')] + ); + + $lines = array_merge($lines, $lineForShipping); + } + + //Check if coupon applied + if(isset($this->session->data['coupon'])) { + //Get coupon data + $this->load->model('extension/total/coupon'); + + $coupon_info = $this->model_extension_total_coupon->getCoupon($this->session->data['coupon']); + + if ($coupon_info) { + $discount_total = 0; + $couponVATAmount = 0; + + if (!$coupon_info['product']) { + $sub_total = $this->cart->getSubTotal(); + } else { + $sub_total = 0; + + foreach ($this->cart->getProducts() as $product) { + if (in_array($product['product_id'], $coupon_info['product'])) { + $sub_total += $product['total']; + } + } + } + + if ($coupon_info['type'] == 'F') { + $coupon_info['discount'] = min($coupon_info['discount'], $sub_total); + } + + foreach ($this->cart->getProducts() as $product) { + $discount = 0; + + if (!$coupon_info['product']) { + $status = true; + } else { + $status = in_array($product['product_id'], $coupon_info['product']); + } + + if ($status) { + if ($coupon_info['type'] == 'F') { + $discount = $coupon_info['discount'] * ($product['total'] / $sub_total); + } elseif ($coupon_info['type'] == 'P') { + $discount = $product['total'] / 100 * $coupon_info['discount']; + } + + if ($product['tax_class_id']) { + $tax_rates = $this->tax->getRates($product['total'] - ($product['total'] - $discount), $product['tax_class_id']); + + foreach ($tax_rates as $tax_rate) { + if ($tax_rate['type'] == 'P') { + $couponVATAmount += $tax_rate['amount']; + } + } + } + } + + $discount_total += $discount; + } + + if ($coupon_info['shipping'] && isset($this->session->data['shipping_method'])) { + if (!empty($this->session->data['shipping_method']['tax_class_id'])) { + $tax_rates = $this->tax->getRates($this->session->data['shipping_method']['cost'], $this->session->data['shipping_method']['tax_class_id']); + + foreach ($tax_rates as $tax_rate) { + if ($tax_rate['type'] == 'P') { + $couponVATAmount += $tax_rate['amount']; + } + } + } + + $discount_total += $this->session->data['shipping_method']['cost']; + } + + $vatRate = ($couponVATAmount * 100) / ($discount_total); + + $vatRate = number_format((float)$vatRate, 2, '.', ''); + + $unitPriceWithTax = number_format((float)$this->convertCurrency($discount_total + $couponVATAmount), 2, '.', ''); + + $couponVATAmount = number_format((float)$this->convertCurrency($couponVATAmount), 2, '.', ''); + + // Rounding fix + $couponVATAmount1 = $unitPriceWithTax * ($vatRate / (100 + $vatRate)); + $couponVATAmount1 = number_format((float)$couponVATAmount1, 2, '.', ''); + if($couponVATAmount != $couponVATAmount1) { + if($couponVATAmount1 > $couponVATAmount) { + $couponVATAmount = $couponVATAmount + ($couponVATAmount1 - $couponVATAmount); + } else { + $couponVATAmount = $couponVATAmount - ($couponVATAmount - $couponVATAmount1); + } + } + + $lineForCoupon[] = array( + 'type' => 'discount', + 'name' => $this->formatText($coupon_info['name']), + 'quantity' => 1, + 'unitPrice' => ["currency" => $currency, "value" => (string)number_format(-$unitPriceWithTax, 2, '.', '')], + 'totalAmount' => ["currency" => $currency, "value" => (string)number_format(-$unitPriceWithTax, 2, '.', '')], + 'vatRate' => (string)$vatRate, + 'vatAmount' => ["currency" => $currency, "value" => (string)number_format(-$couponVATAmount, 2, '.', '')] + ); + + $lines = array_merge($lines, $lineForCoupon); + } + } + + //Check if gift card applied + if(isset($this->session->data['voucher'])) { + //Get voucher data + $voucher = $this->getVoucherDetails($order['order_id']); + $lineForVoucher[] = array( + 'type' => 'gift_card', + 'name' => $this->formatText($voucher['title']), + 'quantity' => 1, + 'unitPrice' => ["currency" => $currency, "value" => (string)number_format((float)$this->convertCurrency($voucher['value']), 2, '.', '')], + 'totalAmount' => ["currency" => $currency, "value" => (string)number_format((float)$this->convertCurrency($voucher['value']), 2, '.', '')], + 'vatRate' => "0.00", + 'vatAmount' => ["currency" => $currency, "value" => "0.00"] + ); + + $lines = array_merge($lines, $lineForVoucher); + } + + //Check for reward points + if(isset($this->session->data['reward'])) { + //Get reward point data + $rewardPoints = $this->getRewardPointDetails($order['order_id']); + + foreach ($this->cart->getProducts() as $product) { + if ($product['points']) { + if ($product['tax_class_id']) { + $taxClass = $product['tax_class_id']; + $tax_rates = $this->tax->getRates($rewardPoints['value'], $taxClass); + $rates = $this->getTaxRate($tax_rates); + $vatRate = $rates[0]; + break; + } + } + } + + if(!isset($vatRate) || empty($vatRate)) { + $vatRate = 0; + } + + $unitPriceWithTax = $this->tax->calculate($rewardPoints['value'], $taxClass, true); + $unitPriceWithTax = number_format((float)$this->convertCurrency($unitPriceWithTax), 2, '.', ''); + + $rewardVATAmount = $unitPriceWithTax * ( $vatRate / (100 + $vatRate)); + + $lineForRewardPoints[] = array( + 'type' => 'discount', + 'name' => $this->formatText($rewardPoints['title']), + 'quantity' => 1, + 'unitPrice' => ["currency" => $currency, "value" => (string)$unitPriceWithTax], + 'totalAmount' => ["currency" => $currency, "value" => (string)$unitPriceWithTax], + 'vatRate' => (string)number_format((float)$vatRate, 2, '.', ''), + 'vatAmount' => ["currency" => $currency, "value" => (string)number_format((float)$rewardVATAmount, 2, '.', '')] + ); + + $lines = array_merge($lines, $lineForRewardPoints); + } + + // Gift Voucher + if (!empty($this->session->data['vouchers'])) { + foreach ($this->session->data['vouchers'] as $key => $voucher) { + $voucherData[] = array( + 'type' => 'physical', + 'name' => $voucher['description'], + 'quantity' => 1, + 'unitPrice' => ["currency" => $currency, "value" => (string)number_format((float)$this->convertCurrency($voucher['amount']), 2, '.', '')], + 'totalAmount' => ["currency" => $currency, "value" => (string)number_format((float)$this->convertCurrency($voucher['amount']), 2, '.', '')], + 'vatRate' => "0.00", + 'vatAmount' => ["currency" => $currency, "value" => "0.00"] + ); + } + + $lines = array_merge($lines, $voucherData); + } + + //Check for other totals (if any) + $otherOrderTotals = $model->getOtherOrderTotals($order['order_id']); + if(!empty($otherOrderTotals)) { + $otherTotals = array(); + + foreach($otherOrderTotals as $orderTotals) { + + if($this->config->get($orderTotals['code'] . '_tax_class_id')) { + $taxClass = $this->config->get($orderTotals['code'] . '_tax_class_id'); + } else { + $taxClass = 0; + } + + $tax_rates = $this->tax->getRates($orderTotals['value'], $taxClass); + $rates = $this->getTaxRate($tax_rates); + $vatRate = isset($rates[0]) ? $rates[0] : 0; + $unitPriceWithTax = $this->tax->calculate($orderTotals['value'], $taxClass, true); + $unitPriceWithTax = number_format((float)$this->convertCurrency($unitPriceWithTax), 2, '.', ''); + $totalsVATAmount = $unitPriceWithTax * ( $vatRate / (100 + $vatRate)); + + $type = 'discount'; + if($orderTotals['value'] > 0) { + $type = 'surcharge'; + } + + $otherTotals[] = array( + 'type' => $type, + 'name' => $this->formatText($orderTotals['title']), + 'quantity' => 1, + 'unitPrice' => ["currency" => $currency, "value" => (string)$unitPriceWithTax], + 'totalAmount' => ["currency" => $currency, "value" => (string)$unitPriceWithTax], + 'vatRate' => (string)number_format((float)$vatRate, 2, '.', ''), + 'vatAmount' => ["currency" => $currency, "value" => (string)number_format((float)$totalsVATAmount, 2, '.', '')] + ); + } + + $lines = array_merge($lines, $otherTotals); + } + + //Check for rounding off issue in a general way (for all possible totals) + $orderTotal = number_format($amount, 2, '.', ''); + $orderLineTotal = 0; + + foreach($lines as $line) { + $orderLineTotal += $line['totalAmount']['value']; + } + + if(($orderTotal > $orderLineTotal) && (number_format(($orderTotal - $orderLineTotal), 2, '.', '') == 0.01)) { + $lineForDiscount[] = array( + 'type' => 'discount', + 'name' => $this->formatText($this->language->get("roundoff_description")), + 'quantity' => 1, + 'unitPrice' => ["currency" => $currency, "value" => "0.01"], + 'totalAmount' => ["currency" => $currency, "value" => "0.01"], + 'vatRate' => "0", + 'vatAmount' => ["currency" => $currency, "value" => "0.00"] + ); + + $lines = array_merge($lines, $lineForDiscount); + } + + if(($orderTotal < $orderLineTotal) && (number_format(($orderLineTotal - $orderTotal), 2, '.', '') == 0.01)) { + $lineForSurcharge[] = array( + 'type' => 'surcharge', + 'name' => $this->formatText($this->language->get("roundoff_description")), + 'quantity' => 1, + 'unitPrice' => ["currency" => $currency, "value" => "-0.01"], + 'totalAmount' => ["currency" => $currency, "value" => "-0.01"], + 'vatRate' => "0", + 'vatAmount' => ["currency" => $currency, "value" => "0.00"] + ); + + $lines = array_merge($lines, $lineForSurcharge); + } + $data['lines'] = $lines; + /* + * This data is sent along for credit card payments / fraud checks. You can remove this but you will + * have a higher conversion if you leave it here. + */ + $data["billingAddress"] = [ + "givenName" => $this->formatText($order['payment_firstname']), + "familyName" => $this->formatText($order['payment_lastname']), + "email" => $this->formatText($order['email']), + "streetAndNumber" => $this->formatText($order['payment_address_1'] . ' ' . $order['payment_address_2']), + "city" => $this->formatText($order['payment_city']), + "region" => $this->formatText($order['payment_zone']), + "postalCode" => $this->formatText($order['payment_postcode']), + "country" => $this->formatText($order['payment_iso_code_2']) + ]; + + if (!empty($order['shipping_firstname']) || !empty($order['shipping_lastname'])) { + $data["shippingAddress"] = [ + "givenName" => $this->formatText($order['shipping_firstname']), + "familyName" => $this->formatText($order['shipping_lastname']), + "email" => $this->formatText($order['email']), + "streetAndNumber" => $this->formatText($order['shipping_address_1'] . ' ' . $order['shipping_address_2']), + "city" => $this->formatText($order['shipping_city']), + "region" => $this->formatText($order['shipping_zone']), + "postalCode" => $this->formatText($order['shipping_postcode']), + "country" => $this->formatText($order['shipping_iso_code_2']) + ]; + } else { + $data["shippingAddress"] = $data["billingAddress"]; + } + + + $locales = array( + 'en_US', + 'de_AT', + 'de_CH', + 'de_DE', + 'es_ES', + 'fr_BE', + 'fr_FR', + 'nl_BE', + 'nl_NL' + ); + + if (strstr(isset($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language'), '-')) { + list ($language, $country) = explode('-', isset($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language')); + $locale = strtolower($language) . '_' . strtoupper($country); + } else { + $locale = strtolower(isset($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language')) . '_' . strtoupper(isset($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language')); + } + + if (!in_array($locale, $locales)) { + $locale = 'nl_NL'; + } + + $data["locale"]=$locale; + + //Create Order + $orderObject = $api->orders->create($data); + + } catch (Mollie\Api\Exceptions\ApiException $e) { + $this->showErrorPage($e->getMessage()); + $this->writeToMollieLog("Creating order failed; " . $e->getMessage()); + return; + } + + // Some payment methods can't be cancelled. They need an initial order status. + if ($this->startAsPending()) { + $this->addOrderHistory($order, $this->config->get(MollieHelper::getModuleCode() . "_ideal_pending_status_id"), $this->language->get("text_redirected"), false); + } + + if($model->setPayment($order['order_id'], $orderObject->id)) { + $this->writeToMollieLog("Order created : mollie_order_id - " . $orderObject->id); + } else { + $this->writeToMollieLog("Order created but mollie_order_id - " . $orderObject->id . "not saved in the database. Should be updated when webhook called."); + } + + // Redirect to payment gateway. + $this->redirect($orderObject->_links->checkout->href); + } + + /** + * Some payment methods can't be cancelled. They need 'pending' as an initial order status. + * + * @return bool + */ + protected function startAsPending() + { + return false; + } + + /** + * This action is getting called by Mollie to report the payment status + */ + public function webhook() + { + if (empty($this->request->post['id'])) { + header("HTTP/1.0 400 Bad Request"); + $this->writeToMollieLog("Webhook called but no ID received.", true); + return; + } + + // Check webhook for order/payment + $id = $this->request->post['id']; + $temp = explode('_', $id); + $idPrefix = $temp[0]; + if($idPrefix == 'ord') { + $this->webhookForOrder($id); + } else { + $this->webhookForPayment($id); + } + + } + + private function webhookForPayment($payment_id) { + + $moduleCode = MollieHelper::getModuleCode(); + + $this->writeToMollieLog("Received webhook for payment_id " . $payment_id); + + $molliePayment = $this->getAPIClient()->payments->get($payment_id); + + $mollieOrderId = $molliePayment->orderId; + + $mollieOrder = $this->getAPIClient()->orders->get($mollieOrderId); + + // Load essentials + Util::load()->model("checkout/order"); + $model = $this->getModuleModel(); + Util::load()->language("payment/mollie"); + + //Get order_id of this transaction from db + $order = $this->model_checkout_order->getOrder($mollieOrder->metadata->order_id); + + //Set transaction ID + $data = array(); + + if($molliePayment) { + $data = array( + 'payment_id' => $payment_id, + 'status' => $molliePayment->status + ); + } + + if(!empty($data)) { + $model->updatePayment($mollieOrder->metadata->order_id, $mollieOrderId, $data); + } + + if (empty($order)) { + header("HTTP/1.0 404 Not Found"); + echo "Could not find order."; + return; + } + + if($order['order_status_id'] != 0) { + return; + } + + // Only process the status if the order is stateless or in 'pending' status. + if (!empty($order['order_status_id']) && $order['order_status_id'] != $this->config->get($moduleCode . "_ideal_pending_status_id")) { + $this->writeToMollieLog("The order was already processed before (order status ID: " . intval($order['order_status_id']) . ")"); + return; + } + + // Payment cancelled. + if ($molliePayment->status == PaymentStatus::STATUS_CANCELED) { + $new_status_id = intval($this->config->get($moduleCode . "_ideal_canceled_status_id")); + + if (!$new_status_id) { + $this->writeToMollieLog("The payment was cancelled. No 'cancelled' status ID is configured, so the order status could not be updated.", true); + return; + } + $this->addOrderHistory($order, $new_status_id, $this->language->get("response_cancelled"), false); + $this->writeToMollieLog("The payment was cancelled and the order was moved to the 'cancelled' status (new status ID: {$new_status_id}).", true); + return; + } + + // Payment expired. + if ($molliePayment->status == PaymentStatus::STATUS_EXPIRED) { + $new_status_id = intval($this->config->get($moduleCode . "_ideal_expired_status_id")); + + if (!$new_status_id) { + $this->writeToMollieLog("The payment expired. No 'expired' status ID is configured, so the order status could not be updated.", true); + return; + } + $this->addOrderHistory($order, $new_status_id, $this->language->get("response_expired"), false); + $this->writeToMollieLog("The payment expired and the order was moved to the 'expired' status (new status ID: {$new_status_id}).", true); + return; + } + + // Otherwise, payment failed. + $new_status_id = intval($this->config->get($moduleCode . "_ideal_failed_status_id")); + + if (!$new_status_id) { + $this->writeToMollieLog("The payment failed. No 'failed' status ID is configured, so the order status could not be updated.", true); + return; + } + $this->addOrderHistory($order, $new_status_id, $this->language->get("response_unknown"), false); + $this->writeToMollieLog("The payment failed for an unknown reason and the order was moved to the 'failed' status (new status ID: {$new_status_id}).", true); + return; + + } + + private function webhookForOrder($order_id) { + + $moduleCode = MollieHelper::getModuleCode(); + + $this->writeToMollieLog("Received webhook for order_id " . $order_id); + + $mollieOrder = $this->getAPIClient()->orders->get($order_id); + + // Check if order_id is saved in database + $model = $this->getModuleModel(); + $mollieOrderIdExists = $model->checkMollieOrderID($order_id); + if(!$mollieOrderIdExists) { + $model->setPayment($mollieOrder->metadata->order_id, $order_id); + $this->writeToMollieLog("Updated database with mollie_order_id - " . $order_id); + } + + // Load essentials + Util::load()->model("checkout/order"); + $this->getModuleModel(); + Util::load()->language("payment/mollie"); + + //Get order_id of this transaction from db + $order = $this->model_checkout_order->getOrder($mollieOrder->metadata->order_id); + + if (empty($order)) { + header("HTTP/1.0 404 Not Found"); + echo "Could not find order."; + return; + } + + if($order['order_status_id'] != 0) { + return; + } + + // Only process the status if the order is stateless or in 'pending' status. + if (!empty($order['order_status_id']) && $order['order_status_id'] != $this->config->get($moduleCode . "_ideal_pending_status_id")) { + $this->writeToMollieLog("The order was already processed before (order status ID: " . intval($order['order_status_id']) . ")"); + return; + } + + // Order paid ('processed'). + if ($mollieOrder->isPaid() || $mollieOrder->isAuthorized()) { + $new_status_id = intval($this->config->get($moduleCode . "_ideal_processing_status_id")); + + if (!$new_status_id) { + $this->writeToMollieLog("The payment has been received/authorised. No 'processing' status ID is configured, so the order status could not be updated.", true); + return; + } + $this->addOrderHistory($order, $new_status_id, $this->language->get("response_success"), true); + $this->writeToMollieLog("The payment was received/authorised and the order was moved to the 'processing' status (new status ID: {$new_status_id}.", true); + return; + } + + // Order cancelled. + if ($mollieOrder->status == PaymentStatus::STATUS_CANCELED) { + $new_status_id = intval($this->config->get($moduleCode . "_ideal_canceled_status_id")); + + if (!$new_status_id) { + $this->writeToMollieLog("The payment was cancelled. No 'cancelled' status ID is configured, so the order status could not be updated.", true); + return; + } + $this->addOrderHistory($order, $new_status_id, $this->language->get("response_cancelled"), false); + $this->writeToMollieLog("The payment was cancelled and the order was moved to the 'cancelled' status (new status ID: {$new_status_id}).", true); + return; + } + + // Order expired. + if ($mollieOrder->status == PaymentStatus::STATUS_EXPIRED) { + $new_status_id = intval($this->config->get($moduleCode . "_ideal_expired_status_id")); + + if (!$new_status_id) { + $this->writeToMollieLog("The payment expired. No 'expired' status ID is configured, so the order status could not be updated.", true); + return; + } + $this->addOrderHistory($order, $new_status_id, $this->language->get("response_expired"), false); + $this->writeToMollieLog("The payment expired and the order was moved to the 'expired' status (new status ID: {$new_status_id}).", true); + return; + } + + // Otherwise, order failed. + $new_status_id = intval($this->config->get($moduleCode . "_ideal_failed_status_id")); + + if (!$new_status_id) { + $this->writeToMollieLog("The payment failed. No 'failed' status ID is configured, so the order status could not be updated.", true); + return; + } + $this->addOrderHistory($order, $new_status_id, $this->language->get("response_unknown"), false); + $this->writeToMollieLog("The payment failed for an unknown reason and the order was moved to the 'failed' status (new status ID: {$new_status_id}).", true); + return; + + } + + /** + * Gets called via AJAX from the checkout form to store the selected issuer. + */ + public function set_issuer() + { + if (!empty($this->request->post['mollie_issuer_id'])) { + $this->session->data['mollie_issuer'] = $this->request->post['mollie_issuer_id']; + } else { + $this->session->data['mollie_issuer'] = null; + } + + echo $this->session->data['mollie_issuer']; + } + + /** + * Retrieve the issuer if one was selected. Return null otherwise. + * + * @return string|null + */ + protected function getIssuer() + { + if (!empty(Util::request()->post()->mollie_issuer)) { + return Util::request()->post()->mollie_issuer; + } + + if (!empty($this->session->data['mollie_issuer'])) { + return $this->session->data['mollie_issuer']; + } + + return null; + } + + //Create shipment after the order reach to a specific status + public function createShipment(&$route, &$data, $orderID = "", $orderStatusID = "") { + + if (!empty($data)) { + $order_id = $data[0]; + $order_status_id = $data[1]; + } + else { + $order_id = $orderID; + $order_status_id = $orderStatusID; + } + + $moduleCode = MollieHelper::getModuleCode(); + + if (Util::version()->isMaximal("1.5.6.4")) { + $orderModel = Util::load()->model("sale/order"); + $mollieModel = $orderModel; + } + else { + $orderModel = Util::load()->model("checkout/order"); + $mollieModel = Util::load()->model('payment/mollie/base'); + } + + Util::load()->language("payment/mollie"); + + //Get order_id of this transaction from db + $order = $orderModel->getOrder($order_id); + if (empty($order)) { + header("HTTP/1.0 404 Not Found"); + echo "Could not find order."; + return; + } + + $mollie_order_id = $mollieModel->getOrderID($order_id); + if (empty($mollie_order_id)) { + $this->writeToMollieLog("Could not find mollie reference order id."); + return; + } + + /*Check if shipment is not created already at the time of order creation + $this->config->get($moduleCode . "_create_shipment") + -> '!= 1' (Shipment is not created already) + -> '== 2' (Shipment needs to be created after one of the statuses set in the module setting) + -> else, (Shipment needs to be created after one of the 'Order Complete Statuses' set in the store setting) + */ + + $mollieOrder = $this->getAPIClient()->orders->get($mollie_order_id); + if($mollieOrder->isAuthorized() && ($this->config->get($moduleCode . "_create_shipment") != 1)) { + if($this->config->get($moduleCode . "_create_shipment") == 2) { + $shipment_status_id = $this->config->get($moduleCode . "_create_shipment_status_id"); + } + else { + $order_complete_statuses = array(); + $statuses = $this->config->get('config_complete_status') ?: (array)$this->config->get('config_complete_status_id'); + foreach($statuses as $status_id) { + $order_complete_statuses[] = $status_id; + } + } + + if(((isset($shipment_status_id) && $order_status_id == $shipment_status_id)) || ((isset($order_complete_statuses) && in_array($order_status_id, $order_complete_statuses)))) { + //Shipment lines + $shipmentLine = array(); + foreach($mollieOrder->lines as $line) { + $shipmentLine[] = array( + 'id' => $line->id, + 'quantity' => $line->quantity + ); + } + + $shipmentData['lines'] = $shipmentLine; + $mollieShipment = $mollieOrder->createShipment($shipmentData); + $this->writeToMollieLog("Shipment created for order-".$order_id); + } + } + } + + /** + * Customer returning from the bank with an transaction_id + * Depending on what the state of the payment is they get redirected to the corresponding page + * + * @return string + */ + public function callback() + { + $moduleCode = MollieHelper::getModuleCode(); + $order_id = $this->getOrderID(); + + if ($order_id === false) { + $this->writeToMollieLog("Failed to get order id."); + + return $this->showReturnPage( + $this->language->get("heading_failed"), + $this->language->get("msg_failed") + ); + } + + $order = $this->getOpenCartOrder($order_id); + + if (empty($order)) { + $this->writeToMollieLog("Failed to get order for order id: " . $order_id); + + return $this->showReturnPage( + $this->language->get("heading_failed"), + $this->language->get("msg_failed") + ); + } + + $this->writeToMollieLog("Received callback for order " . $order_id); + + // Load required translations. + Util::load()->language("payment/mollie"); + + // Double-check whether or not the status of the order is correct. + $model = $this->getModuleModel(); + + $paid_status_id = intval($this->config->get($moduleCode . "_ideal_processing_status_id")); + $mollie_order_id = $model->getOrderID($order['order_id']); + + if ($mollie_order_id === false) { + $this->writeToMollieLog("Error getting order id for order " . $order['order_id']); + + return $this->showReturnPage( + $this->language->get("heading_failed"), + $this->language->get("msg_failed") + ); + } + + $orderDetails = $this->getAPIClient()->orders->get($mollie_order_id, ["embed" => "payments"]); + if (($orderDetails->isPaid() || $orderDetails->isAuthorized()) && $order['order_status_id'] != $paid_status_id) { + $this->addOrderHistory($order, $paid_status_id, $this->language->get("response_success"), true); + $order['order_status_id'] = $paid_status_id; + } else if(!empty($orderDetails->_embedded->payments)) { + + $payment = $orderDetails->_embedded->payments[0]; + if (($payment->status == 'paid') && ($order['order_status_id'] != $paid_status_id)) { + $this->addOrderHistory($order, $paid_status_id, $this->language->get("response_success"), true); + $order['order_status_id'] = $paid_status_id; + } + + } + + /* Check module module setting for shipment creation, + $this->config->get($moduleCode . "_create_shipment")) == 1, + satisfies the 'Create shipment immediately after order creation' condition. */ + + if($orderDetails->isAuthorized() && ($this->config->get($moduleCode . "_create_shipment")) == 1) { + //Shipment lines + $shipmentLine = array(); + foreach($orderDetails->lines as $line) { + $shipmentLine[] = array( + 'id' => $line->id, + 'quantity' => $line->quantity + ); + } + + $shipmentData['lines'] = $shipmentLine; + $mollieShipment = $orderDetails->createShipment($shipmentData); + $shipped_status_id = intval($this->config->get($moduleCode . "_ideal_shipping_status_id")); + $this->addOrderHistory($order, $shipped_status_id, $this->language->get("shipment_success"), true); + $this->writeToMollieLog("Shipment created for order-".$order_id); + $order['order_status_id'] = $shipped_status_id; + } + // Show a 'transaction failed' page if we couldn't find the order or if the payment failed. + $failed_status_id = $this->config->get($moduleCode . "_ideal_failed_status_id"); + + if (!$order || ($failed_status_id && $order['order_status_id'] == $failed_status_id)) { + if ($failed_status_id && $order['order_status_id'] == $failed_status_id) { + $this->writeToMollieLog("Error payment failed for order " . $order['order_id']); + } else { + $this->writeToMollieLog("Error couldn't find order"); + } + + return $this->showReturnPage( + $this->language->get("heading_failed"), + $this->language->get("msg_failed") + ); + } + + // If the order status is 'processing' (i.e. 'paid'), redirect to OpenCart's default 'success' page. + if ($order["order_status_id"] == $this->config->get($moduleCode . "_ideal_processing_status_id") || $order["order_status_id"] == $this->config->get($moduleCode . "_ideal_shipping_status_id")) { + $this->writeToMollieLog("Success redirect to success page for order " . $order['order_id']); + + if ($this->cart) { + $this->cart->clear(); + } + + unset($this->session->data['shipping_method']); + unset($this->session->data['shipping_methods']); + unset($this->session->data['payment_method']); + unset($this->session->data['payment_methods']); + unset($this->session->data['guest']); + unset($this->session->data['comment']); + unset($this->session->data['order_id']); + unset($this->session->data['coupon']); + unset($this->session->data['reward']); + unset($this->session->data['voucher']); + unset($this->session->data['vouchers']); + unset($this->session->data['totals']); + + // Redirect to 'success' page. + $this->redirect($this->url->link("checkout/success", "", "SSL")); + return ''; + } + + // If the status is 'pending' (i.e. a bank transfer), the report is not delivered yet. + if ($order['order_status_id'] == $this->config->get($moduleCode . "_ideal_pending_status_id")) { + $this->writeToMollieLog("Unknown payment status for order " . $order['order_id']); + + if ($this->cart) { + $this->cart->clear(); + } + + return $this->showReturnPage( + $this->language->get("heading_unknown"), + $this->language->get("msg_unknown"), + null, + false + ); + } + + // The status is probably 'cancelled'. Allow the admin to redirect their customers back to the shopping cart directly in these cases. + if (!(bool)$this->config->get($moduleCode . "_show_order_canceled_page")) { + $this->redirect($this->url->link("checkout/checkout", "", "SSL")); + } + + // Show a 'transaction failed' page if all else fails. + $this->writeToMollieLog("Everything else failed for order " . $order['order_id']); + + return $this->showReturnPage( + $this->language->get("heading_failed"), + $this->language->get("msg_failed") + ); + } + + /** + * @param &$data + */ + protected function setBreadcrumbs(&$data) + { + $data['breadcrumbs'] = array(); + + $data['breadcrumbs'][] = array( + "href" => $this->url->link("common/home", (isset($this->session->data['token'])) ? "token=" . $this->session->data['token'] : "", "SSL"), + "text" => $this->language->get("text_home"), + "separator" => false, + ); + } + + /** + * @param $message + * + * @return string + */ + protected function showErrorPage($message) + { + Util::load()->language("payment/mollie"); + + $this->log->write("Error setting up transaction with Mollie: {$message}."); + + return $this->showReturnPage( + $this->language->get("heading_error"), + $this->language->get("text_error"), + $message + ); + } + + /** + * Render a return page. + * + * @param string $title The title of the status page. + * @param string $body The status message. + * @param string|null $api_error Show an API error, if applicable. + * @param bool $show_retry_button Show a retry button that redirects the customer back to the checkout page. + * + * @return string + */ + protected function showReturnPage($title, $body, $api_error = null, $show_retry_button = true) + { + Util::load()->language("payment/mollie"); + + $data['message_title'] = $title; + $data['message_text'] = $body; + + if ($api_error) { + $data['mollie_error'] = $api_error; + } + + if ($show_retry_button) { + $data['checkout_url'] = $this->url->link("checkout/checkout", "", "SSL"); + $data['button_retry'] = $this->language->get("button_retry"); + } + + $this->document->setTitle($this->language->get("ideal_title")); + + $this->setBreadcrumbs($data); + + return $this->renderTemplate("mollie_return", $data, array( + "column_left", + "column_right", + "content_top", + "content_bottom", + "footer", + "header", + )); + } + + /** + * We check for and remove the admin url in the webhook link. + * + * @return string|null + */ + public function getWebhookUrl() + { + $system_webhook_url = $this->url->link("payment/mollie_" . static::MODULE_NAME . "/webhook", "", "SSL"); + + if (strpos($system_webhook_url, $this->getAdminDirectory()) !== false) { + return str_replace($this->getAdminDirectory(), "", $system_webhook_url); + } + + return $system_webhook_url ? $system_webhook_url : null; + } + + /** + * Retrieves the admin directoryname from the catalog and admin urls. + * + * @return string + */ + protected function getAdminDirectory() + { + // if no default admin URL defined in the config, use the default admin directory. + if (!defined('HTTP_ADMIN')) { + return "admin/"; + } + + return str_replace(HTTP_SERVER, "", HTTP_ADMIN); + } + + /** + * Map payment status history handling for different Opencart versions. + * + * @param array $order + * @param int|string $order_status_id + * @param string $comment + * @param bool $notify + */ + protected function addOrderHistory($order, $order_status_id, $comment = "", $notify = false) + { + if (MollieHelper::isOpenCart2x()) { + $this->model_checkout_order->addOrderHistory($order['order_id'], $order_status_id, $comment, $notify); + } else { + if (empty($order['order_status_id'])) { + $this->model_checkout_order->confirm($order['order_id'], $order_status_id, $comment, $notify); + } else { + $this->model_checkout_order->update($order['order_id'], $order_status_id, $comment, $notify); + } + } + } + + /** + * Map template handling for different Opencart versions. + * + * @param string $template + * @param array $data + * @param array $common_children + * @param bool $echo + * @return string + */ + protected function renderTemplate($template, $data, $common_children = array(), $echo = true) + { + if(Util::version()->isMaximal("1.5.6.4")) { + if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/' . $template . '.tpl')) { + $template = $this->config->get('config_template') . '/template/payment/' . $template; + } else { + $template = 'default/template/payment/' . $template; + } + } + else { + $template = 'payment/' . $template; + } + + if (MollieHelper::isOpenCart2x()) { + foreach ($common_children as $child) { + $data[$child] = Util::load()->controller("common/" . $child); + } + + $html = Util::load()->view($template, $data); + + } else { + $this->template = $template . '.tpl'; + $this->children = array(); + + foreach ($data as $field => $value) { + $this->data[$field] = $value; + } + + foreach ($common_children as $child) { + if ($child === 'column_left') { + continue; + } + + $this->children[] = "common/" . $child; + } + + $html = $this->render(); + } + + if ($echo) { + return $this->response->setOutput($html); + } + + return $html; + } + + /** + * @param string $url + * @param int $status + */ + protected function redirect($url, $status = 302) + { + $this->response->redirect($url, $status); + } +} diff --git a/catalog/controller/payment/mollie/helper.php b/catalog/controller/payment/mollie/helper.php new file mode 100644 index 00000000..57a6be86 --- /dev/null +++ b/catalog/controller/payment/mollie/helper.php @@ -0,0 +1,150 @@ +setApiKey($config->get(self::getModuleCode() . '_api_key')); + + $mollie->addVersionString("OpenCart/" . VERSION); + $mollie->addVersionString("MollieOpenCart/" . self::PLUGIN_VERSION); + + self::$api_client = $mollie; + } + + return self::$api_client; + } + + /** + * Get the Mollie client. Needs the Config array for multishop to retrieve the API key. + * + * @param array $config + * + * @return MollieApiClient + */ + public static function getAPIClientAdmin ($config) + { + require_once(realpath(DIR_SYSTEM . "/..") . "/catalog/controller/payment/mollie-api-client/vendor/autoload.php"); + $mollie = new MollieApiClient; + + $mollie->setApiKey(isset($config[self::getModuleCode() . '_api_key']) ? $config[self::getModuleCode() . '_api_key'] : null); + + $mollie->addVersionString("OpenCart/" . VERSION); + $mollie->addVersionString("MollieOpenCart/" . self::PLUGIN_VERSION); + + return $mollie; + } + + public static function getAPIClientForKey($key = null) + { + require_once(realpath(DIR_SYSTEM . "/..") . "/catalog/controller/payment/mollie-api-client/vendor/autoload.php"); + $mollie = new MollieApiClient; + + $mollie->setApiKey(!empty($key) ? $key : null); + + $mollie->addVersionString("OpenCart/" . VERSION); + $mollie->addVersionString("MollieOpenCart/" . self::PLUGIN_VERSION); + + return $mollie; + } + + /** + * @return string + */ + public static function getModuleCode() + { + return Util::info()->getModuleCode('mollie', 'payment'); + } + + /** + * @return bool + */ + public static function isOpenCart3x() + { + return Util::version()->isMinimal('3.0.0'); + } + + /** + * @return bool + */ + public static function isOpenCart23x() + { + return Util::version()->isMinimal('2.3.0'); + } + + /** + * @return bool + */ + public static function isOpenCart2x() + { + return Util::version()->isMinimal('2'); + } +} diff --git a/catalog/controller/payment/mollie_bancontact.php b/catalog/controller/payment/mollie_bancontact.php new file mode 100644 index 00000000..98fc8a70 --- /dev/null +++ b/catalog/controller/payment/mollie_bancontact.php @@ -0,0 +1,7 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +/** + * German language file for iDEAL by Mollie + */ + +// Text +$_['heading_title'] = 'Zahlung via Mollie'; +$_['ideal_title'] = 'Ihre Zahlung'; +$_['text_title'] = 'Online bezahlen'; +$_['text_redirected'] = 'Der Kunde wurde auf den Zahlungs-Bildschirm umgeleitet'; +$_['text_issuer_ideal'] = 'Wählen Sie Ihre Bank'; +$_['text_issuer_giftcard'] = 'Wählen Sie Ihre Giftcard'; +$_['text_issuer_kbc'] = 'Wählen Sie Ihren Bezahl-Button'; +$_['button_retry'] = 'Erneut versuchen, abzurechnen'; + +// Status page: payment failed (e.g. cancelled). +$_['heading_failed'] = 'Ihre Zahlung ist nicht abgeschlossen'; +$_['msg_failed'] = 'Leider ist die Zahlung fehlgeschlagen. Klicken Sie auf die folgende Schaltfläche, um zum Abrechnungs-Bildschirm zurückzukehren.'; + +// Status page: payment pending. +$_['heading_unknown'] = 'Wir warten noch auf Ihre Zahlung'; +$_['msg_unknown'] = 'Wir haben Ihre Zahlung noch nicht erhalten. Wir werden eine Bestätigungsmail verschicken, sobald die Zahlung eingegangen ist.'; + +// Status page: API failure. +$_['heading_error'] = 'Beim Erstellen der Zahlung ist ein Fehler aufgetreten'; +$_['text_error'] = 'Beim Erstellen der Zahlung bei Mollie ist ein Fehler aufgetreten. Klicken Sie auf die folgende Schaltfläche, um zum Abrechnungs-Bildschirm zurückzukehren.'; + +// Response +$_['response_success'] = 'Die Zahlung wurde erhalten'; +$_['response_none'] = 'Wir warten noch auf die Zahlung. Sie erhalten eine E-Mail, sobald uns der Status Ihrer Zahlung bekannt ist.'; +$_['response_cancelled'] = 'Der Kunde hat die Zahlung annulliert'; +$_['response_failed'] = 'Die Zahlung ist leider fehlgeschlagen. Versuchen Sie es bitte erneut.'; +$_['response_expired'] = 'Die Zahlung ist verstrichen'; +$_['response_unknown'] = 'Es ist ein unbekannter Fehler aufgetreten'; +$_['shipment_success'] = 'Sendung wird erstellt'; + +// Methods +$_['method_ideal'] = 'iDEAL'; +$_['method_creditcard'] = 'Creditcard'; +$_['method_mistercash'] = 'Bancontact'; +$_['method_banktransfer'] = 'Übertragung'; +$_['method_directdebit'] = 'Einmaliges Inkasso'; +$_['method_belfius'] = 'Belfius Direct Net'; +$_['method_kbc'] = 'KBC/CBC-Betaalknop'; +$_['method_sofort'] = 'SOFORT Banking'; +$_['method_paypal'] = 'PayPal'; +$_['method_paysafecard'] = 'paysafecard'; +$_['method_giftcard'] = 'Giftcard'; +$_['method_inghomepay'] = 'ING Home\'Pay'; +$_['method_eps'] = 'EPS'; +$_['method_giropay'] = 'Giropay'; +$_['method_klarnapaylater'] = 'Klarna Pay Later'; +$_['method_klarnasliceit'] = 'Klarna Slice It'; +$_['method_przelewy24'] = 'P24'; + +//Round Off Description +$_['roundoff_description'] = 'Rundungsdifferenzen aufgrund von Währungsumrechnungen'; diff --git a/catalog/language/dutch/extension/payment/mollie.php b/catalog/language/dutch/extension/payment/mollie.php index 2b708927..a37572d0 100644 --- a/catalog/language/dutch/extension/payment/mollie.php +++ b/catalog/language/dutch/extension/payment/mollie.php @@ -1,77 +1,2 @@ - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -/** - * Dutch language file for iDEAL by Mollie - */ - -// Text -$_['heading_title'] = 'Betaling via Mollie'; -$_['ideal_title'] = 'Uw betaling'; -$_['text_title'] = 'Online betalen'; -$_['text_redirected'] = 'De klant is doorgestuurd naar het betaalscherm'; -$_['text_issuer'] = 'Kies uw bank'; -$_['button_retry'] = 'Opnieuw proberen af te rekenen'; - -// Status page: payment failed (e.g. cancelled). -$_['heading_failed'] = 'Uw betaling is niet voltooid'; -$_['msg_failed'] = 'Helaas is de betaling mislukt. Klik op onderstaande knop om terug te keren naar het afrekenscherm.'; - -// Status page: payment pending. -$_['heading_unknown'] = 'We wachten nog op uw betaling'; -$_['msg_unknown'] = 'We hebben uw betaling nog niet ontvangen. Wij zullen een bevestigingsmail versturen op het moment dat de betaling binnen is.'; - -// Status page: API failure. -$_['heading_error'] = 'Er is een fout opgetreden bij het opzetten van de betaling'; -$_['text_error'] = 'Er is een fout opgetreden bij het opzetten van de betaling bij Mollie. Klik op onderstaande knop om terug te keren naar het afrekenscherm.'; - -// Response -$_['response_success'] = 'De betaling is ontvangen'; -$_['response_none'] = 'We wachten nog op de betaling. U krijgt een email zodra de status van de betaling bij ons bekend is.'; -$_['response_cancelled'] = 'De klant heeft de betaling geannuleerd'; -$_['response_failed'] = 'De betaling is helaas mislukt. Probeer het alstublieft opnieuw.'; -$_['response_expired'] = 'De betaling is verlopen'; -$_['response_unknown'] = 'Er is een onbekende fout opgetreden'; - -// Methods -$_['method_ideal'] = 'iDEAL'; -$_['method_creditcard'] = 'Creditcard'; -$_['method_mistercash'] = 'Mister Cash'; -$_['method_banktransfer'] = 'Overboeking'; -$_['method_directdebit'] = 'Eenmalige incasso'; -$_['method_belfius'] = 'Belfius Direct Net'; -$_['method_kbc'] = 'KBC/CBC-Betaalknop'; -$_['method_bitcoin'] = 'Bitcoin'; -$_['method_sofort'] = 'SOFORT Banking'; -$_['method_paypal'] = 'PayPal'; -$_['method_paysafecard'] = 'paysafecard'; \ No newline at end of file + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/catalog/language/dutch/payment/mollie.php b/catalog/language/dutch/payment/mollie.php new file mode 100644 index 00000000..6278f6f0 --- /dev/null +++ b/catalog/language/dutch/payment/mollie.php @@ -0,0 +1,89 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +/** + * Dutch language file for iDEAL by Mollie + */ + +// Text +$_['heading_title'] = 'Betaling via Mollie'; +$_['ideal_title'] = 'Uw betaling'; +$_['text_title'] = 'Online betalen'; +$_['text_redirected'] = 'De klant is doorgestuurd naar het betaalscherm'; +$_['text_issuer_ideal'] = 'Kies uw bank'; +$_['text_issuer_giftcard'] = 'Kies uw giftcard'; +$_['text_issuer_kbc'] = 'Kies uw betaalknop'; +$_['button_retry'] = 'Opnieuw proberen af te rekenen'; + +// Status page: payment failed (e.g. cancelled). +$_['heading_failed'] = 'Uw betaling is niet voltooid'; +$_['msg_failed'] = 'Helaas is de betaling mislukt. Klik op onderstaande knop om terug te keren naar het afrekenscherm.'; + +// Status page: payment pending. +$_['heading_unknown'] = 'We wachten nog op uw betaling'; +$_['msg_unknown'] = 'We hebben uw betaling nog niet ontvangen. Wij zullen een bevestigingsmail versturen op het moment dat de betaling binnen is.'; + +// Status page: API failure. +$_['heading_error'] = 'Er is een fout opgetreden bij het opzetten van de betaling'; +$_['text_error'] = 'Er is een fout opgetreden bij het opzetten van de betaling bij Mollie. Klik op onderstaande knop om terug te keren naar het afrekenscherm.'; + +// Response +$_['response_success'] = 'De betaling is ontvangen'; +$_['response_none'] = 'We wachten nog op de betaling. U krijgt een email zodra de status van de betaling bij ons bekend is.'; +$_['response_cancelled'] = 'De klant heeft de betaling geannuleerd'; +$_['response_failed'] = 'De betaling is helaas mislukt. Probeer het alstublieft opnieuw.'; +$_['response_expired'] = 'De betaling is verlopen'; +$_['response_unknown'] = 'Er is een onbekende fout opgetreden'; +$_['shipment_success'] = 'Zending is gemaakt'; + +// Methods +$_['method_ideal'] = 'iDEAL'; +$_['method_creditcard'] = 'Creditcard'; +$_['method_bancontact'] = 'Bancontact'; +$_['method_banktransfer'] = 'Overboeking'; +$_['method_directdebit'] = 'Eenmalige incasso'; +$_['method_belfius'] = 'Belfius Direct Net'; +$_['method_kbc'] = 'KBC/CBC-Betaalknop'; +$_['method_sofort'] = 'SOFORT Banking'; +$_['method_paypal'] = 'PayPal'; +$_['method_paysafecard'] = 'paysafecard'; +$_['method_giftcard'] = 'Giftcard'; +$_['method_inghomepay'] = 'ING Home\'Pay'; +$_['method_eps'] = 'EPS'; +$_['method_giropay'] = 'Giropay'; +$_['method_klarnapaylater'] = 'Klarna Pay Later'; +$_['method_klarnasliceit'] = 'Klarna Slice It'; +$_['method_przelewy24'] = 'P24'; + +//Round Off Description +$_['roundoff_description'] = 'Afrondingsverschil door valutaomrekening'; diff --git a/catalog/language/en-gb/extension/payment/mollie.php b/catalog/language/en-gb/extension/payment/mollie.php index d506d917..a37572d0 100644 --- a/catalog/language/en-gb/extension/payment/mollie.php +++ b/catalog/language/en-gb/extension/payment/mollie.php @@ -1,77 +1,2 @@ - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -/** - * English language file for iDEAL by Mollie - */ - -// Text -$_['heading_title'] = 'Payment by Mollie'; -$_['ideal_title'] = 'Your payment'; -$_['text_title'] = 'Pay online'; -$_['text_redirected'] = 'The client has been referred to the payment screen'; -$_['text_issuer'] = 'Select your bank'; -$_['button_retry'] = 'Return to checkout page'; - -// Status page: payment failed (e.g. cancelled). -$_['heading_failed'] = 'Your payment has not been completed'; -$_['msg_failed'] = 'Unfortunately your payment has failed. Please click the button below to return to the checkout page and retry setting up a payment.'; - -// Status page: payment pending. -$_['heading_unknown'] = 'Your payment is pending'; -$_['msg_unknown'] = 'Your payment has not been received yet. We will send you a confirmation email the moment the payment is received.'; - -// Status page: API failure. -$_['heading_error'] = 'An error occurred when setting up the payment'; -$_['text_error'] = 'An error occurred when setting up the payment with Mollie. Click the button below to return to the checkout page.'; - -// Response -$_['response_success'] = 'The payment is received'; -$_['response_none'] = 'The payment is not received yet'; -$_['response_cancelled'] = 'The client has canceled the payment'; -$_['response_failed'] = 'Unfortunately something went wrong. Please retry the payment.'; -$_['response_expired'] = 'The payment has expired'; -$_['response_unknown'] = 'An unknown error occurred'; - -// Methods -$_['method_ideal'] = 'iDEAL'; -$_['method_creditcard'] = 'Creditcard'; -$_['method_mistercash'] = 'Mister Cash'; -$_['method_banktransfer'] = 'Bank transfer'; -$_['method_directdebit'] = 'Direct debit'; -$_['method_belfius'] = 'Belfius Direct Net'; -$_['method_kbc'] = 'KBC/CBC Payment Button'; -$_['method_bitcoin'] = 'Bitcoin'; -$_['method_sofort'] = 'SOFORT Banking'; -$_['method_paypal'] = 'PayPal'; -$_['method_paysafecard'] = 'paysafecard'; \ No newline at end of file + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/catalog/language/en-gb/payment/mollie.php b/catalog/language/en-gb/payment/mollie.php new file mode 100644 index 00000000..f0d378f6 --- /dev/null +++ b/catalog/language/en-gb/payment/mollie.php @@ -0,0 +1,89 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +/** + * English language file for iDEAL by Mollie + */ + +// Text +$_['heading_title'] = 'Payment by Mollie'; +$_['ideal_title'] = 'Your payment'; +$_['text_title'] = 'Pay online'; +$_['text_redirected'] = 'The client has been referred to the payment screen'; +$_['text_issuer_ideal'] = 'Select your bank'; +$_['text_issuer_giftcard'] = 'Select your giftcard'; +$_['text_issuer_kbc'] = 'Select your payment button.'; +$_['button_retry'] = 'Return to checkout page'; + +// Status page: payment failed (e.g. cancelled). +$_['heading_failed'] = 'Your payment has not been completed'; +$_['msg_failed'] = 'Unfortunately your payment has failed. Please click the button below to return to the checkout page and retry setting up a payment.'; + +// Status page: payment pending. +$_['heading_unknown'] = 'Your payment is pending'; +$_['msg_unknown'] = 'Your payment has not been received yet. We will send you a confirmation email the moment the payment is received.'; + +// Status page: API failure. +$_['heading_error'] = 'An error occurred when setting up the payment'; +$_['text_error'] = 'An error occurred when setting up the payment with Mollie. Click the button below to return to the checkout page.'; + +// Response +$_['response_success'] = 'The payment is received'; +$_['response_none'] = 'The payment is not received yet'; +$_['response_cancelled'] = 'The client has canceled the payment'; +$_['response_failed'] = 'Unfortunately something went wrong. Please retry the payment.'; +$_['response_expired'] = 'The payment has expired'; +$_['response_unknown'] = 'An unknown error occurred'; +$_['shipment_success'] = 'Shipment is created'; + +// Methods +$_['method_ideal'] = 'iDEAL'; +$_['method_creditcard'] = 'Creditcard'; +$_['method_bancontact'] = 'Bancontact'; +$_['method_banktransfer'] = 'Bank transfer'; +$_['method_directdebit'] = 'Direct debit'; +$_['method_belfius'] = 'Belfius Direct Net'; +$_['method_kbc'] = 'KBC/CBC Payment Button'; +$_['method_sofort'] = 'SOFORT Banking'; +$_['method_paypal'] = 'PayPal'; +$_['method_paysafecard'] = 'paysafecard'; +$_['method_giftcard'] = 'Giftcard'; +$_['method_inghomepay'] = 'ING Home\'Pay'; +$_['method_eps'] = 'EPS'; +$_['method_giropay'] = 'Giropay'; +$_['method_klarnapaylater'] = 'Klarna Pay Later'; +$_['method_klarnasliceit'] = 'Klarna Slice It'; +$_['method_przelewy24'] = 'P24'; + +//Round Off Description +$_['roundoff_description'] = 'Rounding difference due to currency conversion'; diff --git a/catalog/language/english/extension/payment/mollie.php b/catalog/language/english/extension/payment/mollie.php index d506d917..a37572d0 100644 --- a/catalog/language/english/extension/payment/mollie.php +++ b/catalog/language/english/extension/payment/mollie.php @@ -1,77 +1,2 @@ - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -/** - * English language file for iDEAL by Mollie - */ - -// Text -$_['heading_title'] = 'Payment by Mollie'; -$_['ideal_title'] = 'Your payment'; -$_['text_title'] = 'Pay online'; -$_['text_redirected'] = 'The client has been referred to the payment screen'; -$_['text_issuer'] = 'Select your bank'; -$_['button_retry'] = 'Return to checkout page'; - -// Status page: payment failed (e.g. cancelled). -$_['heading_failed'] = 'Your payment has not been completed'; -$_['msg_failed'] = 'Unfortunately your payment has failed. Please click the button below to return to the checkout page and retry setting up a payment.'; - -// Status page: payment pending. -$_['heading_unknown'] = 'Your payment is pending'; -$_['msg_unknown'] = 'Your payment has not been received yet. We will send you a confirmation email the moment the payment is received.'; - -// Status page: API failure. -$_['heading_error'] = 'An error occurred when setting up the payment'; -$_['text_error'] = 'An error occurred when setting up the payment with Mollie. Click the button below to return to the checkout page.'; - -// Response -$_['response_success'] = 'The payment is received'; -$_['response_none'] = 'The payment is not received yet'; -$_['response_cancelled'] = 'The client has canceled the payment'; -$_['response_failed'] = 'Unfortunately something went wrong. Please retry the payment.'; -$_['response_expired'] = 'The payment has expired'; -$_['response_unknown'] = 'An unknown error occurred'; - -// Methods -$_['method_ideal'] = 'iDEAL'; -$_['method_creditcard'] = 'Creditcard'; -$_['method_mistercash'] = 'Mister Cash'; -$_['method_banktransfer'] = 'Bank transfer'; -$_['method_directdebit'] = 'Direct debit'; -$_['method_belfius'] = 'Belfius Direct Net'; -$_['method_kbc'] = 'KBC/CBC Payment Button'; -$_['method_bitcoin'] = 'Bitcoin'; -$_['method_sofort'] = 'SOFORT Banking'; -$_['method_paypal'] = 'PayPal'; -$_['method_paysafecard'] = 'paysafecard'; \ No newline at end of file + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/catalog/language/english/payment/mollie.php b/catalog/language/english/payment/mollie.php new file mode 100644 index 00000000..f0d378f6 --- /dev/null +++ b/catalog/language/english/payment/mollie.php @@ -0,0 +1,89 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +/** + * English language file for iDEAL by Mollie + */ + +// Text +$_['heading_title'] = 'Payment by Mollie'; +$_['ideal_title'] = 'Your payment'; +$_['text_title'] = 'Pay online'; +$_['text_redirected'] = 'The client has been referred to the payment screen'; +$_['text_issuer_ideal'] = 'Select your bank'; +$_['text_issuer_giftcard'] = 'Select your giftcard'; +$_['text_issuer_kbc'] = 'Select your payment button.'; +$_['button_retry'] = 'Return to checkout page'; + +// Status page: payment failed (e.g. cancelled). +$_['heading_failed'] = 'Your payment has not been completed'; +$_['msg_failed'] = 'Unfortunately your payment has failed. Please click the button below to return to the checkout page and retry setting up a payment.'; + +// Status page: payment pending. +$_['heading_unknown'] = 'Your payment is pending'; +$_['msg_unknown'] = 'Your payment has not been received yet. We will send you a confirmation email the moment the payment is received.'; + +// Status page: API failure. +$_['heading_error'] = 'An error occurred when setting up the payment'; +$_['text_error'] = 'An error occurred when setting up the payment with Mollie. Click the button below to return to the checkout page.'; + +// Response +$_['response_success'] = 'The payment is received'; +$_['response_none'] = 'The payment is not received yet'; +$_['response_cancelled'] = 'The client has canceled the payment'; +$_['response_failed'] = 'Unfortunately something went wrong. Please retry the payment.'; +$_['response_expired'] = 'The payment has expired'; +$_['response_unknown'] = 'An unknown error occurred'; +$_['shipment_success'] = 'Shipment is created'; + +// Methods +$_['method_ideal'] = 'iDEAL'; +$_['method_creditcard'] = 'Creditcard'; +$_['method_bancontact'] = 'Bancontact'; +$_['method_banktransfer'] = 'Bank transfer'; +$_['method_directdebit'] = 'Direct debit'; +$_['method_belfius'] = 'Belfius Direct Net'; +$_['method_kbc'] = 'KBC/CBC Payment Button'; +$_['method_sofort'] = 'SOFORT Banking'; +$_['method_paypal'] = 'PayPal'; +$_['method_paysafecard'] = 'paysafecard'; +$_['method_giftcard'] = 'Giftcard'; +$_['method_inghomepay'] = 'ING Home\'Pay'; +$_['method_eps'] = 'EPS'; +$_['method_giropay'] = 'Giropay'; +$_['method_klarnapaylater'] = 'Klarna Pay Later'; +$_['method_klarnasliceit'] = 'Klarna Slice It'; +$_['method_przelewy24'] = 'P24'; + +//Round Off Description +$_['roundoff_description'] = 'Rounding difference due to currency conversion'; diff --git a/catalog/language/es-es/extension/payment/mollie.php b/catalog/language/es-es/extension/payment/mollie.php new file mode 100644 index 00000000..a37572d0 --- /dev/null +++ b/catalog/language/es-es/extension/payment/mollie.php @@ -0,0 +1,2 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +/** + * Spanish language file for iDEAL by Mollie + */ + +// Text +$_['heading_title'] = 'Pago a través de Mollie'; +$_['ideal_title'] = 'su pago'; +$_['text_title'] = 'Pagar en línea'; +$_['text_redirected'] = 'El cliente ha sido redirigido a la pantalla de pago'; +$_['text_issuer_ideal'] = 'Seleccione su banco'; +$_['text_issuer_giftcard'] = 'Seleccione su tarjeta regalo'; +$_['text_issuer_kbc'] = 'Seleccione su botón de pago'; +$_['button_retry'] = 'Intente pagar de nuevo'; + +// Status page: payment failed (e.g. cancelled). +$_['heading_failed'] = 'Su pago no se ha completado'; +$_['msg_failed'] = 'Lamentablemente, no se ha efectuado el pago. Haga clic en el siguiente botón para volver a la pantalla de pago.'; + +// Status page: payment pending. +$_['heading_unknown'] = 'Seguimos esperando su pago'; +$_['msg_unknown'] = 'Aún no hemos recibido su pago. Le enviaremos un correo electrónico de confirmación tan pronto como recibamos el pago.'; + +// Status page: API failure. +$_['heading_error'] = 'Se ha producido un error en la configuración del pago'; +$_['text_error'] = 'Se ha producido un error en la configuración del pago en Mollie. Haga clic en el siguiente botón para volver a la pantalla de pago.'; + +// Response +$_['response_success'] = 'El pago ha sido recibido'; +$_['response_none'] = 'Seguimos esperando el pago. Recibirá un correo electrónico tan pronto como sepamos el estado del pago.'; +$_['response_cancelled'] = 'El cliente ha cancelado el pago'; +$_['response_failed'] = 'Lamentablemente, no se ha efectuado el pago. Por favor, inténtelo de nuevo.'; +$_['response_expired'] = 'El pago ha caducado'; +$_['response_unknown'] = 'Se ha producido un error desconocido'; +$_['shipment_success'] = 'Se crea el envio'; + +// Methods +$_['method_ideal'] = 'iDEAL'; +$_['method_creditcard'] = 'Creditcard'; +$_['method_mistercash'] = 'Bancontact'; +$_['method_banktransfer'] = 'Transferencia bancaria'; +$_['method_directdebit'] = 'Adeudo bancario'; +$_['method_belfius'] = 'Belfius Direct Net'; +$_['method_kbc'] = 'KBC/CBC-Betaalknop'; +$_['method_sofort'] = 'SOFORT Banking'; +$_['method_paypal'] = 'PayPal'; +$_['method_paysafecard'] = 'paysafecard'; +$_['method_giftcard'] = 'Giftcard'; +$_['method_inghomepay'] = 'ING Home\'Pay'; +$_['method_eps'] = 'EPS'; +$_['method_giropay'] = 'Giropay'; +$_['method_klarnapaylater'] = 'Klarna Pay Later'; +$_['method_klarnasliceit'] = 'Klarna Slice It'; +$_['method_przelewy24'] = 'P24'; + +//Round Off Description +$_['roundoff_description'] = ' Diferencia de redondeo por conversión de moneda'; diff --git a/catalog/language/fr-fr/extension/payment/mollie.php b/catalog/language/fr-fr/extension/payment/mollie.php index 5a0e2c18..a37572d0 100644 --- a/catalog/language/fr-fr/extension/payment/mollie.php +++ b/catalog/language/fr-fr/extension/payment/mollie.php @@ -1,77 +1,2 @@ - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -/** - * English language file for iDEAL by Mollie - */ - -// Text -$_['heading_title'] = 'Paiement par Mollie'; -$_['ideal_title'] = 'Votre paiement'; -$_['text_title'] = 'Payez en ligne'; -$_['text_redirected'] = 'Le client a été renvoyé à l\'écran de paiement'; -$_['text_issuer'] = 'Selectionnez votre banque:'; -$_['button_retry'] = 'Retour à la page de paiement'; - -// Status page: payment failed (e.g. cancelled). -$_['heading_failed'] = 'Votre paiement n\'a pas été achevée'; -$_['msg_failed'] = 'Malheureusement, votre paiement est échoué.'; - -// Status page: payment pending. -$_['heading_unknown'] = 'Votre paiement est en attente'; -$_['msg_unknown'] = 'Votre paiement n\'a pas encore été reçu. Nous vous enverrons un e-mail de confirmation au moment où le paiement est reçu.'; - -// Status page: API failure. -$_['heading_error'] = 'Une erreur s\'est produite lors de la mise en place du paiement'; -$_['text_error'] = 'Une erreur s\'est produite lors de la mise en place du paiement avec Mollie:'; - -// Response -$_['response_success'] = 'Le paiement est reçu'; -$_['response_none'] = 'Le paiement n\'est pas encore reçu'; -$_['response_cancelled'] = 'Le client a annulé le paiement'; -$_['response_failed'] = 'Malheureusement une erreur s\'est produite. S\'il vous plaît réessayer le paiement.'; -$_['response_expired'] = 'Le paiement a expiré'; -$_['response_unknown'] = 'Une erreur inconnue s\'est produite'; - -// Methods -$_['method_ideal'] = 'iDEAL'; -$_['method_creditcard'] = 'Creditcard'; -$_['method_mistercash'] = 'Mister Cash'; -$_['method_banktransfer'] = 'Bank transfer'; -$_['method_directdebit'] = 'Bank transfer'; -$_['method_belfius'] = 'Belfius Direct Net'; -$_['method_kbc'] = "Bouton de paiement KBC/CBC"; -$_['method_bitcoin'] = 'Bitcoin'; -$_['method_sofort'] = 'SOFORT Banking'; -$_['method_paypal'] = 'PayPal'; -$_['method_paysafecard'] = 'paysafecard'; \ No newline at end of file + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/catalog/language/fr-fr/payment/mollie.php b/catalog/language/fr-fr/payment/mollie.php new file mode 100644 index 00000000..97e84312 --- /dev/null +++ b/catalog/language/fr-fr/payment/mollie.php @@ -0,0 +1,89 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +/** + * English language file for iDEAL by Mollie + */ + +// Text +$_['heading_title'] = 'Paiement par Mollie'; +$_['ideal_title'] = 'Votre paiement'; +$_['text_title'] = 'Payez en ligne'; +$_['text_redirected'] = 'Le client a été renvoyé à l\'écran de paiement'; +$_['text_issuer_ideal'] = 'Selectionnez votre banque:'; +$_['text_issuer_giftcard'] = 'Sélectionnez votre carte-cadeau:'; +$_['text_issuer_kbc'] = 'Sélectionnez votre bouton de paiement:'; +$_['button_retry'] = 'Retour à la page de paiement'; + +// Status page: payment failed (e.g. cancelled). +$_['heading_failed'] = 'Votre paiement n\'a pas été achevée'; +$_['msg_failed'] = 'Malheureusement, votre paiement est échoué.'; + +// Status page: payment pending. +$_['heading_unknown'] = 'Votre paiement est en attente'; +$_['msg_unknown'] = 'Votre paiement n\'a pas encore été reçu. Nous vous enverrons un e-mail de confirmation au moment où le paiement est reçu.'; + +// Status page: API failure. +$_['heading_error'] = 'Une erreur s\'est produite lors de la mise en place du paiement'; +$_['text_error'] = 'Une erreur s\'est produite lors de la mise en place du paiement avec Mollie:'; + +// Response +$_['response_success'] = 'Le paiement est reçu'; +$_['response_none'] = 'Le paiement n\'est pas encore reçu'; +$_['response_cancelled'] = 'Le client a annulé le paiement'; +$_['response_failed'] = 'Malheureusement une erreur s\'est produite. S\'il vous plaît réessayer le paiement.'; +$_['response_expired'] = 'Le paiement a expiré'; +$_['response_unknown'] = 'Une erreur inconnue s\'est produite'; +$_['shipment_success'] = 'L\'envoi est créé'; + +// Methods +$_['method_ideal'] = 'iDEAL'; +$_['method_creditcard'] = 'Creditcard'; +$_['method_bancontact'] = 'Bancontact'; +$_['method_banktransfer'] = 'Bank transfer'; +$_['method_directdebit'] = 'Bank transfer'; +$_['method_belfius'] = 'Belfius Direct Net'; +$_['method_kbc'] = "Bouton de paiement KBC/CBC"; +$_['method_sofort'] = 'SOFORT Banking'; +$_['method_paypal'] = 'PayPal'; +$_['method_paysafecard'] = 'paysafecard'; +$_['method_giftcard'] = 'Giftcard'; +$_['method_inghomepay'] = 'ING Home\'Pay'; +$_['method_eps'] = 'EPS'; +$_['method_giropay'] = 'Giropay'; +$_['method_klarnapaylater'] = 'Klarna Pay Later'; +$_['method_klarnasliceit'] = 'Klarna Slice It'; +$_['method_przelewy24'] = 'P24'; + +//Round Off Description +$_['roundoff_description'] = 'Dû à la conversion de devise, il se peut qu’il y ait un écart d’arrondi'; diff --git a/catalog/language/french/extension/payment/mollie.php b/catalog/language/french/extension/payment/mollie.php index 5a0e2c18..a37572d0 100644 --- a/catalog/language/french/extension/payment/mollie.php +++ b/catalog/language/french/extension/payment/mollie.php @@ -1,77 +1,2 @@ - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -/** - * English language file for iDEAL by Mollie - */ - -// Text -$_['heading_title'] = 'Paiement par Mollie'; -$_['ideal_title'] = 'Votre paiement'; -$_['text_title'] = 'Payez en ligne'; -$_['text_redirected'] = 'Le client a été renvoyé à l\'écran de paiement'; -$_['text_issuer'] = 'Selectionnez votre banque:'; -$_['button_retry'] = 'Retour à la page de paiement'; - -// Status page: payment failed (e.g. cancelled). -$_['heading_failed'] = 'Votre paiement n\'a pas été achevée'; -$_['msg_failed'] = 'Malheureusement, votre paiement est échoué.'; - -// Status page: payment pending. -$_['heading_unknown'] = 'Votre paiement est en attente'; -$_['msg_unknown'] = 'Votre paiement n\'a pas encore été reçu. Nous vous enverrons un e-mail de confirmation au moment où le paiement est reçu.'; - -// Status page: API failure. -$_['heading_error'] = 'Une erreur s\'est produite lors de la mise en place du paiement'; -$_['text_error'] = 'Une erreur s\'est produite lors de la mise en place du paiement avec Mollie:'; - -// Response -$_['response_success'] = 'Le paiement est reçu'; -$_['response_none'] = 'Le paiement n\'est pas encore reçu'; -$_['response_cancelled'] = 'Le client a annulé le paiement'; -$_['response_failed'] = 'Malheureusement une erreur s\'est produite. S\'il vous plaît réessayer le paiement.'; -$_['response_expired'] = 'Le paiement a expiré'; -$_['response_unknown'] = 'Une erreur inconnue s\'est produite'; - -// Methods -$_['method_ideal'] = 'iDEAL'; -$_['method_creditcard'] = 'Creditcard'; -$_['method_mistercash'] = 'Mister Cash'; -$_['method_banktransfer'] = 'Bank transfer'; -$_['method_directdebit'] = 'Bank transfer'; -$_['method_belfius'] = 'Belfius Direct Net'; -$_['method_kbc'] = "Bouton de paiement KBC/CBC"; -$_['method_bitcoin'] = 'Bitcoin'; -$_['method_sofort'] = 'SOFORT Banking'; -$_['method_paypal'] = 'PayPal'; -$_['method_paysafecard'] = 'paysafecard'; \ No newline at end of file + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/catalog/language/french/payment/mollie.php b/catalog/language/french/payment/mollie.php new file mode 100644 index 00000000..97e84312 --- /dev/null +++ b/catalog/language/french/payment/mollie.php @@ -0,0 +1,89 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +/** + * English language file for iDEAL by Mollie + */ + +// Text +$_['heading_title'] = 'Paiement par Mollie'; +$_['ideal_title'] = 'Votre paiement'; +$_['text_title'] = 'Payez en ligne'; +$_['text_redirected'] = 'Le client a été renvoyé à l\'écran de paiement'; +$_['text_issuer_ideal'] = 'Selectionnez votre banque:'; +$_['text_issuer_giftcard'] = 'Sélectionnez votre carte-cadeau:'; +$_['text_issuer_kbc'] = 'Sélectionnez votre bouton de paiement:'; +$_['button_retry'] = 'Retour à la page de paiement'; + +// Status page: payment failed (e.g. cancelled). +$_['heading_failed'] = 'Votre paiement n\'a pas été achevée'; +$_['msg_failed'] = 'Malheureusement, votre paiement est échoué.'; + +// Status page: payment pending. +$_['heading_unknown'] = 'Votre paiement est en attente'; +$_['msg_unknown'] = 'Votre paiement n\'a pas encore été reçu. Nous vous enverrons un e-mail de confirmation au moment où le paiement est reçu.'; + +// Status page: API failure. +$_['heading_error'] = 'Une erreur s\'est produite lors de la mise en place du paiement'; +$_['text_error'] = 'Une erreur s\'est produite lors de la mise en place du paiement avec Mollie:'; + +// Response +$_['response_success'] = 'Le paiement est reçu'; +$_['response_none'] = 'Le paiement n\'est pas encore reçu'; +$_['response_cancelled'] = 'Le client a annulé le paiement'; +$_['response_failed'] = 'Malheureusement une erreur s\'est produite. S\'il vous plaît réessayer le paiement.'; +$_['response_expired'] = 'Le paiement a expiré'; +$_['response_unknown'] = 'Une erreur inconnue s\'est produite'; +$_['shipment_success'] = 'L\'envoi est créé'; + +// Methods +$_['method_ideal'] = 'iDEAL'; +$_['method_creditcard'] = 'Creditcard'; +$_['method_bancontact'] = 'Bancontact'; +$_['method_banktransfer'] = 'Bank transfer'; +$_['method_directdebit'] = 'Bank transfer'; +$_['method_belfius'] = 'Belfius Direct Net'; +$_['method_kbc'] = "Bouton de paiement KBC/CBC"; +$_['method_sofort'] = 'SOFORT Banking'; +$_['method_paypal'] = 'PayPal'; +$_['method_paysafecard'] = 'paysafecard'; +$_['method_giftcard'] = 'Giftcard'; +$_['method_inghomepay'] = 'ING Home\'Pay'; +$_['method_eps'] = 'EPS'; +$_['method_giropay'] = 'Giropay'; +$_['method_klarnapaylater'] = 'Klarna Pay Later'; +$_['method_klarnasliceit'] = 'Klarna Slice It'; +$_['method_przelewy24'] = 'P24'; + +//Round Off Description +$_['roundoff_description'] = 'Dû à la conversion de devise, il se peut qu’il y ait un écart d’arrondi'; diff --git a/catalog/language/german/extension/payment/mollie.php b/catalog/language/german/extension/payment/mollie.php new file mode 100644 index 00000000..a37572d0 --- /dev/null +++ b/catalog/language/german/extension/payment/mollie.php @@ -0,0 +1,2 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +/** + * German language file for iDEAL by Mollie + */ + +// Text +$_['heading_title'] = 'Zahlung via Mollie'; +$_['ideal_title'] = 'Ihre Zahlung'; +$_['text_title'] = 'Online bezahlen'; +$_['text_redirected'] = 'Der Kunde wurde auf den Zahlungs-Bildschirm umgeleitet'; +$_['text_issuer_ideal'] = 'Wählen Sie Ihre Bank'; +$_['text_issuer_giftcard'] = 'Wählen Sie Ihre Giftcard'; +$_['text_issuer_kbc'] = 'Wählen Sie Ihren Bezahl-Button'; +$_['button_retry'] = 'Erneut versuchen, abzurechnen'; + +// Status page: payment failed (e.g. cancelled). +$_['heading_failed'] = 'Ihre Zahlung ist nicht abgeschlossen'; +$_['msg_failed'] = 'Leider ist die Zahlung fehlgeschlagen. Klicken Sie auf die folgende Schaltfläche, um zum Abrechnungs-Bildschirm zurückzukehren.'; + +// Status page: payment pending. +$_['heading_unknown'] = 'Wir warten noch auf Ihre Zahlung'; +$_['msg_unknown'] = 'Wir haben Ihre Zahlung noch nicht erhalten. Wir werden eine Bestätigungsmail verschicken, sobald die Zahlung eingegangen ist.'; + +// Status page: API failure. +$_['heading_error'] = 'Beim Erstellen der Zahlung ist ein Fehler aufgetreten'; +$_['text_error'] = 'Beim Erstellen der Zahlung bei Mollie ist ein Fehler aufgetreten. Klicken Sie auf die folgende Schaltfläche, um zum Abrechnungs-Bildschirm zurückzukehren.'; + +// Response +$_['response_success'] = 'Die Zahlung wurde erhalten'; +$_['response_none'] = 'Wir warten noch auf die Zahlung. Sie erhalten eine E-Mail, sobald uns der Status Ihrer Zahlung bekannt ist.'; +$_['response_cancelled'] = 'Der Kunde hat die Zahlung annulliert'; +$_['response_failed'] = 'Die Zahlung ist leider fehlgeschlagen. Versuchen Sie es bitte erneut.'; +$_['response_expired'] = 'Die Zahlung ist verstrichen'; +$_['response_unknown'] = 'Es ist ein unbekannter Fehler aufgetreten'; +$_['shipment_success'] = 'Sendung wird erstellt'; + +// Methods +$_['method_ideal'] = 'iDEAL'; +$_['method_creditcard'] = 'Creditcard'; +$_['method_mistercash'] = 'Bancontact'; +$_['method_banktransfer'] = 'Übertragung'; +$_['method_directdebit'] = 'Einmaliges Inkasso'; +$_['method_belfius'] = 'Belfius Direct Net'; +$_['method_kbc'] = 'KBC/CBC-Betaalknop'; +$_['method_sofort'] = 'SOFORT Banking'; +$_['method_paypal'] = 'PayPal'; +$_['method_paysafecard'] = 'paysafecard'; +$_['method_giftcard'] = 'Giftcard'; +$_['method_inghomepay'] = 'ING Home\'Pay'; +$_['method_eps'] = 'EPS'; +$_['method_giropay'] = 'Giropay'; +$_['method_klarnapaylater'] = 'Klarna Pay Later'; +$_['method_klarnasliceit'] = 'Klarna Slice It'; +$_['method_przelewy24'] = 'P24'; + +//Round Off Description +$_['roundoff_description'] = 'Rundungsdifferenzen aufgrund von Währungsumrechnungen'; diff --git a/catalog/language/nl-nl/extension/payment/mollie.php b/catalog/language/nl-nl/extension/payment/mollie.php index 2b708927..a37572d0 100644 --- a/catalog/language/nl-nl/extension/payment/mollie.php +++ b/catalog/language/nl-nl/extension/payment/mollie.php @@ -1,77 +1,2 @@ - * @copyright Mollie B.V. - * @link https://www.mollie.com - */ - -/** - * Dutch language file for iDEAL by Mollie - */ - -// Text -$_['heading_title'] = 'Betaling via Mollie'; -$_['ideal_title'] = 'Uw betaling'; -$_['text_title'] = 'Online betalen'; -$_['text_redirected'] = 'De klant is doorgestuurd naar het betaalscherm'; -$_['text_issuer'] = 'Kies uw bank'; -$_['button_retry'] = 'Opnieuw proberen af te rekenen'; - -// Status page: payment failed (e.g. cancelled). -$_['heading_failed'] = 'Uw betaling is niet voltooid'; -$_['msg_failed'] = 'Helaas is de betaling mislukt. Klik op onderstaande knop om terug te keren naar het afrekenscherm.'; - -// Status page: payment pending. -$_['heading_unknown'] = 'We wachten nog op uw betaling'; -$_['msg_unknown'] = 'We hebben uw betaling nog niet ontvangen. Wij zullen een bevestigingsmail versturen op het moment dat de betaling binnen is.'; - -// Status page: API failure. -$_['heading_error'] = 'Er is een fout opgetreden bij het opzetten van de betaling'; -$_['text_error'] = 'Er is een fout opgetreden bij het opzetten van de betaling bij Mollie. Klik op onderstaande knop om terug te keren naar het afrekenscherm.'; - -// Response -$_['response_success'] = 'De betaling is ontvangen'; -$_['response_none'] = 'We wachten nog op de betaling. U krijgt een email zodra de status van de betaling bij ons bekend is.'; -$_['response_cancelled'] = 'De klant heeft de betaling geannuleerd'; -$_['response_failed'] = 'De betaling is helaas mislukt. Probeer het alstublieft opnieuw.'; -$_['response_expired'] = 'De betaling is verlopen'; -$_['response_unknown'] = 'Er is een onbekende fout opgetreden'; - -// Methods -$_['method_ideal'] = 'iDEAL'; -$_['method_creditcard'] = 'Creditcard'; -$_['method_mistercash'] = 'Mister Cash'; -$_['method_banktransfer'] = 'Overboeking'; -$_['method_directdebit'] = 'Eenmalige incasso'; -$_['method_belfius'] = 'Belfius Direct Net'; -$_['method_kbc'] = 'KBC/CBC-Betaalknop'; -$_['method_bitcoin'] = 'Bitcoin'; -$_['method_sofort'] = 'SOFORT Banking'; -$_['method_paypal'] = 'PayPal'; -$_['method_paysafecard'] = 'paysafecard'; \ No newline at end of file + include(__DIR__."/../../payment/mollie.php"); \ No newline at end of file diff --git a/catalog/language/nl-nl/payment/mollie.php b/catalog/language/nl-nl/payment/mollie.php new file mode 100644 index 00000000..6278f6f0 --- /dev/null +++ b/catalog/language/nl-nl/payment/mollie.php @@ -0,0 +1,89 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +/** + * Dutch language file for iDEAL by Mollie + */ + +// Text +$_['heading_title'] = 'Betaling via Mollie'; +$_['ideal_title'] = 'Uw betaling'; +$_['text_title'] = 'Online betalen'; +$_['text_redirected'] = 'De klant is doorgestuurd naar het betaalscherm'; +$_['text_issuer_ideal'] = 'Kies uw bank'; +$_['text_issuer_giftcard'] = 'Kies uw giftcard'; +$_['text_issuer_kbc'] = 'Kies uw betaalknop'; +$_['button_retry'] = 'Opnieuw proberen af te rekenen'; + +// Status page: payment failed (e.g. cancelled). +$_['heading_failed'] = 'Uw betaling is niet voltooid'; +$_['msg_failed'] = 'Helaas is de betaling mislukt. Klik op onderstaande knop om terug te keren naar het afrekenscherm.'; + +// Status page: payment pending. +$_['heading_unknown'] = 'We wachten nog op uw betaling'; +$_['msg_unknown'] = 'We hebben uw betaling nog niet ontvangen. Wij zullen een bevestigingsmail versturen op het moment dat de betaling binnen is.'; + +// Status page: API failure. +$_['heading_error'] = 'Er is een fout opgetreden bij het opzetten van de betaling'; +$_['text_error'] = 'Er is een fout opgetreden bij het opzetten van de betaling bij Mollie. Klik op onderstaande knop om terug te keren naar het afrekenscherm.'; + +// Response +$_['response_success'] = 'De betaling is ontvangen'; +$_['response_none'] = 'We wachten nog op de betaling. U krijgt een email zodra de status van de betaling bij ons bekend is.'; +$_['response_cancelled'] = 'De klant heeft de betaling geannuleerd'; +$_['response_failed'] = 'De betaling is helaas mislukt. Probeer het alstublieft opnieuw.'; +$_['response_expired'] = 'De betaling is verlopen'; +$_['response_unknown'] = 'Er is een onbekende fout opgetreden'; +$_['shipment_success'] = 'Zending is gemaakt'; + +// Methods +$_['method_ideal'] = 'iDEAL'; +$_['method_creditcard'] = 'Creditcard'; +$_['method_bancontact'] = 'Bancontact'; +$_['method_banktransfer'] = 'Overboeking'; +$_['method_directdebit'] = 'Eenmalige incasso'; +$_['method_belfius'] = 'Belfius Direct Net'; +$_['method_kbc'] = 'KBC/CBC-Betaalknop'; +$_['method_sofort'] = 'SOFORT Banking'; +$_['method_paypal'] = 'PayPal'; +$_['method_paysafecard'] = 'paysafecard'; +$_['method_giftcard'] = 'Giftcard'; +$_['method_inghomepay'] = 'ING Home\'Pay'; +$_['method_eps'] = 'EPS'; +$_['method_giropay'] = 'Giropay'; +$_['method_klarnapaylater'] = 'Klarna Pay Later'; +$_['method_klarnasliceit'] = 'Klarna Slice It'; +$_['method_przelewy24'] = 'P24'; + +//Round Off Description +$_['roundoff_description'] = 'Afrondingsverschil door valutaomrekening'; diff --git a/catalog/language/spanish/extension/payment/mollie.php b/catalog/language/spanish/extension/payment/mollie.php new file mode 100644 index 00000000..a37572d0 --- /dev/null +++ b/catalog/language/spanish/extension/payment/mollie.php @@ -0,0 +1,2 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + */ + +/** + * Spanish language file for iDEAL by Mollie + */ + +// Text +$_['heading_title'] = 'Pago a través de Mollie'; +$_['ideal_title'] = 'su pago'; +$_['text_title'] = 'Pagar en línea'; +$_['text_redirected'] = 'El cliente ha sido redirigido a la pantalla de pago'; +$_['text_issuer_ideal'] = 'Seleccione su banco'; +$_['text_issuer_giftcard'] = 'Seleccione su tarjeta regalo'; +$_['text_issuer_kbc'] = 'Seleccione su botón de pago'; +$_['button_retry'] = 'Intente pagar de nuevo'; + +// Status page: payment failed (e.g. cancelled). +$_['heading_failed'] = 'Su pago no se ha completado'; +$_['msg_failed'] = 'Lamentablemente, no se ha efectuado el pago. Haga clic en el siguiente botón para volver a la pantalla de pago.'; + +// Status page: payment pending. +$_['heading_unknown'] = 'Seguimos esperando su pago'; +$_['msg_unknown'] = 'Aún no hemos recibido su pago. Le enviaremos un correo electrónico de confirmación tan pronto como recibamos el pago.'; + +// Status page: API failure. +$_['heading_error'] = 'Se ha producido un error en la configuración del pago'; +$_['text_error'] = 'Se ha producido un error en la configuración del pago en Mollie. Haga clic en el siguiente botón para volver a la pantalla de pago.'; + +// Response +$_['response_success'] = 'El pago ha sido recibido'; +$_['response_none'] = 'Seguimos esperando el pago. Recibirá un correo electrónico tan pronto como sepamos el estado del pago.'; +$_['response_cancelled'] = 'El cliente ha cancelado el pago'; +$_['response_failed'] = 'Lamentablemente, no se ha efectuado el pago. Por favor, inténtelo de nuevo.'; +$_['response_expired'] = 'El pago ha caducado'; +$_['response_unknown'] = 'Se ha producido un error desconocido'; +$_['shipment_success'] = 'Se crea el envio'; + +// Methods +$_['method_ideal'] = 'iDEAL'; +$_['method_creditcard'] = 'Creditcard'; +$_['method_mistercash'] = 'Bancontact'; +$_['method_banktransfer'] = 'Transferencia bancaria'; +$_['method_directdebit'] = 'Adeudo bancario'; +$_['method_belfius'] = 'Belfius Direct Net'; +$_['method_kbc'] = 'KBC/CBC-Betaalknop'; +$_['method_sofort'] = 'SOFORT Banking'; +$_['method_paypal'] = 'PayPal'; +$_['method_paysafecard'] = 'paysafecard'; +$_['method_giftcard'] = 'Giftcard'; +$_['method_inghomepay'] = 'ING Home\'Pay'; +$_['method_eps'] = 'EPS'; +$_['method_giropay'] = 'Giropay'; +$_['method_klarnapaylater'] = 'Klarna Pay Later'; +$_['method_klarnasliceit'] = 'Klarna Slice It'; +$_['method_przelewy24'] = 'P24'; + +//Round Off Description +$_['roundoff_description'] = ' Diferencia de redondeo por conversión de moneda'; diff --git a/catalog/model/extension/payment/mollie/base.php b/catalog/model/extension/payment/mollie/base.php deleted file mode 100644 index d2ccaf50..00000000 --- a/catalog/model/extension/payment/mollie/base.php +++ /dev/null @@ -1,180 +0,0 @@ - - * @copyright Mollie B.V. - * @link https://www.mollie.com - * - * @property Config $config - * @property DB $db - * @property Language $language - * @property Loader $load - * @property Log $log - * @property Registry $registry - * @property Session $session - * @property URL $url - */ -require_once(dirname(DIR_SYSTEM) . "/catalog/controller/extension/payment/mollie/helper.php"); - -class ModelExtensionPaymentMollieBase extends Model -{ - // Current module name - should be overwritten by subclass using one of the values below. - const MODULE_NAME = NULL; - - /** - * @return Mollie_API_Client - */ - protected function getAPIClient () - { - return MollieHelper::getAPIClient($this->config); - } - - /** - * On the checkout page this method gets called to get information about the payment method. - * - * @param string $address - * @param float $total - * - * @return array - */ - public function getMethod ($address, $total) - { - try - { - $payment_method = $this->getAPIClient()->methods->get(static::MODULE_NAME); - - // Quick checkout provides an array wile the default checkout provides only the total. - $amount = is_array($total) ? $total[0]['value'] : round($total, 2); - - $minimum = $payment_method->getMinimumAmount(); - $maximum = $payment_method->getMaximumAmount(); - - if ($minimum && $minimum > $amount) - { - return NULL; - } - - if ($maximum && $maximum < $amount) - { - return NULL; - } - } - catch (Mollie_API_Exception $e) - { - $this->log->write("Error retrieving payment method '" . static::MODULE_NAME . "' from Mollie: {$e->getMessage()}."); - - return NULL; - } - - // Translate payment method (if a translation is available). - $this->load->language("extension/payment/mollie"); - - $key = "method_" . $payment_method->id; - $val = $this->language->get($key); - - if ($key !== $val) - { - $payment_method->description = $val; - } - - $icon = ""; - - if ($this->config->get("mollie_show_icons")) - { - $icon = ''; - } - - return array( - "code" => "mollie_" . static::MODULE_NAME, - "title" => $icon . $payment_method->description, - "sort_order" => $this->config->get("mollie_" . static::MODULE_NAME . "_sort_order"), - "terms" => NULL, - ); - } - - /** - * While createPayment is in progress this method is getting called to store the order information. - * - * @param $order_id - * @param $transaction_id - * - * @return bool - */ - public function setPayment ($order_id, $transaction_id) - { - if (!empty($order_id) && !empty($transaction_id)) - { - $this->db->query( - sprintf( - "REPLACE INTO `%smollie_payments` (`order_id` ,`transaction_id`, `method`) - VALUES ('%s', '%s', 'idl')", - DB_PREFIX, - $this->db->escape($order_id), - $this->db->escape($transaction_id) - ) - ); - - if ($this->db->countAffected() > 0) { - return TRUE; - } - } - - return FALSE; - } - - /** - * While report method is in progress this method is getting called to update the order information and status. - * - * @param $transaction_id - * @param $payment_status - * @param $consumer - * - * @return bool - */ - public function updatePayment ($transaction_id, $payment_status, $consumer = NULL) - { - if (!empty($transaction_id) && !empty($payment_status)) - { - $this->db->query( - sprintf( - "UPDATE `%smollie_payments` - SET `bank_status` = '%s' - WHERE `transaction_id` = '%s';", - DB_PREFIX, - $this->db->escape($payment_status), - $this->db->escape($transaction_id) - ) - ); - - return $this->db->countAffected() > 0; - } - - return FALSE; - } -} diff --git a/catalog/model/extension/payment/mollie_bancontact.php b/catalog/model/extension/payment/mollie_bancontact.php new file mode 100644 index 00000000..fc093947 --- /dev/null +++ b/catalog/model/extension/payment/mollie_bancontact.php @@ -0,0 +1,5 @@ + + * @copyright Mollie B.V. + * @link https://www.mollie.com + * + * @property Config $config + * @property DB $db + * @property Language $language + * @property Loader $load + * @property Log $log + * @property Registry $registry + * @property Session $session + * @property URL $url + */ +require_once(dirname(DIR_SYSTEM) . "/catalog/controller/payment/mollie/helper.php"); +use comercia\Util; + +class ModelPaymentMollieBase extends Model +{ + // Current module name - should be overwritten by subclass using one of the values below. + const MODULE_NAME = NULL; + + /** + * @return MollieApiClient + */ + protected function getAPIClient() + { + return MollieHelper::getAPIClient($this->config); + } + + /** + * On the checkout page this method gets called to get information about the payment method. + * + * @param array $address + * @param float $total + * + * @return array + */ + public function getMethod($address, $total) + { + // Check total for minimum amount + $standardTotal = $this->currency->convert($total, $this->config->get("config_currency"), 'EUR'); + if($standardTotal <= 0.01) { + return NULL; + } + + $moduleCode = MollieHelper::getModuleCode(); + try { + $payment_method = $this->getAPIClient()->methods->get(static::MODULE_NAME); + + // TODO: Add fields in admin for minimum and maximum amount for each payment method to be set in the module. + } catch (Mollie\Api\Exceptions\ApiException $e) { + $this->log->write("Error retrieving payment method '" . static::MODULE_NAME . "' from Mollie: {$e->getMessage()}."); + + return NULL; + } + + //Get payment methods allowed for this amount and currency + $allowed_methods = array(); + $currency = $this->session->data['currency']; + + // Get billing country + $modelCountry = Util::load()->model('localisation/country'); + + if (isset($this->session->data['payment_address'])) { + if(isset($this->session->data['payment_address']['iso_code_2']) && !empty($this->session->data['payment_address']['iso_code_2'])) { + $country = $this->session->data['payment_address']['iso_code_2']; + } else { + $countryDetails = $modelCountry->getCountry($this->session->data['payment_address']['country_id']); + $country = $countryDetails['iso_code_2']; + } + } else { + // Get billing country from store address + $country_id = $this->config->get('config_country_id'); + $countryDetails = $modelCountry->getCountry($country_id); + $country = $countryDetails['iso_code_2']; + } + + $data = array( + "amount" => ["value" => (string)number_format((float)$total, 2, '.', ''), "currency" => $currency,], + "resource" => "orders", + "billingCountry" => $country + ); + $payment_methods = $this->getAPIClient()->methods->all($data); + + foreach ($payment_methods as $allowed_method) + { + $allowed_methods[] = $allowed_method->id; + } + + if(!in_array($payment_method->id, $allowed_methods)) { + return NULL; + } + + $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone_to_geo_zone WHERE geo_zone_id = '" . (int)$this->config->get($moduleCode . "_" . static::MODULE_NAME . "_geo_zone") . "' AND country_id = '" . (int)$address['country_id'] . "' AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')"); + + if ((bool)$this->config->get($moduleCode . "_" . static::MODULE_NAME . "_geo_zone") && !$query->num_rows) { + return NULL; + } + + // Translate payment method (if a translation is available). + $this->load->language("payment/mollie"); + + $key = "method_" . $payment_method->id; + $val = $this->language->get($key); + + if ($key !== $val) { + $payment_method->description = $val; + } + + $icon = ""; + + if ($this->config->get($moduleCode . "_show_icons")) { + $icon = ''; + } + + return array( + "code" => "mollie_" . static::MODULE_NAME, + "title" => $icon . $payment_method->description, + "sort_order" => $this->config->get($moduleCode . "_" . static::MODULE_NAME . "_sort_order"), + "terms" => NULL, + ); + } + + /** + * While createPayment is in progress this method is getting called to store the order information. + * + * @param $order_id + * @param $transaction_id + * + * @return bool + */ + public function setPayment($order_id, $mollie_order_id) + { + if (!empty($order_id) && !empty($mollie_order_id)) { + $this->db->query( + sprintf( + "REPLACE INTO `%smollie_payments` (`order_id` ,`mollie_order_id`, `method`) + VALUES ('%s', '%s', 'idl')", + DB_PREFIX, + $this->db->escape($order_id), + $this->db->escape($mollie_order_id) + ) + ); + + if ($this->db->countAffected() > 0) { + return TRUE; + } + } + + return FALSE; + } + + /** + * While report method is in progress this method is getting called to update the order information and status. + * + * @param $transaction_id + * @param $payment_status + * @param $consumer + * + * @return bool + */ + public function updatePayment($order_id, $mollie_order_id, $data, $consumer = NULL) + { + if (!empty($order_id) && !empty($mollie_order_id)) { + $this->db->query( + sprintf( + "UPDATE `%smollie_payments` + SET `transaction_id` = '%s', `bank_status` = '%s' + WHERE `order_id` = '%s' AND `mollie_order_id` = '%s';", + DB_PREFIX, + $this->db->escape($data['payment_id']), + $this->db->escape($data['status']), + $this->db->escape($order_id), + $this->db->escape($mollie_order_id) + ) + ); + + return $this->db->countAffected() > 0; + } + return FALSE; + } + + public function getPaymentID($order_id) + { + if (!empty($order_id)) { + $results = $this->db->query("SELECT * FROM `" . DB_PREFIX . "mollie_payments` WHERE `order_id` = '" . $order_id . "'"); + if($results->num_rows == 0) return FALSE; + return $results->row['transaction_id']; + } + return FALSE; + } + + public function getOrderID($order_id) + { + if (!empty($order_id)) { + $results = $this->db->query("SELECT * FROM `" . DB_PREFIX . "mollie_payments` WHERE `order_id` = '" . $order_id . "'"); + if($results->num_rows == 0) return FALSE; + return $results->row['mollie_order_id']; + } + return FALSE; + } + + public function getOrderProducts($order_id) { + $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_product WHERE order_id = '" . (int)$order_id . "'"); + + return $query->rows; + } + + public function getCouponDetails($orderID) { + $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_total WHERE order_id = '" . (int)$orderID . "' AND code = 'coupon'"); + return $query->row; + } + + public function getVoucherDetails($orderID) { + $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_total WHERE order_id = '" . (int)$orderID . "' AND code = 'voucher'"); + return $query->row; + } + + public function getRewardPointDetails($orderID) { + $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_total WHERE order_id = '" . (int)$orderID . "' AND code = 'reward'"); + return $query->row; + } + + public function getOtherOrderTotals($orderID) { + $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_total WHERE order_id = '" . (int)$orderID . "' AND code != 'shipping' AND code != 'tax' AND code != 'voucher' AND code != 'sub_total' AND code != 'coupon' AND code != 'reward' AND code != 'total'"); + + return $query->rows; + } + +} diff --git a/catalog/model/payment/mollie_bancontact.php b/catalog/model/payment/mollie_bancontact.php new file mode 100644 index 00000000..bbbeb53b --- /dev/null +++ b/catalog/model/payment/mollie_bancontact.php @@ -0,0 +1,7 @@ + - -
-
- -
- -
- -
- -
- -
-
- - -
-
+ include_once(__DIR__."/../../payment/mollie_checkout_form.tpl"); +?> \ No newline at end of file diff --git a/catalog/view/theme/default/template/extension/payment/mollie_checkout_form.twig b/catalog/view/theme/default/template/extension/payment/mollie_checkout_form.twig new file mode 100644 index 00000000..bb349405 --- /dev/null +++ b/catalog/view/theme/default/template/extension/payment/mollie_checkout_form.twig @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/catalog/view/theme/default/template/extension/payment/mollie_return.tpl b/catalog/view/theme/default/template/extension/payment/mollie_return.tpl index d1913ac7..6a80f7a8 100644 --- a/catalog/view/theme/default/template/extension/payment/mollie_return.tpl +++ b/catalog/view/theme/default/template/extension/payment/mollie_return.tpl @@ -1,41 +1,3 @@ - - - - - -
- - - - -
-

-
- -

- - -

- - - -

- -
-
- - - + include_once(__DIR__."/../../payment/mollie_return.tpl"); +?> \ No newline at end of file diff --git a/catalog/view/theme/default/template/extension/payment/mollie_return.twig b/catalog/view/theme/default/template/extension/payment/mollie_return.twig new file mode 100644 index 00000000..b40e0537 --- /dev/null +++ b/catalog/view/theme/default/template/extension/payment/mollie_return.twig @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/catalog/view/theme/default/template/extension/payment/mollie_return_2.tpl b/catalog/view/theme/default/template/extension/payment/mollie_return_2.tpl deleted file mode 100644 index 706d1591..00000000 --- a/catalog/view/theme/default/template/extension/payment/mollie_return_2.tpl +++ /dev/null @@ -1,43 +0,0 @@ - - - - -
- - - -
- -
- -

-
- -

- - -

- - - -

- - -
- -
-
- - diff --git a/catalog/view/theme/default/template/payment/mollie_checkout_form.tpl b/catalog/view/theme/default/template/payment/mollie_checkout_form.tpl new file mode 100644 index 00000000..7a7daef2 --- /dev/null +++ b/catalog/view/theme/default/template/payment/mollie_checkout_form.tpl @@ -0,0 +1,56 @@ +
+
+
+ +
+ +
+ +
+ +
+
+ + +
+
diff --git a/catalog/view/theme/default/template/payment/mollie_checkout_form.twig b/catalog/view/theme/default/template/payment/mollie_checkout_form.twig new file mode 100644 index 00000000..db34b65e --- /dev/null +++ b/catalog/view/theme/default/template/payment/mollie_checkout_form.twig @@ -0,0 +1,56 @@ +
+
+
+ {% if issuers is not empty %} +
+ +
+ {% endif %} +
+ +
+
+ + +
+
diff --git a/catalog/view/theme/default/template/payment/mollie_return.tpl b/catalog/view/theme/default/template/payment/mollie_return.tpl new file mode 100644 index 00000000..83353e9f --- /dev/null +++ b/catalog/view/theme/default/template/payment/mollie_return.tpl @@ -0,0 +1,33 @@ + + +
+ + +
+ + + + +
+ +

+
+

+ +

+ + + +

+ + +
+ +
+
+ + \ No newline at end of file diff --git a/catalog/view/theme/default/template/payment/mollie_return.twig b/catalog/view/theme/default/template/payment/mollie_return.twig new file mode 100644 index 00000000..3bea4b90 --- /dev/null +++ b/catalog/view/theme/default/template/payment/mollie_return.twig @@ -0,0 +1,33 @@ +{{ header }} + +
+ + +
+ {{ column_left }} + {% set subtract_first = column_left ? 3 : 0 %} + {% set subtract_second = column_right ? 3 : 0 %} + {% set content_width = 12 - subtract_first - subtract_second %} +
+ {{ content_top }} +

{{ message_title }}

+
+

{{ message_text }}

+ {% if mollie_error is defined %} +

{{ mollie_error }}

+ {% endif %} + + {% if button_retry is defined %} +

{{ button_retry }}

+ {% endif %} + {{ content_bottom }} +
+ {{ column_right }} +
+
+ +{{ footer }} \ No newline at end of file diff --git a/composer.json b/composer.json index 9ed479ee..2e8a5cc6 100755 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "license": "BSD-2-Clause", "require": { - "php": ">=5.4.0", + "php": ">=5.6.0", "ext-curl": "*", "ext-openssl": "*" }, diff --git a/editFiles.sh b/editFiles.sh new file mode 100644 index 00000000..6130f4b9 --- /dev/null +++ b/editFiles.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +echo Edit copied files for old style folders. +echo Changing classnames. +find ./upload/admin/controller/payment -name '*.php' -exec sed -i 's/ControllerExtensionPayment/ControllerPayment/g' '{}' \; +find ./upload/catalog/controller/payment -name '*.php' -exec sed -i 's/ControllerExtensionPayment/ControllerPayment/g' '{}' \; +find ./upload/catalog/model/payment -name '*.php' -exec sed -i 's/ModelExtensionPayment/ModelPayment/g' '{}' \; + +echo Edit Helper + +sed "s/extension\/payment/payment/g" ./upload/catalog/controller/payment/mollie/helper.php -i + +echo Edit base Controllers. + +sed "s/extension\/payment/payment/g" ./upload/admin/controller/payment/mollie/base.php -i +sed "s/return 'payment'/return 'extension\/payment'/g" ./upload/admin/controller/payment/mollie/base.php -i +sed "s/\"controller\/payment\/\" \:/\"controller\/extension\/payment\/\" \:/g" ./upload/admin/controller/payment/mollie/base.php -i + +sed "s/extension\/payment/payment/g" ./upload/catalog/controller/payment/mollie/base.php -i +sed "s/return 'payment'/return 'extension\/payment'/g" ./upload/catalog/controller/payment/mollie/base.php -i +sed "s/extension\_payment/payment/g" ./upload/catalog/controller/payment/mollie/base.php -i + +echo Edit base Model. + +sed "s/extension\/payment/payment/g" ./upload/catalog/model/payment/mollie/base.php -i + +echo Old style created. \ No newline at end of file diff --git a/readme.md b/readme.md index cb6ab32e..841a2388 100755 --- a/readme.md +++ b/readme.md @@ -1,99 +1,81 @@ -![Mollie](https://www.mollie.com/files/Mollie-Logo-Style-Small.png) - -**Let op:** Deze versie van de module is alleen geschikt voor OpenCart 2.3 en hoger. Zie [deze branch](https://github.com/mollie/OpenCart/tree/opencart-2.2) voor de versie die geschikt is voor OpenCart modules 2.2 en lager. - -# Installatie [![Build Status](https://travis-ci.org/mollie/OpenCart.png)](https://travis-ci.org/mollie/OpenCart) # -**Let op:** voor de installatie van deze module is FTP-toegang tot je webserver benodigd. Heb je hier geen ervaring mee? Laat de installatie van deze module dan over aan je websitebouwer of serverbeheerder. - -+ Download op de [OpenCart Releases](https://github.com/mollie/OpenCart/releases)-pagina de nieuwste release. -+ Kopieër de gedownloade mappen `admin` en `catalog` naar de bestaande OpenCart-installatie op je server. -+ Ga naar uw OpenCart AdminPanel (Beheerpagina). -+ Ga in het menu naar _Extentions_ en selecteer _Payments_. -+ Na een correcte afhandeling zou onze Betaalmethode zichtbaar moeten zijn in het _Payments_ overzicht. -+ Klik vervolgens op _Install_ en daarna op _Edit_. -+ Vul je _Mollie API key_ in en bewaar de instellingen. Je vindt de API key in uw Mollie Beheer onder [Websiteprofielen](https://www.mollie.com/beheer/account/profielen/). - -# Over Mollie # -Via [Mollie](https://www.mollie.com/) is gemakkelijk wereldwijd online betaalmethodes aan te sluiten zonder de gebruikelijke technische en administratieve rompslomp. Mollie geeft op ieder moment toegang tot je transactieoverzichten en andere statistieken. [Mollie](https://www.mollie.com/) is gestart door developers en verwerkt voor meer dan 20.000 websites de online betalingen. - -# Ondersteunde betaalmethodes # -### iDEAL ### -Met [iDEAL](https://www.mollie.com/ideal/) kunt u vertrouwd, veilig en gemakkelijk uw online aankopen afrekenen. iDEAL is het systeem dat u direct koppelt aan uw internetbankierprogramma bij een online aankoop. -Via [Mollie](https://www.mollie.com/) is iDEAL gemakkelijk aan te sluiten zonder de gebruikelijke technische en administratieve rompslomp. Mollie geeft u op ieder moment toegang tot uw transactieoverzichten en andere statistieken. Tevens is het mogelijk per e-mail of SMS een notificatie te ontvangen bij elke gelukte betaling. [Mollie](https://www.mollie.nl/) is hierdoor dus een perfecte partner op het gebied van iDEAL en is het dan ook niet verbazingwekkend dat [Mollie](https://www.mollie.nl/) ondertussen op meer dan 20.000 websites iDEAL-betalingen mag verzorgen. - -### Creditcard ### -[Creditcard](https://www.mollie.com/creditcard/) is vrijwel de bekendste methode voor het ontvangen van betalingen met wereldwijde dekking. Doordat we onder andere de bekende merken Mastercard en Visa ondersteunen, zorgt dit direct voor veel potentiële kopers. - -### Bancontact/Mister Cash ### -[Bancontact/Mister Cash](https://www.mollie.com/mistercash/) maakt gebruik van een fysieke kaart die gekoppeld is aan tegoed op een Belgische bankrekening. Betalingen via Bancontact/Mister Cash zijn gegarandeerd en lijken daarmee sterk op iDEAL in Nederland. Daarom is het uitermate geschikt voor uw webwinkel. - -### SOFORT Banking ### -[SOFORT Banking](https://www.mollie.com/sofort/) is een in Duitsland zeer populaire betaalmethode. Betalingen zijn direct en niet storneerbaar, waarmee het sterk op het Nederlandse iDEAL lijkt. Daarom is het uitermate geschikt voor uw webwinkel. - -### Overboekingen ### -[Overboekingen](https://www.mollie.com/banktransfer/) binnen de SEPA zone ontvangen via Mollie. Hiermee kun je betalingen ontvangen van zowel particulieren als zakelijke klanten in meer dan 35 Europese landen. - -### Eenmalige incasso ### -[Eenmalige incasso](https://www.mollie.com/directdebit/) binnen de SEPA zone ontvangen via Mollie. Een eenvoudige betaalmethode waarbij het bedrag achteraf van de rekening van de consument wordt afgeschreven. - -### Bitcoin ### -[Bitcoin](https://www.mollie.com/bitcoin/) is een vorm van elektronisch geld. De bitcoin-euro wisselkoers wordt vastgesteld op het moment van de transactie waardoor het bedrag en de uitbetaling zijn gegarandeerd. - -### PayPal ### -[PayPal](https://www.mollie.com/paypal/) is wereldwijd een zeer populaire betaalmethode. In enkele klikken kunt u betalingen ontvangen via een bankoverschrijving, creditcard of het PayPal-saldo. - -### Belfius Direct Net ### -[Belfius Direct Net](https://www.mollie.com/belfiusdirectnet/) is een eigen betaaloplossing voor klanten van Belfius, één van de grootste banken van België. - -### paysafecard ### -[paysafecard](https://www.mollie.com/paysafecard/) is de populairste prepaidcard voor online betalingen die veel door ouders voor hun kinderen wordt gekocht. - -# Veelgestelde vragen # - -## Ik kan Mollie niet kiezen bij het afrekenen! ## - -Als je de _Live API key_ gebruikt, en iDEAL is nog niet voor je account geactiveerd, kan de module geen betaalmethode vinden om de bestelling mee af te ronden. De module is dan niet zichtbaar. Je kunt de _test API key_ gebruiken totdat iDEAL voor je account actief is. - -Het is ook mogelijk dat het bedrag van de bestelling to hoog of te laag is voor de beschikbare betaalmethodes. Het is bijvoorbeeld niet mogelijk om betalingen hoger dan € 50.000 af te rekenen met iDEAL. - -Als iDEAL geactiveerd is voor uw account en het bedrag klopt ook, controleer dan of de relevante betaalmethodes ingeschakeld staan bij het websiteprofiel in uw Mollie Beheer. - -## Moet ik ook een redirect URL of webhook instellen? ## - -Het is niet nodig een redirect URL of webhook in te stellen. Dat doet de module zelf automatisch bij elke order. - -## Ik krijg een witte pagina tijdens het afrekenen. ## - -Controleert of er fouten in het Fouten Logboek staan, je vindt dit in de OpenCart admin onder "Configuratie" en dan "Fouten Logboek". Sommige fouten, zoals het verkeerd instellen van een mailserver, stoppen het afrekenproces. - -## Ik krijg de melding "The redirect location is invalid" tijdens het afrekenen. ## - -Als e meerdere webwinkels hebt ingesteld op één OpenCart installatie, controleert dan of de instellingen "Winkel URL" en "Gebruik SSL" goed zijn ingesteld onder het tabblad "Algemeen" in de OpenCart admin. Als de instelling "Gebruik SSL" leeg laat, controleer dan ook of de instelling "Gebruik SSL" onder het tabblad "Server" uit staat. - -## Ik krijg een popup met de melding "Error" tijdens het afrekenen. ## - -De module is op dit moment niet compatible met de instelling "Gzip compressie-niveau". Schakel deze instelling uit door de instelling op "0" te zetten onder het tabblad "Server" in de Opencart admin. De module zal het dan weer doen. - -# Wil je meewerken aan deze module? # - -Wil je helpen om onze plugin voor OpenCart nog beter te maken? Wij staan open voor [pull requests](https://github.com/mollie/OpenCart/pulls?utf8=%E2%9C%93&q=is%3Apr) voor onze module. - -Maar wat denk je er over om bij een [technology driven organisatie](https://www.mollie.com/nl/blog/post/werken-bij-mollie-sfeer-kansen-en-mogelijkheden/) aan de slag te gaan? Mollie is altijd op zoek naar developers en system engineers. [Check onze vacatures](https://www.mollie.com/nl/jobs) of [neem contact met ons op](mailto:personeel@mollie.com). - -# Licentie # +

+ +

+

Mollie for OpenCart

+ +# Installation [![Build Status](https://travis-ci.org/mollie/OpenCart.png)](https://travis-ci.org/mollie/OpenCart) # ++ Download the latest release on the [OpenCart Releases](https://github.com/mollie/OpenCart/releases)-page. ++ Upload all files from the "upload" folder in the zip to the root of your opencart shop. ++ For this module to work correctly you need to have vQmod installed, you can find the latest version on the vQmod [Releases page](https://github.com/vqmod/vqmod/releases). ++ After a correct installation, Mollie payment methods should be visible in the _Payments_ overview. ++ Click on _Install (green button or text)_ and then _Edit (blue button or text)_. ++ Fill out your _Mollie API key_ on the settings tab. You can find your API key on your Mollie dashboard [Websiteprofiles](https://www.mollie.com/beheer/account/profielen/). + +# Next level payments, for everyone # +Mollie is dedicated to making payments better for everyone. No need to spend weeks on +paperwork or security compliance procedures. No more lost conversions because you don’t +support a shopper’s favorite payment method or because they don’t feel safe. We made our +products and API expansive, intuitive, and safe for merchants, customers and developers +alike. + +You can quickly integrate all major payment methods, wherever you need them. Simply drop +them ready-made into your OpenCart webshop with this powerful plugin. +- All major payment methods with just a single contract. +- Added reliability through multiple acquiring banks. +- Free machine learning fraud protection and 3-D Secure. + +# Payment methods # +- Credit Cards (Visa / MasterCard & American Express) +- SOFORT banking +- PayPal +- SEPA Direct Debits +- SEPA Bank Transfer +- iDeal +- Bancontact +- Paysafecard +- KBC/CBC Payment Button +- Belfius Payment Button +- ING Homepay +- CartaSi +- Cartes Bancaires +- Dutch giftcards +- EPS +- Giropay +- Klarna Pay Later +- Klarna Slice It +- Przelewy24 + +Please go to the signup page to create a new Mollie account and start receiving payments in +a couple of minutes. Contact info@mollie.com if you have any questions or comments about +this plugin. + +# Features # +- Support for all available Mollie payment methods +- Multiple translations: English, Dutch and French +- Event log for debugging purposes +- Multi-Store support +- Multi-Language support +- Supports OC 1.5 and higher + +# License # [BSD (Berkeley Software Distribution) License](http://www.opensource.org/licenses/bsd-license.php). -Copyright (c) 2013, Mollie B.V. - -# Ondersteuning # -Contact: [www.mollie.com/nl/about](https://www.mollie.com/nl/about) — info@mollie.com — +31 20-612 88 55 - -+ [Meer informatie over iDEAL via Mollie](https://www.mollie.com/ideal/) -+ [Meer informatie over credit card via Mollie](https://www.mollie.com/creditcard/) -+ [Meer informatie over Bancontact/Mister Cash via Mollie](https://www.mollie.com/mistercash/) -+ [Meer informatie over SOFORT Banking via Mollie](https://www.mollie.com/sofort/) -+ [Meer informatie over SEPA Bank transfer via Mollie](https://www.mollie.com/banktransfer/) -+ [Meer informatie over SEPA Direct debit via Mollie](https://www.mollie.com/directdebit/) -+ [Meer informatie over Bitcoin via Mollie](https://www.mollie.com/bitcoin/) -+ [Meer informatie over PayPal via Mollie](https://www.mollie.com/paypal/) -+ [Meer informatie over Belfius Direct Net via Mollie](https://www.mollie.com/belfiusdirectnet/) -+ [Meer informatie over paysafecard via Mollie](https://www.mollie.com/paysafecard/) +Copyright (c) 2018, Mollie B.V. + +# Support # +Module developed by Comercia: [www.comercia.nl](https://www.comercia.nl) — mollie@support.comercia.nl — +31 85-7733618
+Contact Mollie: [www.mollie.com/nl/about](https://www.mollie.com/nl/about) — info@mollie.com — +31 20-612 88 55 + ++ [More info on iDEAL via Mollie](https://www.mollie.com/payments/ideal/) ++ [More info on credit card via Mollie](https://www.mollie.com/payments/creditcard/) ++ [More info on Bancontact via Mollie](https://www.mollie.com/payments/bancontact/) ++ [More info on SOFORT Banking via Mollie](https://www.mollie.com/payments/sofort/) ++ [More info on SEPA Bank transfer via Mollie](https://www.mollie.com/payments/banktransfer/) ++ [More info on SEPA Direct debit via Mollie](https://www.mollie.com/payments/directdebit/) ++ [More info on PayPal via Mollie](https://www.mollie.com/payments/paypal/) ++ [More info on Belfius Direct Net via Mollie](https://www.mollie.com/payments/belfiusdirectnet/) ++ [More info on paysafecard via Mollie](https://www.mollie.com/payments/paysafecard/) ++ [More info on Giftcards via Mollie](https://www.mollie.com/payments/gift-cards/) ++ [More info on EPS via Mollie](https://www.mollie.com/payments/eps/) ++ [More info on Giropay via Mollie](https://www.mollie.com/payments/giropay/) ++ [More info on Klarna Pay Later via Mollie](https://www.mollie.com/payments/klarna-pay-later/) ++ [More info on Klarna Slite It via Mollie](https://www.mollie.com/payments/klarna-slice-it/) diff --git a/release.sh b/release.sh index d08ad80f..03c5ce75 100755 --- a/release.sh +++ b/release.sh @@ -1,2 +1,18 @@ -#!/bin/sh -zip -9 -r mollie-opencart-x.x.x.zip admin catalog LICENSE readme.mdown -x *.git* *.DS_Store +echo "Retrieving Mollie API client v2..." +echo "1/5 Create temporary zip..." +zip -9 -rq temp.zip admin catalog system vqmod +echo "2/5 Create temporary upload dir..." +rm -rf ./upload +mkdir ./upload +echo "3/5 Unzip temporary zip to upload dir..." +unzip -q temp.zip -d upload +echo "4/5 Create opencart installable zip..." +rm mollie-opencart-2.3-and-up.ocmod.zip +rm mollie-opencart-1.5-and-up.vqmod.zip +zip -9 -rq mollie-opencart-1.5-and-up.vqmod.zip upload LICENSE readme.md -x *.git* *.DS_Store + +echo "5/5 Cleanup..." +rm -rf ./upload +rm -rf ./temp.zip + +echo "Done!" diff --git a/system/comercia/arrayHelper.php b/system/comercia/arrayHelper.php new file mode 100644 index 00000000..d013ef5b --- /dev/null +++ b/system/comercia/arrayHelper.php @@ -0,0 +1,56 @@ + $value) { + if (!Util::stringHelper()->startsWith($key, $prefix)) { + unset($array[$key]); + } + } + return $array; + } + + function keyValuePairs($array,$keyField,$valueField){ + $result=[]; + foreach($array as $arrayItem){ + $result[$arrayItem[$keyField]]=$arrayItem[$valueField]; + } + return $result; + } + + function keyToVal($data) + { + $new = array(); + foreach ($data as $key => $val) { + $new[$key] = $key; + } + return $new; + } + function allPrefixed($input,$prefix, $removePrefix = true) + { + $result = []; + $prefixLen = strlen($prefix); + foreach ($input as $key => $val) { + if (substr($key, 0, $prefixLen) == $prefix) { + if ($removePrefix) { + $key = substr($key, $prefixLen); + } + $result[$key] = $val; + } + } + return $result; + } + + function prefixAllValues($prefix, $input) { + $result = []; + foreach ($input as $val) { + $result[] = $prefix . $val; + } + return $result; + } +} + +?> \ No newline at end of file diff --git a/system/comercia/arrayObject.php b/system/comercia/arrayObject.php new file mode 100644 index 00000000..02b03782 --- /dev/null +++ b/system/comercia/arrayObject.php @@ -0,0 +1,67 @@ +data =& $data; + } + + function __get($name) + { + return @$this->data[$name] ?: ""; + } + + function get($name) + { + return @isset($this->data[$name]) ? $this->data[$name] : ""; + } + + function __set($name, $value) + { + $this->data[$name] = $value; + } + + function remove($name) + { + unset($this->data[$name]); + } + + function all() + { + return $this->data; + } + + function timestamp($field) + { + $data = $this->data[$field]; + if (!is_numeric($data)) { + Util::dateTimeHelper()->toTimestamp($data); + } + return $data; + } + + function bool($field, $default = false) + { + if (!isset($this->data[$field])) { + return $default; + } + + $data = $this->data[$field]; + if ($data == "false") { + return false; + } else { + return $data ? true : false; + } + } + + function allPrefixed($prefix, $removePrefix = true) + { + return Util::arrayHelper()->allPrefixed($this->all(),$prefix,$removePrefix); + } +} + +?> diff --git a/system/comercia/breadcrumb.php b/system/comercia/breadcrumb.php new file mode 100644 index 00000000..38e1c042 --- /dev/null +++ b/system/comercia/breadcrumb.php @@ -0,0 +1,37 @@ +data =& $data; + $this->key = $key; + if (!isset($data[$key]) || !is_array($data[$key])) { + $data[$key] = array(); + } + } + + function add($name, $route, $params = "") + { + $text = Util::language()->$name; + $href = Util::url()->link($route, $params); + if (count($this->data[$this->key])) { + $separator = "::"; + } else { + $separator = ""; + } + + $entry = array( + 'text' => $text, + 'href' => $href, + 'separator' => $separator + ); + $this->data[$this->key][] = $entry; + return $this; + } +} + +?> \ No newline at end of file diff --git a/system/comercia/component/breadcrumb.php b/system/comercia/component/breadcrumb.php new file mode 100644 index 00000000..5d48f986 --- /dev/null +++ b/system/comercia/component/breadcrumb.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/system/comercia/component/selectbox.php b/system/comercia/component/selectbox.php new file mode 100644 index 00000000..1bff5cde --- /dev/null +++ b/system/comercia/component/selectbox.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/system/comercia/component/variables.php b/system/comercia/component/variables.php new file mode 100644 index 00000000..b642a0c0 --- /dev/null +++ b/system/comercia/component/variables.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/system/comercia/config.php b/system/comercia/config.php new file mode 100644 index 00000000..ff802ada --- /dev/null +++ b/system/comercia/config.php @@ -0,0 +1,63 @@ +model = Util::load()->model("setting/setting"); + $this->store_id = $store_id; + $data = Util::db()->query("SELECT * FROM " . DB_PREFIX . "setting WHERE store_id = " . $store_id . ""); + foreach ($data as $value) { + if (!$value['serialized']) { + $this->data[$value["key"]] = $value["value"]; + } else { + $this->data[$value["key"]] = json_decode($value["value"], true); + } + } + } + + function __get($name) + { + return $this->get($name); + } + + function __set($name, $value) + { + $code = explode("_", $name)[0]; + $this->set($code, $name, $value); + } + + function get($key, $ignoreMainStore = false) + { + if (isset($this->data[$key])) { + return @$this->data[$key] ?: ""; + } elseif ($this->store_id && !$ignoreMainStore) { + return Util::config(0)->$key; + } + return ""; + } + + function getGroup($code) + { + return $this->model->getSetting($code, $this->store_id); + } + + function set($code, $key, $value = false) + { + if (!is_array($key)) { + $key = [$key => $value]; + } + $items = Util::arrayHelper()->allPrefixed($key, $code, false); + $this->model->editSetting($code, $items, $this->store_id); + foreach ($items as $key => $val) { + $this->data[$key] = $val; + } + } +} + +?> \ No newline at end of file diff --git a/system/comercia/controllerHelper.php b/system/comercia/controllerHelper.php new file mode 100644 index 00000000..c9264b41 --- /dev/null +++ b/system/comercia/controllerHelper.php @@ -0,0 +1,10 @@ +setName($name); + $this->prepare = function () { + }; + $this->postFinish=function(){}; + + } + + function setName($name) + { + $this->name = $name; + } + + function setFields($first) + { + if (!is_array($first)) { + $first = func_get_args(); + } + $this->fields = $first; + } + + function prepare($func) + { + $this->prepare = $func; + } + + + function postFinish($func){ + $this->postFinish=$func; + } + function run($forceRedirect = false) + { + //load the language data + $data = array(); + $name = $this->name; + $form = Util::form($data); + Util::load()->language("module/" . $name, $data); + + if ($forceRedirect) { + $data['redirect'] = $forceRedirect; + } + + $form->finish(function ($data) { + Util::config()->set($this->name, Util::request()->post()->all()); + Util::session()->success = $data['msg_settings_saved']; + $postFinish = $this->postFinish; + if (is_callable($postFinish)) { + $postFinish($data); + } + Util::response()->redirect(@$data['redirect'] ?: Util::route()->extension()); + }); + + //handle the form when finished + $formFields = $this->fields; + $prepare = $this->prepare; + if (is_callable($prepare)) { + $prepare($data); + } + + //place the prepared data into the form + $form + ->fillFromSessionClear("error_warning", "success") + ->fillFromPost($formFields) + ->fillFromConfig($formFields); + + Util::breadcrumb($data) + ->add("text_home", "common/home") + ->add("settings_title", "module/" . $name); + + + //handle document related things + Util::document()->setTitle(Util::language()->heading_title); + + //create links + $data['action'] = Util::version()->isMinimal("2.3")?Util::url()->link('extension/module/' . $name):Util::url()->link('module/' . $name); + $data['cancel'] = Util::url()->link(Util::route()->extension()); + + //create a response + Util::response()->view("module/" . $name . ".tpl", $data); + } + +} + +?> \ No newline at end of file diff --git a/system/comercia/dateTimeHelper.php b/system/comercia/dateTimeHelper.php new file mode 100644 index 00000000..48c13e59 --- /dev/null +++ b/system/comercia/dateTimeHelper.php @@ -0,0 +1,24 @@ +getTimestamp(); + }elseif($dateTime=\DateTime::createFromFormat("Y-m-d",$data)){ + return $dateTime->getTimestamp(); + }elseif($dateTime=\DateTime::createFromFormat(\DateTime::ATOM,$regexVal)){ + return $dateTime->getTimestamp(); + } + return 0; + } + + +} + +?> \ No newline at end of file diff --git a/system/comercia/db.php b/system/comercia/db.php new file mode 100644 index 00000000..31297e26 --- /dev/null +++ b/system/comercia/db.php @@ -0,0 +1,163 @@ +recordExists($table, $data, $keys); + + if ($exists) { + $query = "UPDATE `" . DB_PREFIX . $table . "` SET "; + } else { + $query = "INSERT INTO `" . DB_PREFIX . $table . "` SET "; + } + + $i = 0; + foreach ($data as $key => $value) { + if (!$this->columnExists($table, $key)) { + continue; + } + if ($i++) { + $query .= ","; + } + $query .= "`" . $key . "` = '" . $this->_db()->escape($value) . "'"; + } + if ($exists) { + $query .= " WHERE "; + $query .= $this->whereForKeys($table, $data, $keys); + } + $this->_db()->query($query); + if (!$exists) { + return $this->_db()->getLastId(); + } + + if (count($keys) == 1) { + return $data[$keys[0]]; + } + $result = []; + foreach ($keys as $key) { + $result[] = $data[$key]; + } + + return $result; + } + + public function recordExists($table, $data, $keys = null) + { + + $query = "SELECT * FROM `" . DB_PREFIX . $table . "` WHERE "; + $query .= $this->whereForKeys($table, $data, $keys); + $query .= " LIMIT 0,1"; + $query = $this->_db()->query($query); + + return (bool)$query->num_rows; + } + + public function columnExists($table, $column) + { + static $columns = []; + + if (!isset($columns[$table][$column])) { + $query = "SHOW COLUMNS FROM `" . DB_PREFIX . $table . "` LIKE '" . $column . "'"; + $columns[$table][$column] = (bool)$this->_db()->query($query)->num_rows; + } + + return $columns[$table][$column]; + } + + private function whereForKeys($table, $data, $keys = null) + { + if (!$keys) { + $keys[] = $table . "_id"; + } + $result = ""; + foreach ($keys as $akey => $key) { + if ($akey > 0) { + $result .= " && "; + } + $result .= " `" . $key . "` = '" . @$data[$key] . "' "; + } + + return $result; + } + + private function whereForData($data) + { + $result = ''; + + $i = 0; + foreach ($data as $key => $value) { + if ($i++) { + $result .= ' && '; + } + + $result .= "`" . $key . "` = '" . $this->_db()->escape($value) . "'"; + } + + return $result; + } + + public function saveDataObjectArray($table, $data,$keys=null) + { + foreach ($data as $obj) { + $this->saveDataObject($table, $obj,$keys); + } + } + private function _db() + { + $registry = Util::registry(); + if (!$registry->has('db')) { + $registry->set('db', new db()); + } + + return $registry->get("db"); + } + + public function select($table, $fields = [], $where = []) + { + if (empty($fields)) { + $fields[] = '*'; + } + + $query = "SELECT "; + + $i = 0; + foreach ($fields as $field) + { + if($i++) { + $query .= ','; + } + $query .= $field == '*' ? $field : '`' . $field . '`'; + } + + + $query .= " FROM `" . DB_PREFIX . $table . "`"; + + if (!empty($where)) { + $query .= " WHERE "; + $query .= $this->whereForData($where); + } + + $result = $this->_db()->query($query); + + if ($result->num_rows > 1) { + return $result->rows; + } + + return $result->row; + } + public function query($query) + { + $result = $this->_db()->query($query); + + if ($result) { + return $result->rows; + } + + return []; + } +} +?> diff --git a/system/comercia/document.php b/system/comercia/document.php new file mode 100644 index 00000000..b936755a --- /dev/null +++ b/system/comercia/document.php @@ -0,0 +1,78 @@ +document = Util::registry()->get("document"); + } + + public function setTitle($title) + { + $this->document->setTitle($title); + return $this; + } + + public function setDescription($description) + { + $this->document->setDescription($description); + return $this; + } + + public function setKeywords($keywords) + { + $this->document->setKeywords($keywords); + return $this; + } + + public function addLink($href, $rel) + { + $this->document->addLink(Util::http()->getPathFor($href), $rel); + return $this; + } + + public function addStyle($href, $rel = 'stylesheet', $media = 'screen') + { + $this->document->addStyle(Util::http()->getPathFor($href), $rel, $media); + return $this; + } + + public function addScript($href, $position = 'header') + { + $this->document->addScript(Util::http()->getPathFor($href), $position); + return $this; + } + + public function addVariable($name, $value) + { + $this->variables[$name] = $value; + return $this; + } + + + function addDependency($file){ + if(is_array($file)){ + $files=$file; + foreach($files as $file){ + $this->addDependency($file); + } + return true; + } + + $exp=explode(".",$file); + $ext=$exp[count($exp)-1]; + if($ext=="css"){ + $this->addStyle($file); + } + if($ext=="js"){ + $this->addScript($file); + } + return true; + } +} + + +?> \ No newline at end of file diff --git a/system/comercia/fakeController.php b/system/comercia/fakeController.php new file mode 100644 index 00000000..05d09f51 --- /dev/null +++ b/system/comercia/fakeController.php @@ -0,0 +1,13 @@ +template = $view . ".tpl"; + $this->data = $data; + return $this->render(); + } +} + +?> \ No newline at end of file diff --git a/system/comercia/filesystem.php b/system/comercia/filesystem.php new file mode 100644 index 00000000..25afe6a0 --- /dev/null +++ b/system/comercia/filesystem.php @@ -0,0 +1,28 @@ +removeDirectory($file) : unlink($file); + } + rmdir($path); + } + + function getLatestVersion($before,$after){ + $posibilities = glob(DIR_APPLICATION.$before."*".$after); + arsort($posibilities); + reset($posibilities); + if(count($posibilities)) { + return str_replace(DIR_APPLICATION,"",$posibilities[0]); + }else{ + return ""; + } + } + + function search($dir, $pattern){ + return glob($dir . $pattern . ".*"); + } +} diff --git a/system/comercia/form.php b/system/comercia/form.php new file mode 100644 index 00000000..67610a04 --- /dev/null +++ b/system/comercia/form.php @@ -0,0 +1,176 @@ +data =& $data; + $this->store_id=$store_id; + } + + function fillFromSession($first) + { + if (is_array($first)) { + $keys = $first; + } else { + $keys = func_get_args(); + } + $session = Util::session(); + foreach ($keys as $key => $value) { + if (is_numeric($key)) { + $key = $value; + } + if (!($this->store_id < 0)) { + $value = $this->store_id . "_" . $value; + } + + $this->initializeKey($key); + if (!$this->data[$key] && isset($session->$value)) { + $this->data[$key] = $session->$value; + } + } + + return $this; + } + + function initializeKey($key) + { + if (!isset($this->data[$key])) { + $this->data[$key] = ""; + } + } + + function fillFromSessionClear($first) + { + if (is_array($first)) { + $keys = $first; + } else { + $keys = func_get_args(); + } + $session = Util::session(); + foreach ($keys as $key => $value) { + if (is_numeric($key)) { + $key = $value; + } + if (!($this->store_id < 0)) { + $value = $this->store_id . "_" . $value; + } + + $this->initializeKey($key); + if (!$this->data[$key] && isset($session->$value)) { + $this->data[$key] = $session->$value; + $session->remove($key); + } + } + return $this; + } + + function fillFromPost($first) + { + if (is_array($first)) { + $keys = $first; + } else { + $keys = func_get_args(); + } + $post = Util::request()->post(); + foreach ($keys as $key => $value) { + if (is_numeric($key)) { + $key = $value; + } + + if (!($this->store_id < 0)) { + $value = $this->store_id . "_" . $value; + } + + $this->initializeKey($key); + if (!$this->data[$key] && isset($post->$value)) { + $this->data[$key] = $post->$value; + } + } + return $this; + } + + + function fillFromGet($first) + { + if (is_array($first)) { + $keys = $first; + } else { + $keys = func_get_args(); + } + $get = Util::request()->get(); + foreach ($keys as $key => $value) { + if (is_numeric($key)) { + $key = $value; + } + + if (!($this->store_id < 0)) { + $value = $this->store_id . "_" . $value; + } + + $this->initializeKey($key); + if (!$this->data[$key] && isset($get->$value)) { + $this->data[$key] = $get->$value; + } + } + return $this; + } + + function fillFromConfig($first) + { + if (is_array($first)) { + $keys = $first; + } else { + $keys = func_get_args(); + } + foreach ($keys as $key => $value) { + if (is_numeric($key)) { + $key = $value; + } + + if (!($this->store_id < 0)) { + $config = Util::config($this->store_id); + } else { + $config = Util::config(); + } + + $this->initializeKey($key); + if (!$this->data[$key] && $config->get($value,true)) { + $this->data[$key] = $config->get($value,true); + } + } + return $this; + } + + + function fillSelectboxOptions($name, $data) + { + $options = $this->selectboxOptions($name); + foreach ($data as $key => $value) { + $options->add($key, $value); + } + return $this; + } + + function selectboxOptions($key) + { + require_once(__DIR__ . "/selectboxOptions.php"); + return new selectboxOptions($this->data, $key); + } + + + function finish($function) + { + if ((Util::request()->server()->REQUEST_METHOD == 'POST')) { + $function($this->data); + } + } + +} + +?> \ No newline at end of file diff --git a/system/comercia/html.php b/system/comercia/html.php new file mode 100644 index 00000000..3ee2e9e6 --- /dev/null +++ b/system/comercia/html.php @@ -0,0 +1,37 @@ +variables; + foreach ($variables as $key => $val) { + $variables[$key] = json_encode($val); + } + return $this->component("variables", array("variables" => $variables)); + } + + function component($_name, $_data = array()) + { + ob_start(); + foreach ($_data as $key => $val) { + ${$key} = $val; + } + include(__DIR__ . "/component/" . $_name . ".php"); + $result = ob_get_contents(); + ob_end_clean(); + return $result; + } + + function selectbox($name, $value, $options, $class = "") + { + return $this->component("selectbox", array("value" => $value, "name" => $name, "options" => $options, "class" => $class)); + } + + function breadcrumb($breadcrumbs) + { + return $this->component("breadcrumb", array("breadcrumbs" => $breadcrumbs)); + } +} + +?> \ No newline at end of file diff --git a/system/comercia/http.php b/system/comercia/http.php new file mode 100644 index 00000000..f8bae8a0 --- /dev/null +++ b/system/comercia/http.php @@ -0,0 +1,29 @@ +startsWith($path, "http://") || + Util::stringHelper()->startsWith($path, "https://") || + Util::stringHelper()->startsWith($path, "//")) + ) { + $path = $this->applicationPath() . $path; + } + return $path; + } + + function applicationPath() + { + $path = HTTPS_SERVER ? HTTPS_SERVER : HTTP_SERVER; + if (!Util::info()->IsInAdmin()) { + $filePath = DIR_APPLICATION; + $exp = explode("/", $filePath); + $dir = $exp[count($exp) - 2]; + $path .= $dir . "/"; + } + return $path; + } +} + +?> \ No newline at end of file diff --git a/system/comercia/image.php b/system/comercia/image.php new file mode 100644 index 00000000..3d04f75b --- /dev/null +++ b/system/comercia/image.php @@ -0,0 +1,67 @@ +removeDirectory(DIR_IMAGE."cache"); + mkdir(DIR_IMAGE."cache"); + return; + } + +} + +?> \ No newline at end of file diff --git a/system/comercia/info.php b/system/comercia/info.php new file mode 100644 index 00000000..11d61efd --- /dev/null +++ b/system/comercia/info.php @@ -0,0 +1,55 @@ +config_template; + } + + function stores() + { + static $stores = false; + if (!$stores) { + $stores = array_merge( + [ + [ + 'store_id' => 0, + 'name' => Util::config()->config_name . Util::language()->text_default, + 'url' => Util::url()->getCatalogUrl() + ] + ], + Util::load()->model("setting/store")->getStores() + ); + + usort($stores, function ($a, $b) { + return $a["store_id"] - $b["store_id"]; + }); + $stores = array_values($stores); + } + + //Make store id as key + $storeIDKeyArray = []; + foreach($stores as $store) { + $storeIDKeyArray[$store['store_id']] = $store; + } + return $storeIDKeyArray; + } + + function getModuleCode($name, $type) { + if(Util::version()->isMinimal("3")) { + return $type . '_' . $name; + } + return $name; + } +} + +?> \ No newline at end of file diff --git a/system/comercia/language.php b/system/comercia/language.php new file mode 100644 index 00000000..dcbfd565 --- /dev/null +++ b/system/comercia/language.php @@ -0,0 +1,34 @@ +language = Util::registry()->get("language"); + }else{ + $this->language=new \Language($language); + } + } + + function __get($name) + { + return $this->get($name); + } + + function get($name) + { + return @$this->language->get($name) ?: ""; + } + + function load($file){ + $arr=[]; + return Util::load()->language($file,$arr,$this->language); + } + + +} + +?> \ No newline at end of file diff --git a/system/comercia/load.php b/system/comercia/load.php new file mode 100644 index 00000000..3fca0f99 --- /dev/null +++ b/system/comercia/load.php @@ -0,0 +1,425 @@ +library($library); + } + return $result; + }; + + static $singletons = []; + if (!isset($singletons[$library])) { + $className = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $library)))); + $className = $className; + $libDir = DIR_SYSTEM . "library/"; + $bestOption = $this->findBestOption($libDir, $library, "php"); + if (!class_exists($className)) { + if (class_exists("VQMod")) { + @include_once(\VQMod::modCheck($this->modification($libDir . $bestOption["name"] . ".php"), $libDir . $bestOption["name"] . ".php")); + } else { + @include_once($this->modification($libDir . $bestOption["name"] . ".php")); + } + } + + if (class_exists($className)) { + $result = new $className(Util::registry()); + Util::registry()->set(Util::stringHelper()->ccToUnderline($className), $result); + $singletons[$library] = $result; + } else { + $singletons[$library] = false; + } + + } + + return $singletons[$library]; + } + + function findBestOption($dir, $name, $extension) + { + + //fiend associated files + $posibilities = glob($dir . "" . $name . "*." . $extension); + $files = array(); + foreach ($posibilities as $file) { + $file = str_replace(DIR_TEMPLATE, "", $file); + $file = str_replace(".tpl", "", $file); + $file = str_replace(".twig", "", $file); + $expFile = str_replace(")", "", $file); + $exp = explode("(", $expFile); + $files[] = array( + "name" => $file, + "version" => isset($exp[1]) ? explode("_", $exp[1]) : false + ); + } + + //find best option + $bestOption = false; + foreach ($files as $file) { + if ( + ($file["version"]) && //check if this file has a version if no version its never the best option + ( + $file["version"][0] == "min" && Util::version()->isMinimal($file["version"][1]) ||//decide if is valid in case of minimal + $file["version"][0] == "max" && Util::version()->isMaximal($file["version"][1]) //decide if is valid in case of maximal + ) && + (!$bestOption || $file["version"][0] == "max" || $bestOption["version"][0] == "min") && //prioritize max version over min version + ( + !$bestOption || // if there is no best option its always the best option + ($file["version"][0] == "min" && version_compare($file["version"][1], $bestOption["version"][1], ">")) ||//if priority is by minimal , find the highest version + $file["version"][0] == "max" && version_compare($file["version"][1], $bestOption["version"][1], "<") //if priority is by maximal , find the lowest version + ) + ) { + $bestOption = $file; + } + + } + + if (!$bestOption) { + $bestOption = array( + "name" => $name, + "version" => false, + ); + } + + return $bestOption; + + } + + function model($model) + { + $model = $this->rewriteModel($model); + if (is_array($model)) { + $models = $model; + $result = []; + foreach ($models as $model) { + $result[$model] = $this->model($model); + } + return $result; + }; + + $modelDir = DIR_APPLICATION . 'model/'; + $route = $this->getRouteInfo("model", $model, $modelDir); + $className = $route["class"]; + if (!class_exists($className)) { + if (class_exists("VQMod")) { + @include_once(\VQMod::modCheck($this->modification($modelDir . $route["file"] . ".php"), $modelDir . $route["file"] . ".php")); + } else { + @include_once($this->modification($modelDir . $route["file"] . ".php")); + } + } + + if (class_exists($className)) { + + //Check for events + if(Util::version()->isMinimal("2.2")) { + $result = new \Proxy(); + + $r = new \ReflectionMethod('Loader', 'callback'); + $r->setAccessible(true); + + foreach (get_class_methods($className) as $method) { + $result->{$method} = $r->invoke(new \Loader(Util::registry()), Util::registry(), $route["file"] . '/' . $method); + } + } else { + $result = new $className(Util::registry()); + } + + Util::registry()->set(Util::stringHelper()->ccToUnderline($className), $result); + return $result; + } + return false; + } + + function getRouteInfo($prefix, $route, $dir) + { + $parts = explode('/', preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route)); + + $fileRoute = ""; + $method = ""; + $params = []; + while ($parts) { + $file = $dir . implode('/', $parts) . '.php'; + + if (is_file($file)) { + $fileRoute = implode('/', $parts); + break; + } else { + if ($method) { + $params[] = $method; + } + $method = array_pop($parts); + } + } + + $registry = Util::registry(); + + $className = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $fileRoute)))); + $className = lcfirst(str_replace(' ', '', ucwords(str_replace('/', ' ', $className)))); + $className = ucfirst($className); + $className = ucfirst($prefix) . preg_replace('/[^a-zA-Z0-9]/', '', $className); + + $bestOption = $this->findBestOption($dir, $fileRoute, "php"); + + return array( + "file" => $bestOption["name"], + "class" => $className, + "method" => $method, + "params" => $params + ); + } + + function view($view, $data = array()) + { + if (Util::version()->isMinimal("3.0")) { + $extension = "twig"; + $view = str_replace(".tpl", ".twig", $view); + } else { + $extension = "tpl"; + } + + if (Util::info()->isInAdmin()) { + $bestOption = $this->findBestOption(DIR_TEMPLATE, $view, $extension); + } else { + $bestOption1 = $this->findBestOption(DIR_TEMPLATE . "default/template/", $view, $extension); + $bestOption2 = $this->findBestOption(DIR_TEMPLATE . Util::info()->theme() . "/template/", $view, $extension); + if ($bestOption1["version"] && !$bestOption2["version"]) { + $bestOption = $bestOption1; + } else { + $bestOption = $bestOption2; + } + } + + $view = $bestOption["name"]; + + $registry = Util::registry(); + if (Util::version()->isMinimal(3.0)) { + try { + $view = str_replace(".twig", "", $view); + return $registry->get("load")->view($view, $data); + } catch (\Exception $ex) { + return $this->tplFallback($view, $data); + } + } elseif (Util::version()->isMinimal(2.0)) { + if (Util::version()->isMinimal("2.2") || Util::version()->isMinimal("2") && Util::info()->isInAdmin()) { + if (Util::version()->isMaximal("2.1.0.2")) { // must be 2.0 or 2.1; both versions don't add tpl in the loader + $view .= "." . $extension; + } else { + $view = str_replace("." . $extension, "", $view); + } + return $registry->get("load")->view($view, $data); + } else { + if (Util::version()->isMaximal("2.1.0.2")) { + $view .= "." . $extension; + } + + if (file_exists(DIR_TEMPLATE . Util::info()->theme() . '/template/' . $view)) { + return $registry->get("load")->view(Util::info()->theme() . "/template/" . $view, $data); + } else { + return $registry->get("load")->view('default/template/' . $view, $data); + } + } + } elseif (Util::version()->isMinimal(1.5) && !Util::info()->isInAdmin()) { + $view .= "." . $extension; + if (file_exists(DIR_TEMPLATE . Util::info()->theme() . '/template/' . $view)) { + $view = DIR_TEMPLATE . Util::info()->theme() . '/template/' . $view; + } else { + $view = 'default/template/' . $view; + } + } + $fakeControllerFile = __DIR__ . "/fakeController.php"; + if (class_exists("VQMod")) { + require_once(\VQMod::modCheck($this->modification($fakeControllerFile), $fakeControllerFile)); + } else { + require_once($this->modification($fakeControllerFile)); + } + $controller = new FakeController($registry); + $result = $controller->getView($view, $data); + return $result; + } + + public function tplFallback($view, $_data = array()) + { + $view = str_replace(".twig", ".tpl", $view); + + if (Util::info()->isInAdmin()) { + $bestOption = $this->findBestOption(DIR_TEMPLATE, $view, "tpl"); + } else { + $bestOption1 = $this->findBestOption(DIR_TEMPLATE . "default/template/", $view, "tpl"); + $bestOption2 = $this->findBestOption(DIR_TEMPLATE . Util::info()->theme() . "/template/", $view, "tpl"); + if ($bestOption1["version"] && !$bestOption2["version"]) { + $bestOption = $bestOption1; + } else { + $bestOption = $bestOption2; + } + } + + $view = $bestOption["name"]; + + $file = DIR_TEMPLATE . $view; + + if (!substr($file, -4) != ".tpl") { + $file .= ".tpl"; + } + + if (is_file($file)) { + extract($_data); + ob_start(); + require($file); + return ob_get_clean(); + } + + } + + function language($file, &$data = array(), $language = false) + { + if (is_array($file)) { + $files = $file; + $result = []; + foreach ($files as $file) { + $result = array_merge($result, $this->language($file, $data)); + } + return $result; + }; + + $file = $this->rewriteLanguage($file); + + $registry = Util::registry(); + if ($language) { + $language->load($file); + } else { + $result = $registry->get("load")->language($file); + } + foreach ($result as $key => $val) { + $data[$key] = $val; + } + return $result; + } + + function pageControllers(&$data) + { + $data['header'] = Util::load()->controller('common/header'); + $data['column_left'] = Util::load()->controller('common/column_left'); + $data['footer'] = Util::load()->controller('common/footer'); + } + + function controller($controller) + { + + if (is_array($controller)) { + $controllers = $controller; + $result = []; + foreach ($controllers as $controller) { + $result[$controller] = $this->controller($controller); + } + return $result; + }; + + $controllerDir = DIR_APPLICATION . 'controller/'; + $route = $this->getRouteInfo("controller", $controller, $controllerDir); + + $className = $route["class"]; + if (!class_exists($className)) { + if (class_exists("VQMod")) { + @include_once(\VQMod::modCheck($this->modification($controllerDir . $route["file"] . ".php"), $controllerDir . $route["file"] . ".php")); + } else { + @include_once($this->modification($controllerDir . $route["file"] . ".php")); + } + } + + if (class_exists($className)) { + $rc = new \ReflectionClass($className); + if ($rc->isInstantiable()) { + $method = $route["method"] ? $route["method"] : "index"; + $controller = new $className(Util::registry()); + $mr = new \ReflectionMethod($className, $method); + $mr->setAccessible(true); + if (!empty($route["params"])) { + $result = $mr->invokeArgs($controller, $route["params"]); + } else { + $result = $mr->invoke($controller); + } + + if (!$result) { + try { + $pr = new \ReflectionProperty($className, "output"); + $pr->setAccessible(true); + $result = $pr->getValue($controller); + } catch (\Exception $ex) { + } + } + + return $result ?: ""; + } + } + return ""; + } + + private function rewriteModel($model) + { + return Util::stringHelper()->rewriteForVersion($model, + [ + [ + "" => "sale/custom_field", + "2.1" => "customer/custom_field" + ], + [ + "" => "sale/customer_group", + "2.1" => "customer/customer_group" + ], + [ + "" => "setting/extension", + "2.0" => "extension/extension", + "3.0" => "setting/extension" + ], + [ + "" => "extension/event", + "3.0" => "setting/event" + ] + ] + ); + } + + + private function rewriteLanguage($model) + { + return Util::stringHelper()->rewriteForVersion($model, + [ + [ + "" => "payment/", + "2.3" => "extension/payment/" + ] + ] + ); + } + + // Modification Override + function modification($filename) { + if (Util::version()->isMinimal(2.0)) { + if (defined('DIR_CATALOG')) { + $file = DIR_MODIFICATION . 'admin/' . substr($filename, strlen(DIR_APPLICATION)); + } elseif (defined('DIR_OPENCART')) { + $file = DIR_MODIFICATION . 'install/' . substr($filename, strlen(DIR_APPLICATION)); + } else { + $file = DIR_MODIFICATION . 'catalog/' . substr($filename, strlen(DIR_APPLICATION)); + } + + if (substr($filename, 0, strlen(DIR_SYSTEM)) == DIR_SYSTEM) { + $file = DIR_MODIFICATION . 'system/' . substr($filename, strlen(DIR_SYSTEM)); + } + + if (is_file($file)) { + return $file; + } + } + + return $filename; + } +} + +?> diff --git a/system/comercia/log.php b/system/comercia/log.php new file mode 100644 index 00000000..1a1c71c2 --- /dev/null +++ b/system/comercia/log.php @@ -0,0 +1,8 @@ +get("log")->write($message); + } +} \ No newline at end of file diff --git a/system/comercia/patch.php b/system/comercia/patch.php new file mode 100644 index 00000000..00fb18bb --- /dev/null +++ b/system/comercia/patch.php @@ -0,0 +1,89 @@ +db=Util::registry()->get("db"); + + $table = $this->table("comercia_patch"); + if (!$table->exists()) { + $table->addField("path","varchar(255)"); + $table->addField("patch", "varchar(50)"); + $table->addField("success", "int"); + $table->addField("date", "int"); + $table->create(); + } + + } + + function runPatchesFromFile($path){ + $patches=include($path); + $this->runPatches($patches,$path); + } + + function runPatchesFromFolder($folder,$context=false) { + if(!$context){ + $context=$folder; + } + $path = DIR_APPLICATION . 'patch/' . $folder; + $patches = []; + + if($handle = opendir($path)) { + while (false !== ($entry = readdir($handle))) { + if ($entry != '.' && $entry != '..' && !is_dir($path . '/' . $entry) && substr($entry, -3) === 'php') { + $index = substr($entry, 0,-4); + $patches[$index] = include $path . '/' . $entry; + } + } + + ksort($patches); + closedir($handle); + } + + $newPatches=[]; + foreach($patches as $key=>$val){ + if(is_numeric(substr($key,0,1))){ + $explode=explode("_",$key); + unset($explode[0]); + $key=implode("_",$explode); + } + $newPatches[$key]=$val; + } + + $this->runPatches($newPatches, $context); + } + + function runPatches($patches,$path){ + foreach($patches as $key=>$patch){ + if($this->needPatch($path,$key)){ + $patch(); + $this->registerDone($path,$key); + } + } + } + + function registerDone($path,$patch){ + $prefix=DB_PREFIX; + $this->db->query("insert into ".$prefix."comercia_patch set + `path`='".$path."', + `patch`='".$patch."', + `success`=1, + `date`=".time()." + "); + } + + function needPatch($path,$patch){ + $prefix = DB_PREFIX; + $query = $this->db->query("select comercia_patch_id from " . $prefix . "comercia_patch where `path`='".$path."' and `patch`='" . $patch . "' and success=1"); + return !$query->num_rows; + } + + function table($table){ + return new PatchTable($table,$this->db); + } +} diff --git a/system/comercia/patchTable.php b/system/comercia/patchTable.php new file mode 100644 index 00000000..8b600c3a --- /dev/null +++ b/system/comercia/patchTable.php @@ -0,0 +1,171 @@ +db=$db; + $this->name=$name; + } + + function setName($name) + { + $this->name = $name; + return $this; + } + + function save() + { + if ($this->exists()) { + $this->update(); + } else { + $this->create(); + } + } + + function exists() + { + $prefix = DB_PREFIX; + $query = $this->db->query("SHOW TABLES LIKE '" . $prefix . $this->name . "';"); + return $query->num_rows; + } + + function columnExists($columnName = '') + { + $prefix = DB_PREFIX; + $query = $this->db->query("SHOW COLUMNS FROM `" . $prefix . $this->name . "` LIKE '" . $columnName . "';"); + return $query->num_rows; + } + + function update() + { + $prefix = DB_PREFIX; + $query = "ALTER TABLE `" . $prefix . $this->name . "` "; + + $i = 0; + if (isset($this->actions["addField"])) { + foreach ($this->actions["addField"] as $action) { + if (!$this->columnExists($action['name'])) { + if ($i > 0) { + $query .= ","; + } + + if($action["default"]!==null && $action["default"]!==false){ + $action["default"]="'".$action["default"]."'"; + } + $query .= "ADD `" . $action["name"] . "` " . $action["type"]. ($action["default"]!==false?" DEFAULT ".$action["default"]:""); + $i++; + } + } + } + + if (isset($this->actions["editField"])) { + foreach ($this->actions["editField"] as $action) { + if ($this->columnExists($action['name'])) { + if ($i > 0) { + $query .= ","; + } + + if($action["default"]!==null && $action["default"]!==false){ + $action["default"]="'".$action["default"]."'"; + } + $query .= "MODIFY `" . $action["name"] . "` " . $action["type"]. ($action["default"]!==false?" DEFAULT ".$action["default"]:""); + $i++; + } + } + } + + + if (isset($this->actions['removeField'])) { + foreach ($this->actions['removeField'] as $action) { + if ($this->columnExists($action['name'])) { + if ($i > 0) { + $query .= ','; + } + $query .= "DROP COLUMN `" . $action['name'] . "`"; + $i++; + } + } + } + $this->db->query($query); + + if (isset($this->actions["addIndex"])) { + foreach ($this->actions["addIndex"] as $action) { + if ($this->columnExists($action['name'])) { + $this->db->query("CREATE INDEX `" . $action["name"] . "` ON `" . $prefix . $this->name . "` (`" . $action["name"] . "`);"); + } + } + } + } + + function create() + { + $prefix = DB_PREFIX; + $query = "create table `" . $prefix . $this->name . "` ( + `".$this->name."_id` INT NOT NULL AUTO_INCREMENT + "; + + if (isset($this->actions["addField"])) { + foreach ($this->actions["addField"] as $action) { + $query .= ",`" . $action["name"] . "` " . $action["type"]; + } + } + $query .= ",PRIMARY KEY (".$this->name."_id))"; + + $this->db->query($query); + + if (isset($this->actions["addIndex"])) { + foreach ($this->actions["addIndex"] as $action) { + $this->db->query("CREATE INDEX `" . $action["name"] . "` ON `" . $prefix . $this->name . "` (`" . $action["name"] . "`);"); + } + } + + return $this; + } + + function addField($field, $type,$default=false) + { + $this->actions["addField"][] = array( + "name" => $field, + "type" => $type, + "default"=>$default + ); + + return $this; + } + + + function editField($field, $type,$default=false) + { + $this->actions["editField"][] = array( + "name" => $field, + "type" => $type, + "default"=>$default + ); + + return $this; + } + + function removeField($field) + { + $this->actions['removeField'][] = array( + 'name' => $field + ); + + return $this; + } + + function addIndex($field) + { + $this->actions["addIndex"][] = array( + "name" => $field, + ); + + return $this; + } +} diff --git a/system/comercia/proxy.php b/system/comercia/proxy.php new file mode 100644 index 00000000..7dd32b49 --- /dev/null +++ b/system/comercia/proxy.php @@ -0,0 +1,39 @@ +{$key}; + } + + public function __set($key, $value) { + $this->{$key} = $value; + } + + public function __call($key, $args) { + $arg_data = array(); + + $args = func_get_args(); + + foreach ($args as $arg) { + if ($arg instanceof Ref) { + $arg_data[] =& $arg->getRef(); + } else { + $arg_data[] =& $arg; + } + } + + if (isset($this->{$key})) { + return call_user_func_array($this->{$key}, $arg_data); + } else { + $trace = debug_backtrace(); + + exit('Notice: Undefined property: Proxy::' . $key . ' in ' . $trace[1]['file'] . ' on line ' . $trace[1]['line'] . ''); + } + } +} \ No newline at end of file diff --git a/system/comercia/request.php b/system/comercia/request.php new file mode 100644 index 00000000..4f89b600 --- /dev/null +++ b/system/comercia/request.php @@ -0,0 +1,127 @@ +get("request")->get); + } + return $get; + } + + function post() + { + static $post = false; + if (!$post) { + $contentType = $this->getHeaderByName("content-type"); + if (strpos($contentType, "json") !== false) { + $postData = json_decode($this->getRawData(), true); + $post = new ArrayObject($postData); + } else { + $post = new ArrayObject(Util::registry("load")->get("request")->post); + } + } + return $post; + } + + function server() + { + static $server = false; + if (!$server) { + $getServer = Util::registry("load")->get("request")->server; + $protocol = array("protocol"=>(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"); + $mergeArrays = array_merge($getServer, $getServer); + $server = new ArrayObject($mergeArrays); + } + return $server; + } + + public function getRawData() + { + return file_get_contents("php://input"); + } + + public function getHeaders() + { + if (function_exists("getallheaders")) { + return array(array_change_key_case(getallheaders(), CASE_LOWER)); + } else { + return array(array_change_key_case($this->getallheadersFallback(), CASE_LOWER)); + } + } + + function getallheadersFallback() + { + static $headers = false; + if (!$headers) { + $headers = []; + foreach ($_SERVER as $name => $value) { + if (substr($name, 0, 5) == 'HTTP_') { + $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; + } + } + } + if (isset($_SERVER["CONTENT_TYPE"])) { + $headers["content-type"] = $_SERVER["CONTENT_TYPE"]; + } + return $headers; + } + + public function getHeaderByName($name) + { + $header = $this->getHeaders(); + + if (!is_array($header)) { + $header = $this->headersToArray($header); + } + + //if the content type is set + if (isset($header[0][$name])) { + return $header[0][$name]; + } + return ""; + } + + public function headersToArray($headerContent) + { + $result = array(); + + //split on double enter + $lines = explode("\r\n\r\n", $headerContent); + + for ($i = 0; $i < count($lines) - 1; $i++) { + //split on single enter + foreach (explode("\r\n", $lines[$i]) as $lKey => $line) { + if ($lKey === 0) { + $result[$i]['http_code'] = $line; + } else { + list ($key, $value) = explode(': ', $line); + $result[$i][strtolower($key)] = $value; + } + } + } + + return $result; + } + + + + public function getClientLanguage() + { + return substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); + } + + public function getIp() + { + return @$_SERVER['HTTP_CLIENT_IP'] ? $_SERVER['HTTP_CLIENT_IP'] : (@$_SERVER['HTTP_X_FORWARDE‌​D_FOR'] ? $_SERVER['HTTP_X_FORWARDED_FOR'] : (@$_SERVER['REMOTE_ADDR'] ? $_SERVER['REMOTE_ADDR'] : "127.0.0.1")); + } + + public function getUrl() + { + return (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; + } +} + +?> \ No newline at end of file diff --git a/system/comercia/response.php b/system/comercia/response.php new file mode 100644 index 00000000..995c8fee --- /dev/null +++ b/system/comercia/response.php @@ -0,0 +1,66 @@ +link($route, $params, $ssl); + $this->redirectToUrl($url); + } + + function redirectBack(){ + $this->redirectToUrl(str_replace("&","&",Util::request()->server()->HTTP_REFERER)); + } + + function redirectToUrl($url){ + Util::registry()->get("response")->redirect($url); + } + + function addHeader($key, $value) + { + Util::registry()->get("response")->addHeader($key . ":" . $value); + } + + function setCompression($level) + { + Util::registry()->get("response")->setCompression($level); + } + + function view($view, $data = array(), $pageControllers = true) + { + if ($pageControllers) { + Util::load()->pageControllers($data); + } + $result = Util::load()->view($view, $data); + $this->write($result); + } + + function write($output) + { + if($this->bufferMode){ + echo $output; + }else { + Util::registry()->get("response")->setOutput($output); + } + } + + function renderJson($data){ + $this->addHeader("content-type","application/json"); + $this->write(json_encode($data)); + } + + + function toVariable($function){ + $oldBufferMode= $this->bufferMode; + $this->bufferMode=true; + ob_start(); + $function(); + $result=ob_get_contents(); + ob_end_clean(); + $this->bufferMode=false; + return $result; + } +} + +?> diff --git a/system/comercia/route.php b/system/comercia/route.php new file mode 100644 index 00000000..98daf1be --- /dev/null +++ b/system/comercia/route.php @@ -0,0 +1,24 @@ +isMinimal("2.3")) + { + return 'extension/'.$type.'/'.$extensionName; + } + return $type.'/'.$extensionName; + } + + if (Util::version()->isMinimal("3.0")) { + return "marketplace/extension"; + } elseif (Util::version()->isMinimal("2.3")) { + return 'extension/extension'; + } + return 'extension/'.$type; + } +} + +?> \ No newline at end of file diff --git a/system/comercia/selectboxOptions.php b/system/comercia/selectboxOptions.php new file mode 100644 index 00000000..49ebd15b --- /dev/null +++ b/system/comercia/selectboxOptions.php @@ -0,0 +1,30 @@ +data =& $data; + $this->key = $key; + if (!isset($data[$key]) || !is_array($data[$key])) { + $data[$key] = array(); + } + } + + function add($key, $value) + { + $text = Util::language()->$key; + $entry = array( + 'text' => $text, + 'value' => $value, + ); + $this->data[$this->key][] = $entry; + return $this; + } +} + +?> \ No newline at end of file diff --git a/system/comercia/stringHelper.php b/system/comercia/stringHelper.php new file mode 100644 index 00000000..027fa9d7 --- /dev/null +++ b/system/comercia/stringHelper.php @@ -0,0 +1,36 @@ +$newWord){ + if(strpos($string, $newWord) !== false){ + $match=$newWord; + } + if($version>0 && Util::version()->isMinimal($version)){ + $versionMatch=$newWord; + } + } + + if($match){ + $string= str_replace($match,$versionMatch,$string); + } + } + return $string; + } + +} + +?> diff --git a/system/comercia/twig.php b/system/comercia/twig.php new file mode 100644 index 00000000..8cd85d69 --- /dev/null +++ b/system/comercia/twig.php @@ -0,0 +1,45 @@ +twig=$twig; + + //for backward compatibility purposes + $this->twig->addFunction("html_variables",new Twig_SimpleFunction("html_variables",function(){ + return \comercia\Util::html()->variables(); + })); + + $class = new ReflectionClass("\\comercia\\Util"); + $methods=$class->getMethods(ReflectionMethod::IS_STATIC); + foreach($methods as $method){ + $this->handleClass($method->name); + } + + } + + private function handleClass($class) + { + if(file_exists(__DIR__."/".$class.".php")){ + include_once(__DIR__."/".$class.".php"); + $reflectionClass = new ReflectionClass("\\comercia\\".$class); + $methods=$reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC); + foreach($methods as $method){ + $this->handleMethod($class,$method->name); + } + } + } + + private function handleMethod($class, $method) + { + $funcName=$class."_".$method; + //should use + $this->twig->addFunction("comercia_".$funcName,new Twig_SimpleFunction("comercia_".$funcName,[Util::$class(),$method])); + //for compatibility + $this->twig->addFunction("util_".$funcName,new Twig_SimpleFunction("util_".$funcName,[Util::$class(),$method])); + } + } diff --git a/system/comercia/url.php b/system/comercia/url.php new file mode 100644 index 00000000..f6e0e49f --- /dev/null +++ b/system/comercia/url.php @@ -0,0 +1,91 @@ +IsInAdmin()) { + if (defined(HTTPS_CATALOG)) { + return HTTPS_CATALOG . "image/" . $image; + } + return HTTP_CATALOG . "image/" . $image; + } + if (defined(HTTPS_SERVER)) { + return HTTPS_SERVER . "image/" . $image; + } + return HTTP_SERVER . "image/" . $image; + } + + function catalog($route, $params = "", $ssl = true) + { + $url = $this->getCatalogUrl($ssl) . "index.php?route=" . $route; + if ($params) { + $url .= "&" . $params; + } + return $url; + } + + function getCatalogUrl($ssl = true) + { + if (Util::info()->IsInAdmin()) { + if (defined(HTTPS_CATALOG) && $ssl) { + return HTTPS_CATALOG; + } + return HTTP_CATALOG; + } + if (defined(HTTPS_SERVER) && $ssl) { + return HTTPS_SERVER; + } + return HTTP_SERVER; + } + + function link($route, $params = "", $ssl = true) + { + $session = Util::session(); + + if (Util::version()->isMinimal(3.0)) { + $tokenName = "user_token"; + } else { + $tokenName = "token"; + } + + if ($session->$tokenName && $session->user_id && strpos($params, "route=") === false) { + if ($session->$tokenName) { + if ($params) { + $params .= "&".$tokenName."=" . $session->$tokenName; + } else { + $params = $tokenName."=" . $session->$tokenName; + } + } + } + + if ($ssl && !HTTPS_SERVER) { + $ssl = false; + } + + $result = ""; + if (!$ssl) { + $result = $this->_url()->link($route, $params); + } else { + if (Util::version()->isMinimal("2.2")) { + $result = $this->_url()->link($route, $params, true); + } else { + $result = $this->_url()->link($route, $params, "ssl"); + } + } + + return str_replace("&", "&", $result); + } + + private function _url() + { + $registry = Util::registry(); + if (!$registry->has('url')) { + $registry->set('url', new Url(HTTP_SERVER)); + } + + return $registry->get("url"); + } +} + +?> \ No newline at end of file diff --git a/system/comercia/util.php b/system/comercia/util.php new file mode 100644 index 00000000..c06d18e1 --- /dev/null +++ b/system/comercia/util.php @@ -0,0 +1,270 @@ +get("session")->data); + } + return $session; + } + + public static function registry() + { + global $registry; + return $registry; + } + + public static function html() + { + static $html = false; + if (!$html) { + require_once(__DIR__ . "/html.php"); + $html = new Html(); + } + return $html; + } + + + public static function controllerHelper() + { + static $helper = false; + if (!$helper) { + require_once(__DIR__ . "/controllerHelper.php"); + $helper = new ControllerHelper(); + } + return $helper; + } + + public static function dateTimeHelper() + { + static $helper = false; + if (!$helper) { + require_once(__DIR__ . "/dateTimeHelper.php"); + $helper = new DateTimeHelper(); + } + return $helper; + } + + + public static function document() + { + static $document = false; + if (!$document) { + require_once(__DIR__ . "/document.php"); + $document = new Document(); + } + return $document; + } + + public static function patch() + { + static $patch = false; + if (!$patch) { + require_once(__DIR__ . "/patch.php"); + $patch = new Patch(); + } + return $patch; + } + + public static function twig() + { + static $twig = false; + if (!$twig) { + require_once(__DIR__ . "/twig.php"); + $twig = new Twig(); + } + return $twig; + } + + static function validation(&$data = array(), $store_id = -1, $error = array()) + { + require_once(__DIR__ . "/validation.php"); + return new Validation($data, $store_id, $error); + } + + static function proxy() + { + static $proxy = false; + if (!$proxy) { + require_once(__DIR__ . "/proxy.php"); + $proxy = new Proxy(); + } + return $proxy; + } +} + +?> diff --git a/system/comercia/validation.php b/system/comercia/validation.php new file mode 100644 index 00000000..04d0646c --- /dev/null +++ b/system/comercia/validation.php @@ -0,0 +1,30 @@ +data =& $data; + $this->store_id = $store_id; + $this->error = $error; + } + + function notIsset($error_key, $value) { + + $error = $this->error; + if (!isset($this->data[$error_key]) && isset($error[$this->store_id][$value])) { + $this->data[$error_key] = $error[$this->store_id][$value]; + } + else { + $this->data[$error_key] = ''; + } + return $this; + } +} + +?> \ No newline at end of file diff --git a/system/comercia/version.php b/system/comercia/version.php new file mode 100644 index 00000000..040e9d8e --- /dev/null +++ b/system/comercia/version.php @@ -0,0 +1,26 @@ +version = VERSION; + } + + function get() + { + return $this->version; + } + + function isMinimal($version) + { + return version_compare($version, $this->version, "<="); + } + + function isMaximal($version) + { + return version_compare($version, $this->version, ">="); + } +} \ No newline at end of file diff --git a/system/library/mollieHttpClient.php b/system/library/mollieHttpClient.php new file mode 100644 index 00000000..40abf4f2 --- /dev/null +++ b/system/library/mollieHttpClient.php @@ -0,0 +1,74 @@ + + */ +class mollieHttpClient +{ + + /** + * Send a post request + * @param string $url The url to send the request to + * @param array $data The data to send to the server + * @param string $token The session token + */ + function post($url, $data, $token = false, $parse = true) + { + $ch = curl_init(); + + $encoded=json_encode($data); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $encoded); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + $headers = [ + 'Content-Type:application/json' + ]; + if ($token) { + $headers[] = "token:" . $token; + } + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + + $server_output = curl_exec($ch); + curl_close($ch); + + if($parse) { + return json_decode($server_output, true); + }else{ + return $server_output; + } + } + + /** + * Send a get request + * @param string $url The url to send the request to + * @param string $token The session token + */ + function get($url, $token = false,$parse=true) + { + global $is_in_debug; + $ch = curl_init(); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/5.0"); + + if ($token) { + curl_setopt($ch, CURLOPT_HTTPHEADER, ["token:" . $token]); + }; + curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true); + + $server_output = curl_exec($ch); + curl_close($ch); + if($parse) { + return json_decode($server_output, true); + }else{ + return $server_output; + } + } + + +} +?> \ No newline at end of file diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 57178e3a..d2bc6155 100755 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,6 +4,7 @@ define("DIR_APPLICATION", realpath(dirname(__FILE__) . "/..")); define("DIR_SYSTEM", DIR_APPLICATION . "/system"); define("DIR_TEMPLATE", DIR_APPLICATION . "/catalog/view/theme"); +define("VERSION", '9.0.0'); date_default_timezone_set("Europe/Amsterdam"); @@ -13,9 +14,9 @@ $project_dir = dirname(dirname(__FILE__)); $map = array( - "MollieHelper" => "$project_dir/catalog/controller/extension/payment/mollie/helper.php", - "ControllerExtensionPaymentMollieBase" => "$project_dir/catalog/controller/extension/payment/mollie/base.php", - "ModelExtensionPaymentMollieBase" => "$project_dir/catalog/model/extension/payment/mollie/base.php", + "MollieHelper" => "$project_dir/catalog/controller/payment/mollie/helper.php", + "ControllerPaymentMollieBase" => "$project_dir/catalog/controller/payment/mollie/base.php", + "ModelPaymentMollieBase" => "$project_dir/catalog/model/payment/mollie/base.php", ); if (isset($map[$className])) diff --git a/tests/phpunit.xml b/tests/phpunit.xml index cb5b945a..9d89068f 100755 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -18,6 +18,7 @@ . ../admin/language ../catalog/language + ../catalog/controller/payment/mollie-api-client ../admin diff --git a/tests/unittests/catalog/model/ModelExtensionPaymentMollieIdealTest.php b/tests/unittests/catalog/model/ModelPaymentMollieIdealTest.php old mode 100755 new mode 100644 similarity index 51% rename from tests/unittests/catalog/model/ModelExtensionPaymentMollieIdealTest.php rename to tests/unittests/catalog/model/ModelPaymentMollieIdealTest.php index 2bc90dc3..9d51b060 --- a/tests/unittests/catalog/model/ModelExtensionPaymentMollieIdealTest.php +++ b/tests/unittests/catalog/model/ModelPaymentMollieIdealTest.php @@ -1,9 +1,9 @@ model = $this->getMock("ModelExtensionPaymentMollieBase", array("getAPIClient", "getIssuers", "getCurrentDate")); + $this->model = $this->getMock("ModelPaymentMollieBase", array("getAPIClient", "getIssuers", "getCurrentDate")); $this->model->db = $this->getMock("stub", array("query", "escape", "countAffected")); // Mock API client. @@ -54,69 +54,6 @@ public function setUp() $this->model->url = $this->getMock("stub", array("link")); } - /** - * Add mock payment methods to the list of payment methods the API client will return. - * - * @param string $id - * @param int $min_amount - * @param int $max_amount - * - * @return mixed - */ - protected function addPaymentMethod ($id = "method", $min_amount = 0, $max_amount = 999) - { - $method = $this->getMock("stub", array("getMinimumAmount", "getMaximumAmount")); - - $method->id = $id; - $method->description = $id; - - $method->image = new StdClass; - $method->image->normal = NULL; - $method->image->bigger = NULL; - - $method->method("getMinimumAmount")->willReturn($min_amount); - $method->method("getMaximumAmount")->willReturn($max_amount); - - $this->client_methods[] = $method; - - return $method; - } - - /** - * Retrieve the correct payment methods for a specified amount. - */ - public function testGetMethodCanReturnNULL () - { - $method = $this->getMock("stub", array("getMinimumAmount", "getMaximumAmount")); - - $method->id = NULL; - $method->description = NULL; - - $this->client_methods - ->expects($this->exactly(3)) - ->method("get") - ->with(NULL) - ->willReturn($method); - - $method - ->expects($this->exactly(3)) - ->method("getMinimumAmount") - ->willReturn(100); - - $method - ->expects($this->exactly(3)) - ->method("getMaximumAmount") - ->willReturn(200); - - $return_50 = $this->model->getMethod("some address", 50); - $return_150 = $this->model->getMethod("some address", 150); - $return_250 = $this->model->getMethod("some address", 250); - - $this->assertNull($return_50); - $this->assertNotNull($return_150); - $this->assertNull($return_250); - } - public function testSetPaymentReturnsFalseIfArgumentsOmitted() { $this->assertFalse($this->model->setPayment(NULL, NULL)); @@ -126,7 +63,7 @@ public function testSetPaymentNothingAffected() { $this->model->db->expects($this->once()) ->method("query") - ->with("REPLACE INTO `prefix_mollie_payments` (`order_id` ,`transaction_id`, `method`) + ->with("REPLACE INTO `prefix_mollie_payments` (`order_id` ,`mollie_order_id`, `method`) VALUES ('1337', '1bba1d8fdbd8103b46151634bdbe0a60', 'idl')"); $this->model->db->expects($this->once()) @@ -140,7 +77,7 @@ public function testSetPaymentPaymentSet() { $this->model->db->expects($this->once()) ->method("query") - ->with("REPLACE INTO `prefix_mollie_payments` (`order_id` ,`transaction_id`, `method`) + ->with("REPLACE INTO `prefix_mollie_payments` (`order_id` ,`mollie_order_id`, `method`) VALUES ('1337', '1bba1d8fdbd8103b46151634bdbe0a60', 'idl')"); $this->model->db->expects($this->once()) diff --git a/tests/unittests/translationTest.php b/tests/unittests/translationTest.php index b56113e3..ad202561 100755 --- a/tests/unittests/translationTest.php +++ b/tests/unittests/translationTest.php @@ -27,7 +27,6 @@ public function testTranslationFilesHaveIdenticalKeys($orig_path) { $lang_path = $path . DIRECTORY_SEPARATOR . $language . - DIRECTORY_SEPARATOR . "extension" . DIRECTORY_SEPARATOR . "payment" . DIRECTORY_SEPARATOR . "mollie.php"; $_ = array(); diff --git a/vqmod/xml/comercia_util.xml b/vqmod/xml/comercia_util.xml new file mode 100644 index 00000000..561fc36a --- /dev/null +++ b/vqmod/xml/comercia_util.xml @@ -0,0 +1,81 @@ + + Comercia Utility + 1.0.6 + 2.3.0 + Comercia - Mark Smit + + + + + + + + + + + + + + + + + + + ]]> + variables();?>]]> + + + + + + + ]]> + variables();?>]]> + + + + + + + + ]]> + + + + + + + + ]]> + + + + + + + + + + twig = new \Twig_Environment]]> + prepare($this->twig); + ]]> + + + + + + + + + + + + + + + diff --git a/vqmod/xml/mollie.xml b/vqmod/xml/mollie.xml new file mode 100644 index 00000000..32608ada --- /dev/null +++ b/vqmod/xml/mollie.xml @@ -0,0 +1,64 @@ + + Mollie + 1.0.0 + 2.3.0 + Comercia - Pradeep Mishra + + + + + + + + + + + + + + + + + + + db->query("SELECT * FROM `" . DB_PREFIX . "mollie_payments` WHERE `order_id` = '" . $order_id . "'"); + if($results->num_rows == 0) return FALSE; + return $results->row['mollie_order_id']; + } + return FALSE; + }]]> + + + + + model_checkout_order->addOrderHistory]]> + $order_id, "1" => $this->request->post['order_status_id']); + $route = null; + require(DIR_APPLICATION . "controller/payment/mollie/base.php"); + $controller = new ControllerPaymentMollieBase($this->registry); + $controller->createShipment($route, $orderdata, "", ""); + } ]]> + + + + + data['success']]]> + $this->request->get['order_id'], "1" => $this->request->post['order_status_id']); + $route = null; + require(DIR_CATALOG . "controller/payment/mollie/base.php"); + $controller = new ControllerPaymentMollieBase($this->registry); + $controller->createShipment($route, $orderdata, "", ""); + } ]]> + + +