Update iDeal script for new Mollie API

This commit is contained in:
Wouter van Os
2018-10-02 13:27:32 +02:00
committed by GitHub
parent 19979d9f28
commit 95348ada82

View File

@@ -108,15 +108,13 @@ function mollie_link($params, $method = Mollie_API_Object_Method::IDEAL)
$return = '<form action="" method="POST">'; $return = '<form action="" method="POST">';
if ($method == \Mollie\Api\Types\PaymentMethod::IDEAL) { if ($method == \Mollie\Api\Types\PaymentMethod::IDEAL) {
$issuers = $mollie->issuers->all(); $issuers = $mollie->methods->get('ideal', ['include' => 'issuers'])->issuers;
$return .= '<label for="issuer">' . $_GATEWAYLANG['selectBank'] . ':</label> '; $return .= '<label for="issuer">' . $_GATEWAYLANG['selectBank'] . ':</label> ';
$return .= '<select name="issuer">'; $return .= '<select name="issuer">';
foreach ($issuers as $issuer) { foreach ($issuers as $issuer) {
if ($issuer->method == \Mollie\Api\Types\PaymentMethod::IDEAL) { $return .= '<option value=' . htmlspecialchars($issuer->id) . '>' . htmlspecialchars($issuer->name) . '</option>';
$return .= '<option value=' . htmlspecialchars($issuer->id) . '>' . htmlspecialchars($issuer->name) . '</option>';
}
} }
$return .= '</select>'; $return .= '</select>';
} }