%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/vendor/mollie/mollie-api-php/examples/payments/ |
Upload File : |
<?php
/*
* How to get the currently activated payment methods for the Payments API.
*/
try {
/*
* Initialize the Mollie API library with your API key.
*
* See: https://www.mollie.com/dashboard/developers/api-keys
*/
require "../initialize.php";
/*
* Get all the activated methods for this API key.
* By default we are using the resource "payments".
* See the orders folder for an example with the Orders API.
*/
$methods = $mollie->methods->allActive();
foreach ($methods as $method) {
echo '<div style="line-height:40px; vertical-align:top">';
echo '<img src="' . htmlspecialchars($method->image->size1x) . '" srcset="' . htmlspecialchars($method->image->size2x) . ' 2x"> ';
echo htmlspecialchars($method->description) . ' (' . htmlspecialchars($method->id) . ')';
echo '</div>';
}
} catch (\Mollie\Api\Exceptions\ApiException $e) {
echo "API call failed: " . htmlspecialchars($e->getMessage());
}