Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin ps dependency #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# Changelog #

## Changes in release 6.2.1 ##
+ Ideal v2 payment method improvement

## Changes in release 6.2.0 ##
+ New payment methods: Bancomat and Alma
+ Apple certificate update
Expand Down
6 changes: 5 additions & 1 deletion controllers/admin/AdminMollieSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ public function postProcess()
$this->module->getLocalPath() . 'views/templates/admin/logo.tpl'
);

$this->initCloudSyncAndPsAccounts();
try {
$this->initCloudSyncAndPsAccounts();
} catch (Exception $e) {
// Note: we do not want to break the admin page if there is an error then initiating PS dependencies
}

/** @var \Mollie\Repository\ModuleRepository $moduleRepository */
$moduleRepository = $this->module->getService(\Mollie\Repository\ModuleRepository::class);
Expand Down
1 change: 0 additions & 1 deletion controllers/front/bancontactAjax.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ private function createTransaction()
$cart->getOrderTotal(),
$currency->iso_code,
PaymentMethod::BANCONTACT,
null,
$cart->id,
$cart->secure_key,
$paymentMethod,
Expand Down
2 changes: 0 additions & 2 deletions controllers/front/payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public function initContent()
}

$method = Tools::getValue('method');
$issuer = Tools::getValue('issuer') ?: null;

$originalAmount = $cart->getOrderTotal(
true,
Expand Down Expand Up @@ -105,7 +104,6 @@ public function initContent()
$amount,
Tools::strtoupper($this->context->currency->iso_code),
$method,
$issuer,
(int) $cart->id,
$customer->secure_key,
$paymentMethodObj,
Expand Down
1 change: 0 additions & 1 deletion mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,6 @@ public function hookActionValidateOrder($params)
$totalPaid,
$currency,
'',
null,
$cartId,
$customerKey,
$paymentMethodObj,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ private function createMollieTransaction(Cart $cart, string $cardToken)
$cart->getOrderTotal(true, Cart::BOTH, null, $cart->id_carrier),
Tools::strtoupper($currency->iso_code),
Config::APPLEPAY,
null,
(int) $cart->id,
$cart->secure_key,
$paymentMethodObj,
Expand Down
61 changes: 0 additions & 61 deletions src/Builder/Content/PaymentOption/IdealDropdownInfoBlock.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Builder/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,31 +372,6 @@ protected function getAccountSettingsSection($isApiKeyProvided)
],
];

$input = array_merge($input, [
[
'type' => 'select',
'label' => $this->module->l('Issuer list', self::FILE_NAME),
'tab' => $generalSettings,
'desc' => $this->module->l('Some payment methods (e.g. iDEAL) have an issuer list. Select where to display the list.', self::FILE_NAME),
'name' => Config::MOLLIE_ISSUERS[(int) $this->configuration->get(Config::MOLLIE_ENVIRONMENT) ? 'production' : 'sandbox'],
'options' => [
'query' => [
[
'id' => Config::ISSUERS_ON_CLICK,
'name' => $this->module->l('In the shop checkout', self::FILE_NAME),
],
[
'id' => Config::ISSUERS_PAYMENT_PAGE,
'name' => $this->module->l('In the Mollie Checkout', self::FILE_NAME),
],
],
'id' => 'id',
'name' => 'name',
],
],
]
);

$input[] = [
'type' => 'mollie-h2',
'tab' => $generalSettings,
Expand Down
7 changes: 1 addition & 6 deletions src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ class Config
const LOGOS_NORMAL = 'normal';
const LOGOS_HIDE = 'hide';

const ISSUERS_ON_CLICK = 'on-click';
const ISSUERS_PAYMENT_PAGE = 'payment-page';
const METHODS_CONFIG = 'MOLLIE_METHODS_CONFIG';

const ENVIRONMENT_TEST = 0;
Expand Down Expand Up @@ -113,10 +111,7 @@ class Config

const MOLLIE_IMAGES = 'MOLLIE_IMAGES';
const MOLLIE_SHOW_RESEND_PAYMENT_LINK = 'MOLLIE_SHOW_RESEND_PAYMENT_LINK';
const MOLLIE_ISSUERS = [
'sandbox' => 'MOLLIE_SANDBOX_ISSUERS',
'production' => 'MOLLIE_PRODUCTION_ISSUERS',
];

const MOLLIE_CSS = 'MOLLIE_CSS';
const MOLLIE_DEBUG_LOG = 'MOLLIE_DEBUG_LOG';
const MOLLIE_METHOD_COUNTRIES = 'MOLLIE_METHOD_COUNTRIES';
Expand Down
19 changes: 0 additions & 19 deletions src/DTO/Object/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ class Payment implements \JsonSerializable
/** @var string */
private $webhookUrl;
/** @var ?string */
private $issuer;
/** @var ?string */
private $customerId;
/** @var ?string */
private $applePayPaymentToken;
Expand Down Expand Up @@ -60,22 +58,6 @@ public function setWebhookUrl(string $webhookUrl): void
$this->webhookUrl = $webhookUrl;
}

/**
* @return ?string
*/
public function getIssuer(): ?string
{
return $this->issuer;
}

/**
* @maps issuer
*/
public function setIssuer(string $issuer): void
{
$this->issuer = $issuer;
}

/**
* @return ?string
*/
Expand Down Expand Up @@ -131,7 +113,6 @@ public function jsonSerialize()
$result = [];
$result['cardToken'] = $this->getCardToken();
$result['webhookUrl'] = $this->getWebhookUrl();
$result['issuer'] = $this->getIssuer();
$result['customerId'] = $this->getCustomerId();
$result['applePayPaymentToken'] = $this->getApplePayPaymentToken();
$result['company'] = $this->getCompany() ? $this->getCompany()->jsonSerialize() : null;
Expand Down
22 changes: 0 additions & 22 deletions src/DTO/PaymentData.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ class PaymentData implements JsonSerializable
*/
private $locale;

/**
* @var string
*/
private $issuer;

/**
* @var string
*/
Expand Down Expand Up @@ -230,22 +225,6 @@ public function setLocale($locale)
$this->locale = $locale;
}

/**
* @return string
*/
public function getIssuer()
{
return $this->issuer;
}

/**
* @param string $issuer
*/
public function setIssuer($issuer)
{
$this->issuer = $issuer;
}

/**
* @return string
*/
Expand Down Expand Up @@ -387,7 +366,6 @@ public function jsonSerialize()
'method' => $this->getMethod(),
'metadata' => $this->getMetadata(),
'locale' => $this->getLocale(),
'issuer' => $this->getIssuer(),
'cardToken' => $this->getCardToken(),
'customerId' => $this->getCustomerId(),
'applePayPaymentToken' => $this->getApplePayToken(),
Expand Down
39 changes: 0 additions & 39 deletions src/Entity/MolPaymentMethodIssuer.php

This file was deleted.

4 changes: 0 additions & 4 deletions src/Handler/PaymentOption/PaymentOptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ private function isIdealPaymentMethod(MolPaymentMethod $paymentMethod)
return false;
}

if ($this->configurationAdapter->get(Config::MOLLIE_ISSUERS) !== Config::ISSUERS_ON_CLICK) {
return false;
}

return true;
}

Expand Down
6 changes: 0 additions & 6 deletions src/Install/DatabaseTableInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ private function getCommands()
`id_shop` INT(64) DEFAULT 1
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';

$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'mol_payment_method_issuer` (
`id_payment_method_issuer` INT(64) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`id_payment_method` INT(64) NOT NULL,
`issuers_json` TEXT NOT NULL
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';

$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'mol_order_payment_fee` (
`id_mol_order_payment_fee` INT(64) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`id_cart` INT(64) NOT NULL,
Expand Down
1 change: 0 additions & 1 deletion src/Install/DatabaseTableUninstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ private function getCommands(): array

$sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'mol_country`;';
$sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'mol_payment_method`;';
$sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'mol_payment_method_issuer`;';
$sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'mol_carrier_information`;';
$sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'mol_pending_order_cart`;';
$sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'mol_excluded_country`;';
Expand Down
1 change: 0 additions & 1 deletion src/Install/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ protected function initConfig()
$this->configurationAdapter->updateValue(Config::MOLLIE_PAYMENTSCREEN_LOCALE, Config::PAYMENTSCREEN_LOCALE_BROWSER_LOCALE);
$this->configurationAdapter->updateValue(Config::MOLLIE_IFRAME, true);
$this->configurationAdapter->updateValue(Config::MOLLIE_IMAGES, Config::LOGOS_NORMAL);
$this->configurationAdapter->updateValue(Config::MOLLIE_ISSUERS, Config::ISSUERS_ON_CLICK);
$this->configurationAdapter->updateValue(Config::MOLLIE_CSS, '');
$this->configurationAdapter->updateValue(Config::MOLLIE_TRACKING_URLS, '');
$this->configurationAdapter->updateValue(Config::MOLLIE_DEBUG_LOG, Config::DEBUG_LOG_ERRORS);
Expand Down
1 change: 0 additions & 1 deletion src/Install/Uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ private function deleteConfig()
Config::MOLLIE_SEND_ORDER_CONFIRMATION,
Config::MOLLIE_IFRAME,
Config::MOLLIE_IMAGES,
Config::MOLLIE_ISSUERS,
Config::MOLLIE_CSS,
Config::MOLLIE_DEBUG_LOG,
Config::MOLLIE_DISPLAY_ERRORS,
Expand Down
Loading
Loading