forked from clone/WHMCS-Mollie-Payments
Reformatted code and added support for all payment methods
This commit adds the following payment methods: - EPS - Giftcards - Giropay - ING Home'Pay - KBC/CBC I've also ran a reformatter to clean up the code and added composer instead of git modules. The latter enables us to keep up-to-date with the last Mollie library in a more modern manner.
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* Setting requirements and includes
|
||||
* Setting requirements and includes
|
||||
*
|
||||
*/
|
||||
require_once __DIR__ . '/../../../init.php';
|
||||
require_once __DIR__ . '/vendor/Mollie/src/Mollie/API/Autoloader.php';
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
$whmcs->load_function('gateway');
|
||||
$whmcs->load_function('invoice');
|
||||
|
||||
/**
|
||||
*
|
||||
* Check parameters
|
||||
* Check parameters
|
||||
*
|
||||
*/
|
||||
if(isset($_POST['id'])) {
|
||||
if (isset($_POST['id'])) {
|
||||
|
||||
// Get transaction
|
||||
$transactionQuery = select_query('gateway_mollie', '', array('paymentid' => $_POST['id']), null, null, 1);
|
||||
@@ -31,9 +31,6 @@ if(isset($_POST['id'])) {
|
||||
|
||||
$method = $transaction['method'];
|
||||
|
||||
if ($method === Mollie_API_Object_Method::MISTERCASH) {
|
||||
$method = 'bancontact';
|
||||
}
|
||||
|
||||
$_GATEWAY = getGatewayVariables('mollie' . $method . '_devapp');
|
||||
|
||||
@@ -50,12 +47,12 @@ if(isset($_POST['id'])) {
|
||||
$transactionCurrency = mysql_fetch_assoc($transactionCurrency);
|
||||
|
||||
// Check payment
|
||||
$mollie = new Mollie_API_Client;
|
||||
$mollie = new \Mollie\Api\MollieApiClient();
|
||||
$mollie->setApiKey($_GATEWAY['key']);
|
||||
|
||||
$payment = $mollie->payments->get($_POST['id']);
|
||||
$payment = $mollie->payments->get($_POST['id']);
|
||||
|
||||
if($payment->isPaid()) {
|
||||
if ($payment->isPaid()) {
|
||||
|
||||
// Add conversion, when there is need to. WHMCS only supports currencies per user. WHY?!
|
||||
if ($transactionCurrency['id'] != $userCurrency['id']) {
|
||||
@@ -89,7 +86,7 @@ if(isset($_POST['id'])) {
|
||||
header('HTTP/1.1 500 Payment not open or paid');
|
||||
exit();
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
logTransaction('mollieunknown', $_POST, 'Callback - Failure 0 (Arg mismatch)');
|
||||
|
||||
header('HTTP/1.1 500 Arg mismatch');
|
||||
|
||||
@@ -13,7 +13,12 @@ $_GATEWAYLANG['payWithBelfius'] = 'Betaal met Belfius';
|
||||
$_GATEWAYLANG['payWithBitcoin'] = 'Betaal met Bitcoin';
|
||||
$_GATEWAYLANG['payWithCreditcard'] = 'Betaal met Creditcard';
|
||||
$_GATEWAYLANG['payWithIdeal'] = 'Betaal met iDeal';
|
||||
$_GATEWAYLANG['payWithMistercash'] = 'Betaal met Bancontact';
|
||||
$_GATEWAYLANG['payWithBancontact'] = 'Betaal met Bancontact';
|
||||
$_GATEWAYLANG['payWithPaypal'] = 'Betaal met PayPal';
|
||||
$_GATEWAYLANG['payWithPaysafecard'] = 'Betaal met Paysafecard';
|
||||
$_GATEWAYLANG['payWithSofort'] = 'Betaal met Sofort Banking';
|
||||
$_GATEWAYLANG['payWithEps'] = 'Betaal met EPS';
|
||||
$_GATEWAYLANG['payWithGiftcard'] = 'Betaal met een cadeaukaart';
|
||||
$_GATEWAYLANG['payWithGiropay'] = 'Betaal met Giropay';
|
||||
$_GATEWAYLANG['payWithInghomepay'] = 'Betaal met ING Home\'Pay';
|
||||
$_GATEWAYLANG['payWithKbc'] = 'Betaal met KBC/CBC-betaalknop';
|
||||
|
||||
@@ -14,7 +14,12 @@ $_GATEWAYLANG['payWithBelfius'] = 'Pay with Belfius';
|
||||
$_GATEWAYLANG['payWithBitcoin'] = 'Pay with Bitcoin';
|
||||
$_GATEWAYLANG['payWithCreditcard'] = 'Pay with Credit Card';
|
||||
$_GATEWAYLANG['payWithIdeal'] = 'Pay with iDeal';
|
||||
$_GATEWAYLANG['payWithMistercash'] = 'Pay with Bancontact';
|
||||
$_GATEWAYLANG['payWithBancontact'] = 'Pay with Bancontact';
|
||||
$_GATEWAYLANG['payWithPaypal'] = 'Pay with PayPal';
|
||||
$_GATEWAYLANG['payWithPaysafecard'] = 'Pay with Paysafecard';
|
||||
$_GATEWAYLANG['payWithSofort'] = 'Pay with Sofort Banking';
|
||||
$_GATEWAYLANG['payWithEps'] = 'Pay with EPS';
|
||||
$_GATEWAYLANG['payWithGiftcard'] = 'Pay with a gift card';
|
||||
$_GATEWAYLANG['payWithGiropay'] = 'Pay with Giropay';
|
||||
$_GATEWAYLANG['payWithInghomepay'] = 'Pay with ING Home\'Pay';
|
||||
$_GATEWAYLANG['payWithKbc'] = 'Pay with KBC/CBC Payment Button';
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/vendor/Mollie/src/Mollie/API/Autoloader.php';
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
function mollie_config() {
|
||||
function mollie_config()
|
||||
{
|
||||
return array(
|
||||
'key' => array(
|
||||
'FriendlyName' => 'API key',
|
||||
'Type' => 'text',
|
||||
'Size' => '35',
|
||||
'Description' => 'Your channel\'s API key.'
|
||||
'Description' => 'Your channels API key.'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL) {
|
||||
function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
|
||||
{
|
||||
global $whmcs;
|
||||
|
||||
/**
|
||||
*
|
||||
* Setting requirements and includes
|
||||
* Setting requirements and includes
|
||||
*
|
||||
*/
|
||||
if(substr($params['returnurl'], 0, 1) == '/')
|
||||
$params['returnurl'] = $params['systemurl'].$params['returnurl'];
|
||||
if (substr($params['returnurl'], 0, 1) == '/')
|
||||
$params['returnurl'] = $params['systemurl'] . $params['returnurl'];
|
||||
|
||||
if (empty($params['language']))
|
||||
$params['language'] = ((isset($_SESSION['language'])) ? $_SESSION['language'] : $whmcs->get_config('Language'));
|
||||
@@ -42,12 +44,12 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL) {
|
||||
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;');
|
||||
}
|
||||
|
||||
$mollie = new Mollie_API_Client;
|
||||
$mollie = new \Mollie\Api\MollieApiClient();
|
||||
$mollie->setApiKey($params['key']);
|
||||
|
||||
/**
|
||||
*
|
||||
* Check if good state to open transaction.
|
||||
* Check if good state to open transaction.
|
||||
*
|
||||
*/
|
||||
if (isset($_GET['check_payment']) && ctype_digit($_GET['check_payment'])) {
|
||||
@@ -84,7 +86,10 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL) {
|
||||
));
|
||||
|
||||
$payment = $mollie->payments->create(array(
|
||||
'amount' => $params['amount'],
|
||||
'amount' => [
|
||||
'value' => $params['amount'],
|
||||
'currency' => $params['currency'],
|
||||
],
|
||||
'method' => $method,
|
||||
'description' => $params['description'],
|
||||
'redirectUrl' => $params['returnurl'] . '&check_payment=' . $transactionId,
|
||||
@@ -97,19 +102,19 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL) {
|
||||
|
||||
update_query('gateway_mollie', array('paymentid' => $payment->id), array('id' => $transactionId));
|
||||
|
||||
header('Location: ' . $payment->getPaymentUrl());
|
||||
header('Location: ' . $payment->getCheckoutUrl());
|
||||
exit();
|
||||
} else {
|
||||
$return = '<form action="" method="POST">';
|
||||
|
||||
if ($method == Mollie_API_Object_Method::IDEAL) {
|
||||
if ($method == \Mollie\Api\Types\PaymentMethod::IDEAL) {
|
||||
$issuers = $mollie->issuers->all();
|
||||
|
||||
$return .= '<label for="issuer">' . $_GATEWAYLANG['selectBank'] . ':</label> ';
|
||||
|
||||
$return .= '<select name="issuer">';
|
||||
foreach ($issuers as $issuer) {
|
||||
if ($issuer->method == Mollie_API_Object_Method::IDEAL) {
|
||||
if ($issuer->method == \Mollie\Api\Types\PaymentMethod::IDEAL) {
|
||||
$return .= '<option value=' . htmlspecialchars($issuer->id) . '>' . htmlspecialchars($issuer->name) . '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
1
src/mollie/vendor/Mollie
vendored
1
src/mollie/vendor/Mollie
vendored
Submodule src/mollie/vendor/Mollie deleted from 804aa2e3a8
@@ -2,19 +2,21 @@
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliebancontact_devapp_config() {
|
||||
$config = mollie_config();
|
||||
function molliebancontact_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value'=> 'Mollie Bancontact'
|
||||
)
|
||||
));
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie Bancontact'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliebancontact_devapp_link($params) {
|
||||
return mollie_link($params, Mollie_API_Object_Method::MISTERCASH);
|
||||
function molliebancontact_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BANCONTACT);
|
||||
}
|
||||
|
||||
@@ -2,19 +2,21 @@
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliebanktransfer_devapp_config() {
|
||||
$config = mollie_config();
|
||||
function molliebanktransfer_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value'=> 'Mollie Bank Transfer'
|
||||
)
|
||||
));
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie Bank Transfer'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliebanktransfer_devapp_link($params) {
|
||||
return mollie_link($params, Mollie_API_Object_Method::BANKTRANSFER);
|
||||
function molliebanktransfer_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BANKTRANSFER);
|
||||
}
|
||||
|
||||
@@ -2,19 +2,21 @@
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliebelfius_devapp_config() {
|
||||
$config = mollie_config();
|
||||
function molliebelfius_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value'=> 'Mollie Belfius'
|
||||
)
|
||||
));
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie Belfius'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliebelfius_devapp_link($params) {
|
||||
return mollie_link($params, Mollie_API_Object_Method::BELFIUS);
|
||||
function molliebelfius_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BELFIUS);
|
||||
}
|
||||
|
||||
@@ -2,19 +2,21 @@
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliebitcoin_devapp_config() {
|
||||
$config = mollie_config();
|
||||
function molliebitcoin_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value'=> 'Mollie Bitcoin'
|
||||
)
|
||||
));
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie Bitcoin'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliebitcoin_devapp_link($params) {
|
||||
return mollie_link($params, Mollie_API_Object_Method::BITCOIN);
|
||||
function molliebitcoin_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::BITCOIN);
|
||||
}
|
||||
|
||||
@@ -2,19 +2,21 @@
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliecreditcard_devapp_config() {
|
||||
$config = mollie_config();
|
||||
function molliecreditcard_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value'=> 'Mollie Creditcard'
|
||||
)
|
||||
));
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie Creditcard'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliecreditcard_devapp_link($params) {
|
||||
return mollie_link($params, Mollie_API_Object_Method::CREDITCARD);
|
||||
function molliecreditcard_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::CREDITCARD);
|
||||
}
|
||||
|
||||
22
src/mollieeps_devapp.php
Normal file
22
src/mollieeps_devapp.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function mollieeps_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie EPS'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
function mollieeps_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::EPS);
|
||||
}
|
||||
22
src/molliegiftcard_devapp.php
Normal file
22
src/molliegiftcard_devapp.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliegiftcard_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie Giftcard'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliegiftcard_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::GIFTCARD);
|
||||
}
|
||||
22
src/molliegiropay_devapp.php
Normal file
22
src/molliegiropay_devapp.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliegiropay_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie Giropay'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliegiropay_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::GIROPAY);
|
||||
}
|
||||
@@ -2,19 +2,21 @@
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function mollieideal_devapp_config() {
|
||||
$config = mollie_config();
|
||||
function mollieideal_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value'=> 'Mollie iDeal'
|
||||
)
|
||||
));
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie iDeal'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
return $config;
|
||||
}
|
||||
|
||||
function mollieideal_devapp_link($params) {
|
||||
return mollie_link($params, Mollie_API_Object_Method::IDEAL);
|
||||
function mollieideal_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::IDEAL);
|
||||
}
|
||||
|
||||
22
src/mollieinghomepay_devapp.php
Normal file
22
src/mollieinghomepay_devapp.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function mollieinghomepay_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie ING Home\'Pay'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
function mollieinghomepay_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::INGHOMEPAY);
|
||||
}
|
||||
22
src/molliekbc_devapp.php
Normal file
22
src/molliekbc_devapp.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliekbc_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie KBC/CBC Payment Button'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliekbc_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::KBC);
|
||||
}
|
||||
@@ -2,19 +2,21 @@
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliepaypal_devapp_config() {
|
||||
$config = mollie_config();
|
||||
function molliepaypal_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value'=> 'Mollie PayPal'
|
||||
)
|
||||
));
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie PayPal'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliepaypal_devapp_link($params) {
|
||||
return mollie_link($params, Mollie_API_Object_Method::PAYPAL);
|
||||
function molliepaypal_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::PAYPAL);
|
||||
}
|
||||
|
||||
@@ -2,19 +2,21 @@
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliepaysafecard_devapp_config() {
|
||||
$config = mollie_config();
|
||||
function molliepaysafecard_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value'=> 'Mollie Paysafecard'
|
||||
)
|
||||
));
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie Paysafecard'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliepaysafecard_devapp_link($params) {
|
||||
return mollie_link($params, Mollie_API_Object_Method::PAYSAFECARD);
|
||||
function molliepaysafecard_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::PAYSAFECARD);
|
||||
}
|
||||
|
||||
@@ -2,19 +2,21 @@
|
||||
|
||||
require_once __DIR__ . '/mollie/mollie.php';
|
||||
|
||||
function molliesofort_devapp_config() {
|
||||
$config = mollie_config();
|
||||
function molliesofort_devapp_config()
|
||||
{
|
||||
$config = mollie_config();
|
||||
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value'=> 'Mollie Sofort Banking'
|
||||
)
|
||||
));
|
||||
$config = array_merge($config, array(
|
||||
'FriendlyName' => array(
|
||||
'Type' => 'System',
|
||||
'Value' => 'Mollie Sofort Banking'
|
||||
)
|
||||
));
|
||||
|
||||
return $config;
|
||||
return $config;
|
||||
}
|
||||
|
||||
function molliesofort_devapp_link($params) {
|
||||
return mollie_link($params, Mollie_API_Object_Method::SOFORT);
|
||||
function molliesofort_devapp_link($params)
|
||||
{
|
||||
return mollie_link($params, \Mollie\Api\Types\PaymentMethod::SOFORT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user