mirror of
https://github.com/0100Dev/WHMCS-Mollie-Payments.git
synced 2026-01-18 03:28:18 +01:00
feat: implement iDeal 2.0 support
Not sure what happened in the previous commit, here we go again.
This commit is contained in:
@@ -103,7 +103,6 @@ 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),
|
'dueDate' => (($method == \Mollie\Api\Types\PaymentMethod::BANKTRANSFER) ? date('Y-m-d', strtotime('+100 days')) : NULL),
|
||||||
));
|
));
|
||||||
|
|
||||||
@@ -114,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;
|
||||||
|
|||||||
Reference in New Issue
Block a user