Skip to content

Commit

Permalink
Merge pull request #110 from logeecom/4.1-4.4
Browse files Browse the repository at this point in the history
Release version 2.0.20
  • Loading branch information
ivan-logeecom authored Oct 7, 2024
2 parents 2bf579e + 4101f31 commit 41a6b3e
Show file tree
Hide file tree
Showing 40 changed files with 921 additions and 218 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
use Mollie\Gambio\CustomFields\Providers\CustomFieldsProvider;
use Mollie\Gambio\CustomFields\Providers\IssuerListSupportedCustomFieldsProvider;
use Mollie\Gambio\CustomFields\Providers\KlarnaCustomFieldsProvider;
use Mollie\Gambio\CustomFields\Providers\BillieCustomFieldsProvider;
use Mollie\Gambio\CustomFields\Providers\RivertyCustomFieldsProvider;

/**
* Class CustomFieldsProviderFactory
Expand All @@ -27,6 +29,14 @@ public static function getProvider($methodKey)
return new KlarnaCustomFieldsProvider($methodKey);
}

if (strpos($methodKey, 'mollie_billie') !== false) {
return new BillieCustomFieldsProvider($methodKey);
}

if (strpos($methodKey, 'riverty') !== false) {
return new RivertyCustomFieldsProvider($methodKey);
}

if($methodKey === 'mollie_creditcard'){
return new CreditCardCustomFieldsProvider($methodKey);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php

namespace Mollie\Gambio\CustomFields\Providers;

/**
* Class BillieCustomFieldsProvider
*
* @package Mollie\Gambio\CustomFields\Providers
*/
class BillieCustomFieldsProvider extends CustomFieldsProvider
{
/**
* @inheritDoc
*
* @return string
* @throws \Exception
*/
public function renderAllCustomFields()
{
return $this->renderLogoEdit() .
$this->renderMultiLangEdit() .
$this->renderApiEdit() .
$this->renderDaysToExpireEdit() .
$this->renderCountryZonesEdit();
}

/**
* @inheritDoc
*
* @return string
* @throws \Exception
*/
public function renderCustomOverviewFields()
{
return $this->renderLogoOverview() .
$this->renderMultiLangFieldsOverview() .
$this->renderApiOverview() .
$this->renderDaysToExpireOverview() .
$this->renderCountryZonesOverview();
}

/**
* @inheritDoc
* @return string
*/
protected function renderApiEdit()
{
return '';
}

/**
* @inheritDoc
* @return string
*/
protected function renderApiOverview()
{
return '';
}

/**
* @return string
* @throws \Exception
*/
protected function renderMultiLangEdit()
{
$titleKey = $this->_formatKey('CHECKOUT_NAME');
$descKey = $this->_formatKey('CHECKOUT_DESCRIPTION');

return mollie_multi_language_text($this->getConstantValue($titleKey), $titleKey) .
mollie_multi_language_text($this->getConstantValue($descKey), $descKey);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace Mollie\Gambio\CustomFields\Providers;

/**
* Class RivertyCustomFieldsProvider
*
* @package Mollie\Gambio\CustomFields\Providers
*/
class RivertyCustomFieldsProvider extends CustomFieldsProvider
{
/**
* @inheritDoc
* @return string
*/
protected function renderApiEdit()
{
return '';
}

/**
* @inheritDoc
* @return string
*/
protected function renderApiOverview()
{
return '';
}

/**
* @return string
* @throws \Exception
*/
protected function renderMultiLangEdit()
{
$titleKey = $this->_formatKey('CHECKOUT_NAME');
$descKey = $this->_formatKey('CHECKOUT_DESCRIPTION');

return mollie_multi_language_text($this->getConstantValue($titleKey), $titleKey) .
mollie_multi_language_text($this->getConstantValue($descKey), $descKey);
}
}
4 changes: 2 additions & 2 deletions GXModules/Mollie/Mollie/composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "mollie/gambio",
"version": "2.0.19",
"version": "2.0.20",
"require": {
"php": ">=5.4",
"mollie/integration-core": "1.3.8"
"mollie/integration-core": "1.3.9"
},
"repositories": [
{
Expand Down
14 changes: 10 additions & 4 deletions GXModules/Mollie/Mollie/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions GXModules/Mollie/Mollie/vendor/composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ private static function getInstalled()
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
Expand All @@ -338,12 +340,17 @@ private static function getInstalled()
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;

if (self::$installed !== array()) {
$installed[] = self::$installed;
}

return $installed;
}
Expand Down
14 changes: 10 additions & 4 deletions GXModules/Mollie/Mollie/vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
"packages": [
{
"name": "mollie/integration-core",
"version": "1.3.8",
"version_normalized": "1.3.8.0",
"version": "1.3.9",
"version_normalized": "1.3.9.0",
"source": {
"type": "git",
"url": "[email protected]:mollie/orocore.git",
"reference": "25034947afe94193297e6504cbbc1edc18cd219e"
"reference": "8a07e5e317dfbffeaa552820ee843701a24a8fd5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mollie/orocore/zipball/8a07e5e317dfbffeaa552820ee843701a24a8fd5",
"reference": "8a07e5e317dfbffeaa552820ee843701a24a8fd5",
"shasum": ""
},
"require": {
"ext-json": "*",
Expand All @@ -18,7 +24,7 @@
"phpunit/phpunit": "^4.8.35",
"symfony/console": "^5.1"
},
"time": "2024-04-19T07:26:56+00:00",
"time": "2024-09-16T12:55:55+00:00",
"type": "library",
"installation-source": "source",
"autoload": {
Expand Down
18 changes: 9 additions & 9 deletions GXModules/Mollie/Mollie/vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<?php return array(
'root' => array(
'pretty_version' => '2.0.19',
'version' => '2.0.19.0',
'pretty_version' => '2.0.20',
'version' => '2.0.20.0',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => NULL,
'reference' => null,
'name' => 'mollie/gambio',
'dev' => true,
),
'versions' => array(
'mollie/gambio' => array(
'pretty_version' => '2.0.19',
'version' => '2.0.19.0',
'pretty_version' => '2.0.20',
'version' => '2.0.20.0',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => NULL,
'reference' => null,
'dev_requirement' => false,
),
'mollie/integration-core' => array(
'pretty_version' => '1.3.8',
'version' => '1.3.8.0',
'pretty_version' => '1.3.9',
'version' => '1.3.9.0',
'type' => 'library',
'install_path' => __DIR__ . '/../mollie/integration-core',
'aliases' => array(),
'reference' => '25034947afe94193297e6504cbbc1edc18cd219e',
'reference' => '8a07e5e317dfbffeaa552820ee843701a24a8fd5',
'dev_requirement' => false,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ class PaymentMethodConfig extends Entity
PaymentMethods::KlarnaPayLater => self::API_METHOD_ORDERS,
PaymentMethods::KlarnaSliceIt => self::API_METHOD_ORDERS,
PaymentMethods::KlarnaPayNow => self::API_METHOD_ORDERS,
PaymentMethods::Vouchers => self::API_METHOD_ORDERS
PaymentMethods::Klarna => self::API_METHOD_ORDERS,
PaymentMethods::Vouchers => self::API_METHOD_ORDERS,
PaymentMethods::Billie => self::API_METHOD_ORDERS,
PaymentMethods::Riverty => self::API_METHOD_ORDERS
);

/**
Expand All @@ -61,6 +64,8 @@ class PaymentMethodConfig extends Entity
PaymentMethods::KlarnaPayLater,
PaymentMethods::KlarnaSliceIt,
PaymentMethods::KlarnaPayNow,
PaymentMethods::Klarna,
PaymentMethods::Billie
);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ class PaymentMethods
const GiftCard = 'giftcard';
const Vouchers = 'voucher';
const Banktransfer = 'banktransfer';
const Billie = 'billie';
const Klarna = 'klarna';
const Riverty = 'riverty';
const Trustly = 'trustly';
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ Read more about the integration configuration on [our Wiki](https://github.com/m

# Release notes

*2.0.20*
- Add Billie payment method
- Add Klarna One payment method
- Add Rivery payment method
- Deactivate Giropay. Add Trustly payment method

*2.0.19*
- Add casting to array in DTO classes

Expand Down
Binary file added images/icons/payment/mollie_billie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/payment/mollie_klarna.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/payment/mollie_riverty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icons/payment/mollie_trustly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions includes/modules/payment/mollie_billie.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Mollie\BusinessLogic\PaymentMethod\Model\PaymentMethodConfig;

require_once __DIR__ . '/mollie/mollie.php';

/**
* Class mollie_billie
*/
class mollie_billie extends mollie
{
public $title = 'Billie';

/**
* @inheritDoc
* @return array
*/
public function keys()
{
$keys = parent::keys();
$hidden = ['MODULE_PAYMENT_' . strtoupper($this->code) . '_API_METHOD'];
return array_values(array_diff($keys, $hidden));
}

/**
* @return string
*/
protected function _getDefaultApi()
{
return PaymentMethodConfig::API_METHOD_ORDERS;
}
}
11 changes: 0 additions & 11 deletions includes/modules/payment/mollie_giropay.php

This file was deleted.

Loading

0 comments on commit 41a6b3e

Please sign in to comment.