2 Commits
2.8 ... 2.9

Author SHA1 Message Date
Wouter van Os
664b2a7cfb Fix redirect for addfunds
This fixes addfunds requests somehow.
2020-02-10 17:34:18 +01:00
Thomas
fd9a3e39b1 Fix #53 (#55)
Een extra / in de URL zou niet uit moeten maken, bij mijn eigen site werkt dat verder. Bij bijv. Google ook: https://www.google.nl////search?q=mollie+whmcs
2019-06-24 20:42:48 +02:00

View File

@@ -71,7 +71,7 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
return '<br/><img src="' . $params['systemurl'] . 'modules/gateways/mollie/ajax_loader.gif" /><br/>' . $_GATEWAYLANG['checkPayment'] . ' <script> window.onload = function(){ setTimeout("location.reload(true);", 2000); } </script>'; return '<br/><img src="' . $params['systemurl'] . 'modules/gateways/mollie/ajax_loader.gif" /><br/>' . $_GATEWAYLANG['checkPayment'] . ' <script> window.onload = function(){ setTimeout("location.reload(true);", 2000); } </script>';
} }
} else { } else {
if (isset($_POST['start']) || (isset($_GET['a']) && $_GET['a'] == 'complete') || (isset($_GET['action']) && ($_GET['action'] == 'addfunds' || $_GET['action'] == 'masspay') && isset($_POST['paymentmethod']) && $_POST['paymentmethod'] == 'mollie' . $method)) { if (isset($_POST['start']) || isset($_POST['issuer']) || (isset($_GET['a']) && $_GET['a'] == 'complete') || (isset($_GET['action']) && ($_GET['action'] == 'addfunds' || $_GET['action'] == 'masspay') && isset($_POST['paymentmethod']) && $_POST['paymentmethod'] == 'mollie' . $method)) {
$transactionCurrency = select_query('tblcurrencies', '', array('code' => $params['currency']), null, null, 1); $transactionCurrency = select_query('tblcurrencies', '', array('code' => $params['currency']), null, null, 1);
$transactionCurrency = mysql_fetch_assoc($transactionCurrency); $transactionCurrency = mysql_fetch_assoc($transactionCurrency);
@@ -93,7 +93,7 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
'method' => $method, 'method' => $method,
'description' => $params['description'], 'description' => $params['description'],
'redirectUrl' => $params['returnurl'] . '&check_payment=' . $transactionId, 'redirectUrl' => $params['returnurl'] . '&check_payment=' . $transactionId,
'webhookUrl' => $params['systemurl'] . 'modules/gateways/mollie/callback.php', 'webhookUrl' => $params['systemurl'] . '/modules/gateways/mollie/callback.php',
'metadata' => array( 'metadata' => array(
'invoice_id' => $params['invoiceid'], 'invoice_id' => $params['invoiceid'],
), ),
@@ -105,7 +105,7 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
header('Location: ' . $payment->getCheckoutUrl()); header('Location: ' . $payment->getCheckoutUrl());
exit(); exit();
} else { } else {
$return = '<form action="" method="POST">'; $return = '<form action="viewinvoice.php?id=' . $params['invoiceid'] . '" method="POST">';
if ($method == \Mollie\Api\Types\PaymentMethod::IDEAL) { if ($method == \Mollie\Api\Types\PaymentMethod::IDEAL) {
$issuers = $mollie->methods->get('ideal', ['include' => 'issuers'])->issuers; $issuers = $mollie->methods->get('ideal', ['include' => 'issuers'])->issuers;