27 Commits
3.0 ... master

Author SHA1 Message Date
Wouter van Os
3a9b89a235 Merge pull request #113 from lennarttd/master
Update payment methods
2025-12-08 17:44:19 +01:00
Lennart Dreves
3cba71bc53 Added TWINT payment method 2025-12-08 00:06:36 +01:00
Lennart Dreves
3baec5213b Added Trustly payment method 2025-12-08 00:06:01 +01:00
Lennart Dreves
e98d43a21c Added Riverty payment method 2025-12-08 00:05:20 +01:00
Lennart Dreves
4eaf7282a7 Added Satispay payment method 2025-12-08 00:03:38 +01:00
Lennart Dreves
56a5807ab4 Added Pay By Bank payment method 2025-12-08 00:02:53 +01:00
Lennart Dreves
b943522a15 Added Multibanco payment method 2025-12-08 00:01:28 +01:00
Lennart Dreves
68d4fd291e Added MB Way payment method 2025-12-08 00:00:40 +01:00
Lennart Dreves
b30cf479f5 Added Klarna payment methods 2025-12-07 23:59:52 +01:00
Lennart Dreves
ed5e6d8d55 Added iDEAL in3 payment method 2025-12-07 23:57:07 +01:00
Lennart Dreves
d383244989 Updated iDEAL payment method 2025-12-07 23:55:47 +01:00
Lennart Dreves
4a25437b79 Added Swish payment method 2025-12-07 23:55:22 +01:00
Lennart Dreves
77def8d286 Removed Giropay payment method 2025-12-07 23:54:19 +01:00
Lennart Dreves
def58b956c Added BLIK payment method 2025-12-07 23:53:19 +01:00
Lennart Dreves
498b1240fb Added Billie payment method 2025-12-07 23:52:47 +01:00
Lennart Dreves
8faa67d630 Removed Sofort Banking payment method 2025-12-07 23:49:23 +01:00
Lennart Dreves
aa339a11cc Update Belfius Pay Button payment method 2025-12-07 23:49:06 +01:00
Lennart Dreves
490570d104 Added BANCOMAT Pay payment method 2025-12-07 23:48:08 +01:00
Lennart Dreves
644553385e Added Bacs payment method 2025-12-07 23:46:08 +01:00
Lennart Dreves
f060c837fd Added Alma payment method 2025-12-07 23:45:07 +01:00
Lennart Dreves
8bc6a3004b Bump Mollie API version 2025-12-07 23:40:29 +01:00
Wouter van Os
8b0ee80c4b feat: implement iDeal 2.0 support
Not sure what happened in the previous commit, here we go again.
2025-07-04 09:37:11 +02:00
Wouter van Os
8352ca7b32 feat: fix payment ID length
The current value is too small, increasing it to 64 bytes.
2025-06-24 16:07:00 +02:00
Wouter van Os
bf67c41604 feat: implement iDeal 2.0 support
Untested & draft, but this change should implement iDeal 2.0. The only thing I've heard is that we should remove issuer selection.
2024-12-17 11:41:34 +01:00
Wouter van Os
4e3fc4f1cb feat: extend bank transfers to 100 days validity 2021-10-26 14:30:59 +02:00
Wouter van Os
f3378c5181 Merge pull request #80 from adrijanb/remove_ing
Remove ING Home Pay
2021-02-16 09:26:13 +01:00
Adrijan Bajrami
b70fec170f Remove ING Home Pay 2021-02-15 01:08:18 +01:00
22 changed files with 353 additions and 29 deletions

View File

@@ -1,6 +1,6 @@
{ {
"require": { "require": {
"mollie/mollie-api-php": "^2.0" "mollie/mollie-api-php": "^3.7"
}, },
"config": { "config": {
"vendor-dir": "src/mollie/vendor" "vendor-dir": "src/mollie/vendor"

View File

@@ -41,7 +41,13 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
$tableCheckQuery = full_query('SHOW TABLES LIKE \'gateway_mollie\''); $tableCheckQuery = full_query('SHOW TABLES LIKE \'gateway_mollie\'');
if (mysql_num_rows($tableCheckQuery) != 1) { if (mysql_num_rows($tableCheckQuery) != 1) {
full_query('CREATE TABLE IF NOT EXISTS `gateway_mollie` (`id` int(11) NOT NULL AUTO_INCREMENT, `paymentid` varchar(15), `amount` double NOT NULL, `currencyid` int(11) NOT NULL, `ip` varchar(50) NOT NULL, `userid` int(11) NOT NULL, `invoiceid` int(11) NOT NULL, `status` ENUM(\'open\',\'paid\',\'closed\') NOT NULL DEFAULT \'open\', `method` VARCHAR(25) NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `paymentid` (`paymentid`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;'); full_query('CREATE TABLE IF NOT EXISTS `gateway_mollie` (`id` int(11) NOT NULL AUTO_INCREMENT, `paymentid` varchar(64), `amount` double NOT NULL, `currencyid` int(11) NOT NULL, `ip` varchar(50) NOT NULL, `userid` int(11) NOT NULL, `invoiceid` int(11) NOT NULL, `status` ENUM(\'open\',\'paid\',\'closed\') NOT NULL DEFAULT \'open\', `method` VARCHAR(25) NOT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `paymentid` (`paymentid`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;');
}
$paymentIdQuery = full_query("SHOW COLUMNS FROM `gateway_mollie` WHERE `Field` = 'paymentid' AND `Type` LIKE '%64%'");
if (mysql_num_rows($paymentIdQuery) == 0) {
full_query("ALTER TABLE `gateway_mollie` CHANGE `paymentid` `paymentid` VARCHAR(64);");
} }
$mollie = new \Mollie\Api\MollieApiClient(); $mollie = new \Mollie\Api\MollieApiClient();
@@ -97,7 +103,7 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
'metadata' => array( 'metadata' => array(
'invoice_id' => $params['invoiceid'], 'invoice_id' => $params['invoiceid'],
), ),
'issuer' => ((isset($_POST['issuer']) && !empty($_POST['issuer'])) ? $_POST['issuer'] : NULL) 'dueDate' => (($method == \Mollie\Api\Types\PaymentMethod::BANKTRANSFER) ? date('Y-m-d', strtotime('+100 days')) : NULL),
)); ));
update_query('gateway_mollie', array('paymentid' => $payment->id), array('id' => $transactionId)); update_query('gateway_mollie', array('paymentid' => $payment->id), array('id' => $transactionId));
@@ -107,18 +113,6 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
} else { } else {
$return = '<form action="viewinvoice.php?id=' . $params['invoiceid'] . '" method="POST">'; $return = '<form action="viewinvoice.php?id=' . $params['invoiceid'] . '" method="POST">';
if ($method == \Mollie\Api\Types\PaymentMethod::IDEAL) {
$issuers = $mollie->methods->get('ideal', ['include' => 'issuers'])->issuers;
$return .= '<label for="issuer">' . $_GATEWAYLANG['selectBank'] . ':</label> ';
$return .= '<select name="issuer">';
foreach ($issuers as $issuer) {
$return .= '<option value=' . htmlspecialchars($issuer->id) . '>' . htmlspecialchars($issuer->name) . '</option>';
}
$return .= '</select>';
}
$return .= '<input type="submit" name="start" value="' . $_GATEWAYLANG['payWith' . ucfirst($method)] . '" /></form>'; $return .= '<input type="submit" name="start" value="' . $_GATEWAYLANG['payWith' . ucfirst($method)] . '" /></form>';
return $return; return $return;

View File

@@ -2,21 +2,21 @@
require_once __DIR__ . '/mollie/mollie.php'; require_once __DIR__ . '/mollie/mollie.php';
function molliegiropay_devapp_config() function molliealma_devapp_config()
{ {
$config = mollie_config(); $config = mollie_config();
$config = array_merge($config, array( $config = array_merge($config, array(
'FriendlyName' => array( 'FriendlyName' => array(
'Type' => 'System', 'Type' => 'System',
'Value' => 'Mollie Giropay' 'Value' => 'Mollie Alma'
) )
)); ));
return $config; return $config;
} }
function molliegiropay_devapp_link($params) function molliealma_devapp_link($params)
{ {
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::GIROPAY); return mollie_link($params, \Mollie\Api\Types\PaymentMethod::ALMA);
} }

View File

@@ -2,21 +2,21 @@
require_once __DIR__ . '/mollie/mollie.php'; require_once __DIR__ . '/mollie/mollie.php';
function molliesofort_devapp_config() function molliebacs_devapp_config()
{ {
$config = mollie_config(); $config = mollie_config();
$config = array_merge($config, array( $config = array_merge($config, array(
'FriendlyName' => array( 'FriendlyName' => array(
'Type' => 'System', 'Type' => 'System',
'Value' => 'Mollie Sofort Banking' 'Value' => 'Mollie Bacs'
) )
)); ));
return $config; return $config;
} }
function molliesofort_devapp_link($params) function molliebacs_devapp_link($params)
{ {
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::SOFORT); return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BACS);
} }

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function molliebancomatpay_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie BANCOMAT Pay'
)
));
return $config;
}
function molliebancomatpay_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BANCOMATPAY);
}

View File

@@ -9,7 +9,7 @@ function molliebelfius_devapp_config()
$config = array_merge($config, array( $config = array_merge($config, array(
'FriendlyName' => array( 'FriendlyName' => array(
'Type' => 'System', 'Type' => 'System',
'Value' => 'Mollie Belfius' 'Value' => 'Mollie Belfius Pay Button'
) )
)); ));

View File

@@ -2,21 +2,21 @@
require_once __DIR__ . '/mollie/mollie.php'; require_once __DIR__ . '/mollie/mollie.php';
function mollieinghomepay_devapp_config() function molliebillie_devapp_config()
{ {
$config = mollie_config(); $config = mollie_config();
$config = array_merge($config, array( $config = array_merge($config, array(
'FriendlyName' => array( 'FriendlyName' => array(
'Type' => 'System', 'Type' => 'System',
'Value' => 'Mollie ING Home\'Pay' 'Value' => 'Mollie Billie'
) )
)); ));
return $config; return $config;
} }
function mollieinghomepay_devapp_link($params) function molliebillie_devapp_link($params)
{ {
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::INGHOMEPAY); return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BILLIE);
} }

22
src/mollieblik_devapp.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function mollieblik_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie BLIK'
)
));
return $config;
}
function mollieblik_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BLIK);
}

View File

@@ -9,7 +9,7 @@ function mollieideal_devapp_config()
$config = array_merge($config, array( $config = array_merge($config, array(
'FriendlyName' => array( 'FriendlyName' => array(
'Type' => 'System', 'Type' => 'System',
'Value' => 'Mollie iDeal' 'Value' => 'Mollie iDEAL'
) )
)); ));

22
src/molliein3_devapp.php Executable file
View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function molliein3_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie iDEAL in3'
)
));
return $config;
}
function molliein3_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::IN3);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function mollieklarna_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie Klarna'
)
));
return $config;
}
function mollieklarna_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::KLARNA);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function mollieklarnapaylater_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie Klarna Pay Later'
)
));
return $config;
}
function mollieklarnapaylater_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::KLARNA_PAY_LATER);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function mollieklarnapaynow_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie Klarna Pay Now'
)
));
return $config;
}
function mollieklarnapaynow_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::KLARNA_PAY_NOW);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function mollieklarnasliceit_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie Klarna Slice It'
)
));
return $config;
}
function mollieklarnasliceit_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::KLARNA_SLICE_IT);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function molliembway_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie MB Way'
)
));
return $config;
}
function molliembway_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::MBWAY);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function molliemultibanco_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie Multibanco'
)
));
return $config;
}
function molliemultibanco_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::MULTIBANCO);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function molliepaybybank_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie Pay By Bank'
)
));
return $config;
}
function molliepaybybank_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::PAYBYBANK);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function mollieriverty_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie Riverty'
)
));
return $config;
}
function mollieriverty_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::RIVERTY);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function molliesatispay_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie Satispay'
)
));
return $config;
}
function molliesatispay_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::SATISPAY);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function mollieswish_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie Swish'
)
));
return $config;
}
function mollieswish_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::SWISH);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function mollietrustly_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie Trustly'
)
));
return $config;
}
function mollietrustly_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::TRUSTLY);
}

View File

@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/mollie/mollie.php';
function mollietwint_devapp_config()
{
$config = mollie_config();
$config = array_merge($config, array(
'FriendlyName' => array(
'Type' => 'System',
'Value' => 'Mollie TWINT'
)
));
return $config;
}
function mollietwint_devapp_link($params)
{
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::TWINT);
}