Skip to content

Commit

Permalink
feat: implement iDeal 2.0 support
Browse files Browse the repository at this point in the history
Untested & draft, but this change should implement iDeal 2.0. The only thing I've heard is that we should remove issuer selection.
  • Loading branch information
Wouter0100 authored Dec 17, 2024
1 parent 4e3fc4f commit bf67c41
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/mollie/mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
'metadata' => array(
'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),
));

Expand All @@ -108,18 +107,6 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
} else {
$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 $return;
Expand Down

0 comments on commit bf67c41

Please sign in to comment.