One Hat Cyber Team
Your IP:
216.73.216.27
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
proc
/
thread-self
/
root
/
proc
/
thread-self
/
cwd
/
Edit File:
examples.tar
subscriptions/cancel-subscription.php 0000644 00000002004 15112071677 0014136 0 ustar 00 <?php /* * How to cancel a subscription. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve the last created customer for this example. * If no customers are created yet, run the create-customer example. */ $customer = $mollie->customers->page(null, 1)[0]; /* * The subscription ID, starting with sub_ */ $subscriptionId = $_GET['subscription_id'] ?? ''; /* * Customer Subscription deletion parameters. * * See: https://www.mollie.com/nl/docs/reference/subscriptions/delete */ $canceledSubscription = $customer->cancelSubscription($subscriptionId); /* * The subscription status should now be canceled */ echo "<p>The subscription status is now: '" . htmlspecialchars($canceledSubscription->status) . "'.</p>\n"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } subscriptions/create-subscription.php 0000644 00000004355 15112071677 0014167 0 ustar 00 <?php /* * How to create a regular subscription. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Retrieve the last created customer for this example. * If no customers are created yet, run create-customer example. */ $customer = $mollie->customers->page(null, 1)[0]; /* * Generate a unique subscription id for this example. It is important to include this unique attribute * in the webhookUrl (below) so new payments can be associated with this subscription. */ $subscriptionId = time(); /** * Customer Subscription creation parameters. * * @See: https://docs.mollie.com/reference/v2/subscriptions-api/create-subscription */ $subscription = $customer->createSubscription([ "amount" => [ "value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings "currency" => "EUR", ], "times" => 12, "interval" => "1 month", "description" => "Subscription #{$subscriptionId}", "webhookUrl" => "{$protocol}://{$hostname}{$path}/webhook.php", "metadata" => [ "subscription_id" => $subscriptionId, ], ]); /* * The subscription will be either pending or active depending on whether the customer has * a pending or valid mandate. If the customer has no mandates an error is returned. You * should then set up a "first payment" for the customer. */ echo "<p>The subscription status is '" . htmlspecialchars($subscription->status) . "'.</p>\n"; echo "<p>"; echo '<a href="' . $protocol . '://' . $hostname . $path . '/17-cancel-subscription.php?subscription_id=' . $subscription->id . '">18-cancel-subscription</a><br>'; echo "</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } subscriptions/error_log 0000644 00000013074 15112071677 0011404 0 ustar 00 [25-Nov-2025 20:01:49 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 20:01:49 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/subscriptions/cancel-subscription.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 20:03:24 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 20:03:24 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/subscriptions/update-subscription.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:01:15 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:01:15 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/subscriptions/create-subscription.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:48:27 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:48:27 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/subscriptions/cancel-subscription.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:42:57 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:42:57 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/subscriptions/update-subscription.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:44:47 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:44:47 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/subscriptions/create-subscription.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 subscriptions/update-subscription.php 0000644 00000002076 15112071677 0014204 0 ustar 00 <?php /* * Updating an existing subscription via the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve an existing subscription */ $customer = $mollie->customers->get("cst_cUe8HjeBuz"); $subscription = $customer->getSubscription("sub_DRjwaT5qHx"); /** * Subscription fields that can be updated are described by the link: * See https://docs.mollie.com/reference/v2/subscriptions-api/update-subscription */ $subscription->times = 10; $subscription->startDate = '2018-12-02'; // Year-month-day $subscription->amount = (object)['value' => '12.12', 'currency' => 'EUR']; $subscription->webhookUrl = 'https://some-webhook-url.com/with/path'; $subscription->description = 'Monthly subscription'; $subscription->update(); echo "<p>Subscription updated: " . $subscription->id . "</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } invoices/list-invoices.php 0000644 00000003172 15112071677 0011676 0 ustar 00 <?php /* * List the Mollie invoices. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize_with_oauth.php"; /* * Get all the activated methods for this API key. */ $invoices = $mollie->invoices->all(); foreach ($invoices as $invoice) { echo '<li><b>Invoice ' . htmlspecialchars($invoice->reference) . ':</b> (' . htmlspecialchars($invoice->issuedAt) . ')'; echo '<br>Status: <b>' . $invoice->status; echo '<table border="1"><tr><th>Period</th><th>Description</th><th>Count</th><th>VAT Percentage</th><th>Amount</th></tr>'; foreach ($invoice->lines as $line) { echo '<tr>'; echo '<td>' . htmlspecialchars($line->period) . '</td>'; echo '<td>' . htmlspecialchars($line->description) . '</td>'; echo '<td align="right">' . htmlspecialchars($line->count) . '</td>'; echo '<td align="right">' . htmlspecialchars($line->vatPercentage) . '</td>'; echo '<td align="right">' . htmlspecialchars($line->amount->currency . " " . $line->amount->value) . '</td>'; echo '</tr>'; } echo '<tr><th colspan="5" align="right">Gross Total</th><th align="right">' . htmlspecialchars($invoice->grossAmount->value . " " . $invoice->grossAmount->currency) . '</th></tr>'; echo '</table>'; echo '<a href="'. $invoice->_links->pdf->href .'" target="_blank">Click here to open PDF</a>'; echo '</li>'; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } invoices/error_log 0000644 00000001716 15112071677 0010314 0 ustar 00 [26-Nov-2025 17:36:58 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 17:36:58 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/invoices/list-invoices.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 database/.gitignore 0000644 00000000006 15112071677 0010303 0 ustar 00 *.txt orders/refund-order-completely.php 0000644 00000001365 15112071677 0013336 0 ustar 00 <?php /* * Refund all eligible items for an order using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Refund all eligible items for an order with ID "ord_8wmqcHMN4U". * * See: https://docs.mollie.com/reference/v2/orders-api/create-order-refund */ $order = $mollie->orders->get('ord_8wmqcHMN4U'); $refund = $order->refundAll(); echo 'Refund ' . $refund->id . ' was created for order ' . $order->id; echo 'You will receive ' . $refund->amount->currency . $refund->amount->value; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } orders/update-order.php 0000644 00000003211 15112071677 0011152 0 ustar 00 <?php /* * How to update an order with the Mollie API */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Order parameters: * billingAddress The billing person and address for the order. * shippingAddress The shipping address for the order. * orderNumber The order number. For example, 16738. * redirectUrl The URL your customer will be redirected to after the payment process. * webhookUrl Set the webhook URL, where we will send order status changes to. */ $order = $mollie->orders->get("ord_kEn1PlbGa"); $order->billingAddress->organizationName = "Mollie B.V."; $order->billingAddress->streetAndNumber = "Keizersgracht 126"; $order->billingAddress->city = "Amsterdam"; $order->billingAddress->region = "Noord-Holland"; $order->billingAddress->postalCode = "1234AB"; $order->billingAddress->country = "NL"; $order->billingAddress->title = "Dhr"; $order->billingAddress->givenName = "Piet"; $order->billingAddress->familyName = "Mondriaan"; $order->billingAddress->email = "piet@mondriaan.com"; $order->billingAddress->phone = "+31208202070"; $order->update(); /* * Send the customer off to complete the order payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $order->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } orders/list-methods.php 0000644 00000001760 15112071677 0011202 0 ustar 00 <?php /* * How to get the currently activated payment methods for the Orders 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. * To get methods that are compatible with the Orders API * we are passing the 'resource' parameter. */ $methods = $mollie->methods->all(['resource' => 'orders']); 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()); } orders/create-order.php 0000644 00000010014 15112071677 0011132 0 ustar 00 <?php /* * How to create a new order in the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Generate a unique order id for this example. It is important to include this unique attribute * in the redirectUrl (below) so a proper return page can be shown to the customer. */ $orderId = time(); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Order creation parameters. * * See: https://docs.mollie.com/reference/v2/orders-api/create-order */ $order = $mollie->orders->create([ "amount" => [ "value" => "1027.99", "currency" => "EUR", ], "billingAddress" => [ "streetAndNumber" => "Keizersgracht 313", "postalCode" => "1016 EE", "city" => "Amsterdam", "country" => "nl", "givenName" => "Luke", "familyName" => "Skywalker", "email" => "luke@skywalker.com", ], "shippingAddress" => [ "streetAndNumber" => "Keizersgracht 313", "postalCode" => "1016 EE", "city" => "Amsterdam", "country" => "nl", "givenName" => "Luke", "familyName" => "Skywalker", "email" => "luke@skywalker.com", ], "metadata" => [ "order_id" => $orderId, ], "consumerDateOfBirth" => "1958-01-31", "locale" => "en_US", "orderNumber" => strval($orderId), "redirectUrl" => "{$protocol}://{$hostname}{$path}/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}{$path}/webhook.php", "method" => "ideal", "lines" => [ [ "sku" => "5702016116977", "name" => "LEGO 42083 Bugatti Chiron", "productUrl" => "https://shop.lego.com/nl-NL/Bugatti-Chiron-42083", "imageUrl" => 'https://sh-s7-live-s.legocdn.com/is/image//LEGO/42083_alt1?$main$', "quantity" => 2, "vatRate" => "21.00", "unitPrice" => [ "currency" => "EUR", "value" => "399.00", ], "totalAmount" => [ "currency" => "EUR", "value" => "698.00", ], "discountAmount" => [ "currency" => "EUR", "value" => "100.00", ], "vatAmount" => [ "currency" => "EUR", "value" => "121.14", ], ], [ "type" => "digital", "sku" => "5702015594028", "name" => "LEGO 42056 Porsche 911 GT3 RS", "productUrl" => "https://shop.lego.com/nl-NL/Porsche-911-GT3-RS-42056", "imageUrl" => 'https://sh-s7-live-s.legocdn.com/is/image/LEGO/42056?$PDPDefault$', "quantity" => 1, "vatRate" => "21.00", "unitPrice" => [ "currency" => "EUR", "value" => "329.99", ], "totalAmount" => [ "currency" => "EUR", "value" => "329.99", ], "vatAmount" => [ "currency" => "EUR", "value" => "57.27", ], ], ], ]); /* * Send the customer off to complete the order payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $order->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } orders/cancel-order-lines.php 0000644 00000002351 15112071677 0012231 0 ustar 00 <?php /* * Cancel order lines using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Cancel an order line with ID "odl_dgtxyl" for order ID "ord_8wmqcHMN4U" * * See: https://docs.mollie.com/reference/v2/orders-api/cancel-order-line */ $orderId = 'ord_8wmqcHMN4U'; $lineId = 'odl_dgtxyl'; $order = $mollie->orders->get($orderId); $line = $order->lines()->get($lineId); if ($line && $line->isCancelable) { $order->cancelLines([ 'lines' => [ [ 'id' => $lineId, 'quantity' => 1, // optional parameter ], ], ]); $updatedOrder = $mollie->orders->get($orderId); echo 'Your order ' . $order->id . ' was updated:'; foreach ($order->lines as $line) { echo $line->description . '. Status: <b>' . $line->status . '</b>.'; } } else { echo "Unable to cancel line " . $lineId . " for your order " . $orderId . "."; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } orders/error_log 0000644 00000046405 15112071677 0007777 0 ustar 00 [25-Nov-2025 18:00:39 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:00:39 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/refund-order-completely.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:05:59 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:05:59 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/cancel-order.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:45:43 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:45:44 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/webhook.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:50:23 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:50:23 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/refund-order-partially.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:54:38 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:54:39 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/list-orders.php(11): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:57:44 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:57:44 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/update-order-lines-multiple.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:57:57 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:57:58 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/update-order-line.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 20:24:49 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 20:24:49 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/update-order.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:01:10 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:01:10 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/cancel-order-lines.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:01:13 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:01:13 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/create-order.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:10:37 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:10:37 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/create-order.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:33:31 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:33:31 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/webhook.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:36:29 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:36:29 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/refund-order-partially.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:43:19 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:43:19 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/cancel-order.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:48:01 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:48:01 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/update-order.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:49:04 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:49:04 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/cancel-order-lines.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:04:19 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:04:19 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/update-order-lines-multiple.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:06:12 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:06:12 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/refund-order-completely.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:08:22 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:08:22 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/update-order-line.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:33:09 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:33:09 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/list-methods.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:44:21 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:44:21 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/orders/list-orders.php(11): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 orders/list-orders.php 0000644 00000003175 15112071677 0011037 0 ustar 00 <?php /* * List orders using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * List the most recent orders * * See: https://docs.mollie.com/reference/v2/orders-api/list-orders */ echo '<ul>'; $latestOrders = $mollie->orders->page(); printOrders($latestOrders); $previousOrders = $latestOrders->next(); printOrders($previousOrders); echo '</ul>'; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } function printOrders($orders) { if (empty($orders)) { return ; } foreach ($orders as $order) { echo '<li><b>Order ' . htmlspecialchars($order->id) . ':</b> (' . htmlspecialchars($order->createdAt) . ')'; echo '<br>Status: <b>' . htmlspecialchars($order->status); echo '<table border="1"><tr><th>Billed to</th><th>Shipped to</th><th>Total amount</th></tr>'; echo '<tr>'; echo '<td>' . htmlspecialchars($order->shippingAddress->givenName) . ' ' . htmlspecialchars($order->shippingAddress->familyName) . '</td>'; echo '<td>' . htmlspecialchars($order->billingAddress->givenName) . ' ' . htmlspecialchars($order->billingAddress->familyName) . '</td>'; echo '<td>' . htmlspecialchars($order->amount->currency) . str_replace('.', ',', htmlspecialchars($order->amount->value)) . '</td>'; echo '</tr>'; echo '</table>'; echo '<a href="'. $order->getCheckoutUrl() .'" target="_blank">Click here to pay</a>'; echo '</li>'; } } orders/webhook.php 0000644 00000002550 15112071677 0010222 0 ustar 00 <?php /* * Handle an order status change using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * After your webhook has been called with the order ID in its body, you'd like * to handle the order's status change. This is how you can do that. * * See: https://docs.mollie.com/reference/v2/orders-api/get-order */ $order = $mollie->orders->get($_POST["id"]); $orderId = $order->metadata->order_id; /* * Update the order in the database. */ database_write($orderId, $order->status); if ($order->isPaid() || $order->isAuthorized()) { /* * The order is paid or authorized * At this point you'd probably want to start the process of delivering the product to the customer. */ } elseif ($order->isCanceled()) { /* * The order is canceled. */ } elseif ($order->isExpired()) { /* * The order is expired. */ } elseif ($order->isCompleted()) { /* * The order is completed. */ } elseif ($order->isPending()) { /* * The order is pending. */ } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } orders/update-order-lines-multiple.php 0000644 00000004164 15112071677 0014123 0 ustar 00 <?php /* * Perform operations (add, cancel, update) on multiple order lines in a single call. */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /** * Perform multiple operations on Order Lines. * * See: https://docs.mollie.com/reference/v2/orders-api/manage-order-lines */ $addOrderLine = [ "operation" => \Mollie\Api\Types\OrderLineUpdateOperationType::ADD, "data" => [ "type" => \Mollie\Api\Types\OrderLineType::TYPE_DIGITAL, "name" => "Adding new orderline", "quantity" => 2, "sku" => "12345679", "totalAmount" => [ "currency" => "EUR", "value" => "30.00", ], "unitPrice" => [ "currency" => "EUR", "value" => "15.00", ], "vatAmount" => [ "currency" => "EUR", "value" => "0.00", ], "vatRate" => "0.00", ], ]; $updateOrderLine = [ "operation" => \Mollie\Api\Types\OrderLineUpdateOperationType::UPDATE, "data" => [ "id" => "odl_1.1l9vx0", "name" => "New order line name", ], ]; $cancelOrderLine = [ "operation" => \Mollie\Api\Types\OrderLineUpdateOperationType::CANCEL, "data" => [ "id" => "odl_1.4hqjw6", ], ]; $operations = [ $addOrderLine, $updateOrderLine, $cancelOrderLine, ]; $order = $mollie->orderLines->updateMultiple('ord_pbjz8x', $operations); } catch (\Mollie\Api\Exceptions\ApiException $e) { /* * When updating order lines for orders that used a pay after delivery method such as Klarna Pay Later, the * supplier (Klarna) may decline the requested changes. This results in an error response from the Mollie API. * The order initial remains intact without applying the requested changes. */ echo "API call failed: " . htmlspecialchars($e->getMessage()); } orders/update-order-line.php 0000644 00000004320 15112071677 0012101 0 ustar 00 <?php /* * How to update an order line with the Mollie API */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Order line parameters: * name A description of the order line, for example LEGO 4440 Forest Police Station.. * imageUrl A link pointing to an image of the product sold. * productUrl A link pointing to the product page in your web shop of the product sold. * sku The SKU, EAN, ISBN or UPC of the product sold. The maximum character length is 64. * metadata Provide any data you like, for example a string or a JSON object. We will save the data alongside the order line. * quantity The number of items in the order line. * unitPrice The price of a single item including VAT in the order line. * discountAmount Any discounts applied to the order line. For example, if you have a two-for-one sale, you should pass the amount discounted as a positive amount. * totalAmount The total amount of the line, including VAT and discounts. Adding all totalAmount values together should result in the same amount as the amount top level property. * vatAmount The amount of value-added tax on the line. The totalAmount field includes VAT, so the vatAmount can be calculated with the formula totalAmount × (vatRate / (100 + vatRate)). * vatRate The VAT rate applied to the order line, for example "21.00" for 21%. The vatRate should be passed as a string and not as a float to ensure the correct number of decimals are passed. */ $order = $mollie->orders->get("ord_kEn1PlbGa"); $line = $order->lines()->get('odl_1.uh5oen'); $line->name = "Update line name description"; $orderWithNewLineName = $line->update(); /* * Send the customer off to complete the order payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $orderWithNewLineName->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } orders/cancel-order.php 0000644 00000001324 15112071677 0011120 0 ustar 00 <?php /* * Cancel an order using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Cancel the order with ID "ord_pbjz8x" * * See: https://docs.mollie.com/reference/v2/orders-api/cancel-order */ $order = $mollie->orders->get("ord_pbjz8x"); if ($order->isCancelable) { $canceledOrder = $order->cancel(); echo "Your order " . $order->id . " has been canceled."; } else { echo "Unable to cancel your order " . $order->id . "."; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } orders/refund-order-partially.php 0000644 00000001747 15112071677 0013166 0 ustar 00 <?php /* * Refund some items for an order using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Refund 1 item of order line "odl_dgtxyl" for an order with ID "ord_8wmqcHMN4U". * * See: https://docs.mollie.com/reference/v2/orders-api/create-order-refund */ $order = $mollie->orders->get('ord_8wmqcHMN4U'); $refund = $order->refund([ 'lines' => [ [ 'id' => 'odl_dgtxyl', 'quantity' => 1, ], ], "description" => "Required quantity not in stock, refunding one photo book.", ]); echo 'Refund ' . $refund->id . ' was created for part of your order ' . $order->id; echo 'You will receive ' . $refund->amount->currency . $refund->amount->value; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } pagination/backwards.php 0000644 00000002462 15112071677 0011362 0 ustar 00 <?php /* * How to use pagination with the Mollie API. * * pagination is supported on: * - balances * - balanceTransactions * - chargebacks * - clients * - clientLinks * - customers * - invoices * - mandates * - orders * - paymentCaptures * - paymentChargebacks * - payments * - paymentLinks * - paymentRefunds * - profiles * - refunds * - settlementCaptures * - settlementChargebacks * - settlementPayments * - settlementRefunds * - settlements * - subscriptions * - terminals */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; $orderId = 'ord_8wmqcHMN4U'; // cursor paginating backwards through all orders $page = $mollie->orders->page($orderId); while ($page->hasPrevious()) { foreach ($page as $order) { echo($order->id); } $page = $page->previous(); } // iterating backwards using the iterator by passing iterateBackwards = true // in php 8.0+ you could also use the named parameter syntax iterator(iterateBackwards: true) foreach ($mollie->orders->iterator(null, null, [], true) as $order) { echo($order->id); } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } pagination/error_log 0000644 00000005374 15112071677 0010632 0 ustar 00 [25-Nov-2025 19:57:50 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:57:50 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/pagination/basic_usage.php(35): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:37:44 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:37:44 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/pagination/backwards.php(35): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:33:54 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:33:54 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/pagination/basic_usage.php(35): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 pagination/basic_usage.php 0000644 00000002163 15112071677 0011664 0 ustar 00 <?php /* * How to use pagination with the Mollie API. * * pagination is supported on: * - balances * - balanceTransactions * - chargebacks * - clients * - clientLinks * - customers * - invoices * - mandates * - orders * - paymentCaptures * - paymentChargebacks * - payments * - paymentLinks * - paymentRefunds * - profiles * - refunds * - settlementCaptures * - settlementChargebacks * - settlementPayments * - settlementRefunds * - settlements * - subscriptions * - terminals */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; // cursor paginating through all orders $page = $mollie->orders->page(); while ($page->hasNext()) { foreach ($page as $order) { echo($order->id); } $page = $page->next(); } // using the iterator we can iterate over all orders directly foreach ($mollie->orders->iterator() as $order) { echo($order->id); } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } captures/get-capture.php 0000644 00000001336 15112071677 0011335 0 ustar 00 <?php /* * Retrieve a payment capture using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve a capture with ID 'cpt_4qqhO89gsT' for payment with * ID 'tr_WDqYK6vllg'. * * See: https://docs.mollie.com/reference/v2/captures-api/get-capture */ $payment = $mollie->payments->get('tr_WDqYK6vllg'); $capture = $payment->getCapture('cpt_4qqhO89gsT'); $amount = $capture->amount->currency . ' ' . $capture->amount->value; echo 'Captured ' . $amount; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } captures/list-captures.php 0000644 00000001377 15112071677 0011721 0 ustar 00 <?php /* * List captures for a payment using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * List captures for payment with ID 'tr_WDqYK6vllg'. * * See: https://docs.mollie.com/reference/v2/captures-api/list-captures */ $payment = $mollie->payments->get('tr_WDqYK6vllg'); $captures = $payment->captures(); foreach ($captures as $capture) { $amount = $capture->amount->currency . ' ' . $capture->amount->value; echo 'Captured ' . $amount . ' for payment ' . $payment->id; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } captures/error_log 0000644 00000011117 15112071677 0010317 0 ustar 00 [25-Nov-2025 21:36:02 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 21:36:02 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/captures/list-captures.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:03:00 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:03:00 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/captures/get-capture.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:34:55 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:34:55 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/captures/create-capture.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:07:44 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:07:44 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/captures/get-capture.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:35:54 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:35:54 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/captures/list-captures.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 captures/create-capture.php 0000644 00000001777 15112071677 0012032 0 ustar 00 <?php /* * How to prepare a new payment with the Mollie API. */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Capture parameters: * amount Amount in EUROs. This example creates a € 5,- capture. The amount can be the original payment amount or lower. * description Description of the capture. * metadata Custom metadata that is stored with the payment. */ $capture = $mollie->paymentCaptures->createForId('tr_WDqYK6vllg', [ "amount" => [ "currency" => "EUR", "value" => "5.00", ], "description" => "Order #12345", ]); echo "<p>New capture created " . htmlspecialchars($capture->id) . " (" . htmlspecialchars($capture->description) . ").</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } initialize.php 0000644 00000000763 15112071677 0007433 0 ustar 00 <?php /* * Make sure to disable the display of errors in production code! */ ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); error_reporting(E_ALL); require_once __DIR__ . "/../vendor/autoload.php"; require_once __DIR__ . "/functions.php"; /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"); payments/refund-payment.php 0000644 00000005326 15112071677 0012070 0 ustar 00 <?php /* * How to refund a payment programmatically */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); if (isset($_GET['payment_id'])) { /* * Retrieve the payment you want to refund from the API. */ $paymentId = $_GET['payment_id']; $payment = $mollie->payments->get($paymentId); if ($payment->canBeRefunded() && $payment->amountRemaining->currency === 'EUR' && $payment->getAmountRemaining() >= 2.00) { /* * Refund € 2,00 of the payment. * * https://docs.mollie.com/reference/v2/refunds-api/create-refund */ $refund = $payment->refund([ "amount" => [ "currency" => "EUR", "value" => "2.00", // You must send the correct number of decimals, thus we enforce the use of strings ], ]); echo "{$refund->amount->currency} {$refund->amount->value} of payment {$paymentId} refunded.", PHP_EOL; } else { echo "Payment {$paymentId} can not be refunded.", PHP_EOL; } /* * Retrieve all refunds on a payment. */ echo "<ul>"; foreach ($payment->refunds() as $refund) { echo "<li>"; echo "<strong style='font-family: monospace'>" . htmlspecialchars($refund->id) . "</strong><br />"; echo htmlspecialchars($refund->description) . "<br />"; echo htmlspecialchars($refund->amount->currency) . " " . htmlspecialchars($refund->amount->value) . "<br />"; echo "Status: " . htmlspecialchars($refund->status); echo "</li>"; } echo "</ul>"; } echo "Refund payment: "; echo "<form method='get'><input name='payment_id' value='tr_xxx'/><input type='submit' /></form>"; echo "<p>"; echo '<a href="' . $protocol . '://' . $hostname . $path . '/create-payment.php">Create a payment</a><br>'; echo '<a href="' . $protocol . '://' . $hostname . $path . '/create-ideal-payment.php">Create an iDEAL payment</a><br>'; echo '<a href="' . $protocol . '://' . $hostname . $path . '/list-payments.php">List payments</a><br>'; echo "</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payments/update-payment.php 0000644 00000002670 15112071677 0012066 0 ustar 00 <?php /* * How to prepare a new payment with the Mollie API. */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Payment parameters: * description Description of the payment. * redirectUrl Redirect location. The customer will be redirected there after the payment. * webhookUrl Webhook location, used to report when the payment changes state. * metadata Custom metadata that is stored with the payment. */ $payment = $mollie->payments->get("tr_7UhSN1zuXS"); $newOrderId = 98765; $payment->description = "Order #".$newOrderId; $payment->redirectUrl = "https://example.org/webshop/order/98765/"; $payment->webhookUrl = "https://example.org/webshop/payments/webhook/"; $payment->metadata = ["order_id" => $newOrderId]; $payment = $payment->update(); /* * In this example we store the order with its payment status in a database. */ database_write($newOrderId, $payment->status); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $payment->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payments/create-capturable-payment.php 0000644 00000004624 15112071677 0014170 0 ustar 00 <?php /* * How to prepare a new payment with the Mollie API. */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Generate a unique order id for this example. It is important to include this unique attribute * in the redirectUrl (below) so a proper return page can be shown to the customer. */ $orderId = time(); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Payment parameters: * amount Amount in EUROs. This example creates a € 10,- payment. * description Description of the payment. * redirectUrl Redirect location. The customer will be redirected there after the payment. * webhookUrl Webhook location, used to report when the payment changes state. * metadata Custom metadata that is stored with the payment. * method Payment method that supports manual capturing * captureMode Capture mode "manual" to make sure the payment isn't captured automatically after creation */ $payment = $mollie->payments->create([ "amount" => [ "currency" => "EUR", "value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings ], "description" => "Order #{$orderId}", "redirectUrl" => "{$protocol}://{$hostname}{$path}/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}{$path}/webhook.php", "metadata" => [ "order_id" => $orderId, ], "captureMode" => 'manual', "method" => "creditcard", ]); /* * In this example we store the order with its payment status in a database. */ database_write($orderId, $payment->status); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $payment->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payments/list-methods.php 0000644 00000001752 15112071677 0011545 0 ustar 00 <?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()); } payments/create-ideal-payment.php 0000644 00000006075 15112071677 0013126 0 ustar 00 <?php /* * How to prepare an iDEAL payment with the Mollie API. */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * First, let the customer pick the bank in a simple HTML form. This step is actually optional. */ if ($_SERVER["REQUEST_METHOD"] != "POST") { $method = $mollie->methods->get(\Mollie\Api\Types\PaymentMethod::IDEAL, ["include" => "issuers"]); echo '<form method="post">Select your bank: <select name="issuer">'; foreach ($method->issuers() as $issuer) { echo '<option value=' . htmlspecialchars($issuer->id) . '>' . htmlspecialchars($issuer->name) . '</option>'; } echo '<option value="">or select later</option>'; echo '</select><button>OK</button></form>'; exit; } /* * Generate a unique order id for this example. It is important to include this unique attribute * in the redirectUrl (below) so a proper return page can be shown to the customer. */ $orderId = time(); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Payment parameters: * amount Amount in EUROs. This example creates a € 27.50 payment. * method Payment method "ideal". * description Description of the payment. * redirectUrl Redirect location. The customer will be redirected there after the payment. * webhookUrl Webhook location, used to report when the payment changes state. * metadata Custom metadata that is stored with the payment. * issuer The customer's bank. If empty the customer can select it later. */ $payment = $mollie->payments->create([ "amount" => [ "currency" => "EUR", "value" => "27.50", // You must send the correct number of decimals, thus we enforce the use of strings ], "method" => \Mollie\Api\Types\PaymentMethod::IDEAL, "description" => "Order #{$orderId}", "redirectUrl" => "{$protocol}://{$hostname}{$path}/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}{$path}/webhook.php", "metadata" => [ "order_id" => $orderId, ], "issuer" => ! empty($_POST["issuer"]) ? $_POST["issuer"] : null, ]); /* * In this example we store the order with its payment status in a database. */ database_write($orderId, $payment->status); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $payment->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payments/list-payments.php 0000644 00000005700 15112071677 0011737 0 ustar 00 <?php /* * How to list your payments. */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Get the all payments for this API key ordered by newest. */ $payments = $mollie->payments->page(); echo "<ul>"; foreach ($payments as $payment) { echo "<li>"; echo "<strong style='font-family: monospace'>" . htmlspecialchars($payment->id) . "</strong><br />"; echo htmlspecialchars($payment->description) . "<br />"; echo htmlspecialchars($payment->amount->currency) . " " . htmlspecialchars($payment->amount->value) . "<br />"; echo "Status: " . htmlspecialchars($payment->status) . "<br />"; if ($payment->hasRefunds()) { echo "Payment has been (partially) refunded.<br />"; } if ($payment->hasChargebacks()) { echo "Payment has been charged back.<br />"; } if ($payment->canBeRefunded() && $payment->amountRemaining->currency === 'EUR' && $payment->amountRemaining->value >= '2.00') { echo " (<a href=\"{$protocol}://{$hostname}{$path}/refund-payment.php?payment_id=" . htmlspecialchars($payment->id) . "\">refund</a>)"; } echo "</li>"; } echo "</ul>"; /** * Get the next set of Payments if applicable */ $nextPayments = $payments->next(); if (! empty($nextPayments)) { echo "<ul>"; foreach ($nextPayments as $payment) { echo "<li>"; echo "<strong style='font-family: monospace'>" . htmlspecialchars($payment->id) . "</strong><br />"; echo htmlspecialchars($payment->description) . "<br />"; echo htmlspecialchars($payment->amount->currency) . " " . htmlspecialchars($payment->amount->value) . "<br />"; echo "Status: " . htmlspecialchars($payment->status) . "<br />"; if ($payment->hasRefunds()) { echo "Payment has been (partially) refunded.<br />"; } if ($payment->hasChargebacks()) { echo "Payment has been charged back.<br />"; } if ($payment->canBeRefunded() && $payment->amountRemaining->currency === 'EUR' && $payment->amountRemaining->value >= '2.00') { echo " (<a href=\"{$protocol}://{$hostname}{$path}/refund-payment.php?payment_id=" . htmlspecialchars($payment->id) . "\">refund</a>)"; } echo "</li>"; } echo "</ul>"; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payments/create-payment-oauth.php 0000644 00000004432 15112071677 0013163 0 ustar 00 <?php /* * Example 10 - Using OAuth access token to prepare a new payment. */ try { /* * Initialize the Mollie API library with your OAuth access token. */ require "../initialize_with_oauth.php"; /* * Generate a unique order id for this example. It is important to include this unique attribute * in the redirectUrl (below) so a proper return page can be shown to the customer. */ $orderId = time(); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST'] ? : "my.app"; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Since unlike an API key the OAuth access token does NOT belong to a profile, we need to retrieve a profile * so we can specify the profileId-parameter when creating a payment below. */ $profiles = $mollie->profiles->page(); $profile = reset($profiles); /** * Paramaters for creating a payment via oAuth * * @See https://docs.mollie.com/reference/v2/payments-api/create-payment */ $payment = $mollie->payments->create([ "amount" => [ "value" => "10.00", "currency" => "EUR", ], "description" => "My first API payment", "redirectUrl" => "{$protocol}://{$hostname}{$path}/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}{$path}/webhook.php", "metadata" => [ "order_id" => $orderId, ], "profileId" => $profile->id, // This is specifically necessary for payment resources via OAuth access. ]); /* * In this example we store the order with its payment status in a database. */ database_write($orderId, $payment->status); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code */ if (PHP_SAPI === "cli") { echo "Redirect to: " . $payment->getCheckoutUrl() . PHP_EOL; return; } header("Location: " . $payment->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payments/return.php 0000644 00000002076 15112071677 0010450 0 ustar 00 <?php /* * How to show a return page to the customer. * * In this example we retrieve the order stored in the database. * Here, it's unnecessary to use the Mollie API Client. */ /* * NOTE: The examples are using a text file as a database. * Please use a real database like MySQL in production code. */ require_once "../functions.php"; $status = database_read($_GET["order_id"]); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); echo "<p>Your payment status is '" . htmlspecialchars($status) . "'.</p>"; echo "<p>"; echo '<a href="' . $protocol . '://' . $hostname . $path . '/create-payment.php">Create a payment</a><br>'; echo '<a href="' . $protocol . '://' . $hostname . $path . '/create-ideal-payment.php">Create an iDEAL payment</a><br>'; echo '<a href="' . $protocol . '://' . $hostname . $path . '/list-payments.php">List payments</a><br>'; echo "</p>"; payments/create-routed-payment.php 0000644 00000005532 15112071677 0013347 0 ustar 00 <?php /* * How to prepare a new payment with the Mollie API. */ try { ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); error_reporting(E_ALL); require_once __DIR__ . "/../vendor/autoload.php"; require_once __DIR__ . "/functions.php"; /* * Initialize the Mollie API library with your oauth access token. * * See: https://docs.mollie.com/connect/getting-started */ $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setAccessToken("access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"); /* * Generate a unique order id for this example. It is important to include this unique attribute * in the redirectUrl (below) so a proper return page can be shown to the customer. */ $orderId = time(); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Payment parameters: * profileId Your profileId * amount Amount in EUROs. This example creates a € 10,- payment. * description Description of the payment. * redirectUrl Redirect location. The customer will be redirected there after the payment. * webhookUrl Webhook location, used to report when the payment changes state. * routing Routing part of a payment to a connected account https://docs.mollie.com/connect/splitting-payments */ $payment = $mollie->payments->create([ "profileId" => "pfl_v9hTwCvYqw", "amount" => [ "currency" => "EUR", "value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings ], "description" => "Order #{$orderId}", "redirectUrl" => "{$protocol}://{$hostname}{$path}/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}{$path}/webhook.php", "routing" => [ [ "amount" => [ "currency" => "EUR", "value" => "7.50", ], "destination" => [ "type" => "organization", "organizationId" => "org_23456", ], ], ], ]); /* * In this example we store the order with its payment status in a database. */ database_write($orderId, $payment->status); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $payment->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payments/error_log 0000644 00000051105 15112071677 0010332 0 ustar 00 [18-Nov-2025 10:27:05 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [18-Nov-2025 10:27:05 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/list-methods.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [18-Nov-2025 19:59:05 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [18-Nov-2025 19:59:05 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/webhook.php(14): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [19-Nov-2025 16:11:44 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [19-Nov-2025 16:11:44 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/update-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:02:56 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:02:56 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/list-methods.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:04:37 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:04:37 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/webhook.php(14): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:52:50 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:52:50 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:55:40 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:55:40 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-capturable-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:56:36 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:56:36 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/update-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:59:13 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:59:13 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/list-payments.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 20:20:50 UTC] PHP Warning: Undefined array key "order_id" in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/return.php on line 15 [25-Nov-2025 21:36:13 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 21:36:13 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/refund-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 21:36:31 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 21:36:31 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-ideal-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:10:50 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:10:50 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:10:54 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:10:54 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/update-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:34:09 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:34:09 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/webhook.php(14): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:36:13 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:36:13 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/list-payments.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:37:09 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-routed-payment-with-future-release-date.php on line 11 [26-Nov-2025 17:37:09 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-routed-payment-with-future-release-date.php:11 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-routed-payment-with-future-release-date.php on line 11 [26-Nov-2025 18:47:25 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:47:25 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-ideal-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:34:58 UTC] PHP Warning: Undefined array key "order_id" in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/return.php on line 15 [26-Nov-2025 19:42:45 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 19:42:45 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-payment-oauth.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 19:42:54 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:42:54 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-capturable-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:45:59 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:45:59 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/refund-payment.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:46:21 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-routed-payment.php on line 11 [26-Nov-2025 19:46:21 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-routed-payment.php:11 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/create-routed-payment.php on line 11 [26-Nov-2025 19:46:38 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:46:38 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payments/list-methods.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 payments/webhook.php 0000644 00000003430 15112071677 0010562 0 ustar 00 <?php /* * How to verify Mollie API Payments in a webhook. * * See: https://docs.mollie.com/guides/webhooks */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Retrieve the payment's current state. */ $payment = $mollie->payments->get($_POST["id"]); $orderId = $payment->metadata->order_id; /* * Update the order in the database. */ database_write($orderId, $payment->status); if ($payment->isPaid() && ! $payment->hasRefunds() && ! $payment->hasChargebacks()) { /* * The payment is paid and isn't refunded or charged back. * At this point you'd probably want to start the process of delivering the product to the customer. */ } elseif ($payment->isOpen()) { /* * The payment is open. */ } elseif ($payment->isPending()) { /* * The payment is pending. */ } elseif ($payment->isFailed()) { /* * The payment has failed. */ } elseif ($payment->isExpired()) { /* * The payment is expired. */ } elseif ($payment->isCanceled()) { /* * The payment has been canceled. */ } elseif ($payment->hasRefunds()) { /* * The payment has been (partially) refunded. * The status of the payment is still "paid" */ } elseif ($payment->hasChargebacks()) { /* * The payment has been (partially) charged back. * The status of the payment is still "paid" */ } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payments/create-routed-payment-with-future-release-date.php 0000644 00000006037 15112071677 0020162 0 ustar 00 <?php /* * How to prepare a new payment with the Mollie API. */ try { ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); error_reporting(E_ALL); require_once __DIR__ . "/../vendor/autoload.php"; require_once __DIR__ . "/functions.php"; /* * Initialize the Mollie API library with your oauth access token. * * See: https://docs.mollie.com/connect/getting-started */ $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setAccessToken("access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"); /* * Generate a unique order id for this example. It is important to include this unique attribute * in the redirectUrl (below) so a proper return page can be shown to the customer. */ $orderId = time(); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Payment parameters: * profileId Your profileId * amount Amount in EUROs. This example creates a € 10,- payment. * description Description of the payment. * redirectUrl Redirect location. The customer will be redirected there after the payment. * webhookUrl Webhook location, used to report when the payment changes state. * routing Routing part of a payment to a connected account https://docs.mollie.com/connect/splitting-payments * * For example, the funds for the following payment will only become available on the balance of the connected account on 1 January 2025: */ $payment = $mollie->payments->create([ "profileId" => "pfl_v9hTwCvYqw", "amount" => [ "currency" => "EUR", "value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings ], "description" => "Order #{$orderId}", "redirectUrl" => "{$protocol}://{$hostname}{$path}/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}{$path}/webhook.php", "routing" => [ [ "amount" => [ "currency" => "EUR", "value" => "7.50", ], "destination" => [ "type" => "organization", "organizationId" => "org_23456", ], "releaseDate" => "2025-01-01", ], ], ]); /* * In this example we store the order with its payment status in a database. */ database_write($orderId, $payment->status); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $payment->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payments/create-payment.php 0000644 00000004230 15112071677 0012041 0 ustar 00 <?php /* * How to prepare a new payment with the Mollie API. */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Generate a unique order id for this example. It is important to include this unique attribute * in the redirectUrl (below) so a proper return page can be shown to the customer. */ $orderId = time(); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Payment parameters: * amount Amount in EUROs. This example creates a € 10,- payment. * description Description of the payment. * redirectUrl Redirect location. The customer will be redirected there after the payment. * webhookUrl Webhook location, used to report when the payment changes state. * metadata Custom metadata that is stored with the payment. */ $payment = $mollie->payments->create([ "amount" => [ "currency" => "EUR", "value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings ], "description" => "Order #{$orderId}", "redirectUrl" => "{$protocol}://{$hostname}{$path}/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}{$path}/webhook.php", "metadata" => [ "order_id" => $orderId, ], ]); /* * In this example we store the order with its payment status in a database. */ database_write($orderId, $payment->status); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $payment->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } mandates/revoke-mandate.php 0000644 00000001247 15112071677 0011766 0 ustar 00 <?php /* * Revoke a customer mandate */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve an existing customer by his customerId */ $customer = $mollie->customers->get("cst_cUa8HjKBus"); /* * Retrieve an existing mandate by his mandateId */ $mandate = $customer->getMandate("mdt_pa3s7rGnrC"); /* * Revoke the mandate */ $mandate->revoke(); echo "<p>Mandate has been successfully revoked.</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } mandates/error_log 0000644 00000013000 15112071677 0010256 0 ustar 00 [25-Nov-2025 19:52:44 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:52:45 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/mandates/create-mandate.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:58:34 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:58:35 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/mandates/revoke-mandate.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:04:05 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:04:05 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/mandates/list-mandates.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:32:23 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:32:23 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/mandates/list-mandates.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:45:29 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:45:29 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/mandates/create-mandate.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:45:37 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:45:37 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/mandates/revoke-mandate.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 mandates/list-mandates.php 0000644 00000001334 15112071677 0011626 0 ustar 00 <?php /* * List all customer mandates */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve an existing customer by his customerId */ $customer = $mollie->customers->get("cst_cUa8HjKBus"); /* * List the mandates of this customer */ echo "<ul>"; foreach ($customer->mandates() as $mandate) { echo "<li>" . htmlspecialchars($mandate->id) . " - " . htmlspecialchars($mandate->method) . ": " . htmlspecialchars($mandate->status) . "</li>"; } echo "</ul>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } mandates/create-mandate.php 0000644 00000001611 15112071677 0011731 0 ustar 00 <?php /* * Create a customer mandate via the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve the last created customer for this example. * If no customers are created yet, run create-customer example. */ $customer = $mollie->customers->page(null, 1)[0]; /* * Create a SEPA Direct Debit mandate for the customer */ $mandate = $customer->createMandate([ "method" => \Mollie\Api\Types\MandateMethod::DIRECTDEBIT, "consumerAccount" => 'NL34ABNA0243341423', "consumerName" => 'B. A. Example', ]); echo "<p>Mandate created with id " . $mandate->id . " for customer " . $customer->name . "</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } profiles/create-profile.php 0000644 00000001466 15112071677 0012017 0 ustar 00 <?php /* * Create a profile via the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize_with_oauth.php"; /** * Create the profile * * @See https://docs.mollie.com/reference/v2/profiles-api/create-profile */ $profile = $mollie->profiles->create([ "name" => "My website name", "website" => "https://www.mywebsite.com", "email" => "info@mywebsite.com", "phone" => "+31208202070", "businessCategory" => "MARKETPLACES", "mode" => "live", ]); echo "<p>Profile created: " . htmlspecialchars($profile->name) . "</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "<p>API call failed: " . htmlspecialchars($e->getMessage()) . "</p>"; } profiles/delete-profile.php 0000644 00000001072 15112071677 0012007 0 ustar 00 <?php /* * Delete a profile via the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize_with_oauth.php"; /** * Delete a profile via the profileId * * @See https://docs.mollie.com/reference/v2/profiles-api/delete-profile */ $profile = $mollie->profiles->delete("pfl_v9hTwCvYqw"); echo "<p>Profile deleted</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "<p>API call failed: " . htmlspecialchars($e->getMessage()) . "</p>"; } profiles/update-profile.php 0000644 00000001627 15112071677 0012035 0 ustar 00 <?php /* * Updating an existing profile via the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize_with_oauth.php"; /* * Retrieve an existing profile by his profileId */ $profile = $mollie->profiles->get("pfl_eA4MSz7Bvy"); /** * Profile fields that can be updated. * * @See https://docs.mollie.com/reference/v2/profiles-api/update-profile */ $profile->name = "Mollie B.V."; $profile->website = 'www.mollie.com'; $profile->email = 'info@mollie.com'; $profile->phone = '0612345670'; $profile->businessCategory = "MARKETPLACES"; $profile->update(); echo "<p>Profile updated: " . htmlspecialchars($profile->name) . "</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "<p>API call failed: " . htmlspecialchars($e->getMessage()) . "</p>"; } profiles/list-profiles.php 0000644 00000001340 15112071677 0011701 0 ustar 00 <?php /* * Using OAuth access token to list profiles of an account. */ try { /* * Initialize the Mollie API library with your OAuth access token. */ require "../initialize_with_oauth.php"; /* * Get the all the profiles for this account. */ $profiles = $mollie->profiles->page(); foreach ($profiles as $profile) { echo '<div style="line-height:40px; vertical-align:top">'; echo htmlspecialchars($profile->name) . ' - ' . htmlspecialchars($profile->website) . ' (' . htmlspecialchars($profile->id) . ')'; echo '</div>'; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } profiles/error_log 0000644 00000017156 15112071677 0010325 0 ustar 00 [25-Nov-2025 19:52:47 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [25-Nov-2025 19:52:47 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/profiles/create-profile.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [25-Nov-2025 20:22:31 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [25-Nov-2025 20:22:31 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/profiles/delete-profile.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [25-Nov-2025 20:22:59 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [25-Nov-2025 20:22:59 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/profiles/list-profiles.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [25-Nov-2025 22:03:39 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [25-Nov-2025 22:03:39 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/profiles/update-profile.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 17:09:07 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 17:09:07 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/profiles/update-profile.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 18:45:06 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 18:45:06 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/profiles/delete-profile.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 19:34:04 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 19:34:04 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/profiles/list-profiles.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 19:35:36 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 19:35:36 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/profiles/create-profile.php(9): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 payment-links/create-payment-link.php 0000644 00000002637 15112071677 0013740 0 ustar 00 <?php /* * How to prepare a new payment with the Mollie API. */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Required Payment Link parameters: * amount Amount in EUROs. This example creates a € 10,- payment. * description Description of the payment. */ $paymentLink = $mollie->paymentLinks->create([ "amount" => [ "currency" => "EUR", "value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings ], "description" => "Bicycle tires", "webhookUrl" => "{$protocol}://{$hostname}{$path}/webhook.php", // optional ]); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $paymentLink->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payment-links/list-payment-links.php 0000644 00000002417 15112071677 0013627 0 ustar 00 <?php /* * How to list your payments. */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * Get the all payments for this API key ordered by newest. */ $paymentLinks = $mollie->paymentLinks->page(); echo "<ul>"; foreach ($paymentLinks as $paymentLink) { echo "<li>"; echo "<strong style='font-family: monospace'>" . htmlspecialchars($paymentLink->id) . "</strong><br />"; echo htmlspecialchars($paymentLink->description) . "<br />"; echo htmlspecialchars($paymentLink->amount->currency) . " " . htmlspecialchars($paymentLink->amount->value) . "<br />"; echo "Link: " . htmlspecialchars($paymentLink->getCheckoutUrl()) . "<br />"; echo "</li>"; } echo "</ul>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } payment-links/error_log 0000644 00000007322 15112071677 0011267 0 ustar 00 [25-Nov-2025 21:36:55 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 21:36:55 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payment-links/create-payment-link.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:06:30 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:06:30 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payment-links/list-payment-links.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:38:23 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:38:23 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payment-links/list-payment-links.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:46:35 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:46:35 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/payment-links/create-payment-link.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 settlements/list-settlements.php 0000644 00000006342 15112071677 0013160 0 ustar 00 <?php /* * Using OAuth access token to list settlements of an account. */ try { /* * Initialize the Mollie API library with your OAuth access token. */ require "../initialize_with_oauth.php"; /* * Get the all the settlements for this account. */ $settlements = $mollie->settlements->page(); echo '<ul>'; foreach ($settlements as $settlement) { echo '<li><b>Settlement ' . htmlspecialchars($settlement->reference) . ':</b> (' . htmlspecialchars($settlement->createdAt) . ')'; echo '<table border="1"><tr><th>Month</th><th>Description</th><th>Count</th><th>Net</th><th>VAT</th><th>Gross</th></tr>'; // Convert from stdClass to array $settlement_periods = json_decode(json_encode($settlement->periods), true); foreach ($settlement_periods as $year => $months) { foreach ($months as $month => $monthly_settlement) { foreach ($monthly_settlement['revenue'] as $revenue) { echo '<tr>'; echo '<td>' . htmlspecialchars($year . '-' . $month) . '</td>'; echo '<td>' . htmlspecialchars($revenue['description']) . '</td>'; echo '<td align="right">' . htmlspecialchars($revenue['count']) . ' x</td>'; echo '<td align="right">' . htmlspecialchars($revenue['amountNet']['value'] ? $revenue['amountNet']['value'] . " " . $revenue['amountNet']['currency'] : '-') . '</td>'; echo '<td align="right">' . htmlspecialchars($revenue['amountVat']['value'] ? $revenue['amountVat']['value'] . " " . $revenue['amountVat']['currency'] : '-') . '</td>'; echo '<td align="right">' . htmlspecialchars($revenue['amountGross']['value'] ? $revenue['amountGross']['value'] . " " . $revenue['amountGross']['currency'] : '-') . '</td>'; echo '</tr>'; } foreach ($monthly_settlement['costs'] as $revenue) { echo '<tr>'; echo '<td>' . htmlspecialchars($year . '-' . $month) . '</td>'; echo '<td>' . htmlspecialchars($revenue['description']) . '</td>'; echo '<td align="right">' . htmlspecialchars($revenue['count']) . ' x</td>'; echo '<td align="right">' . htmlspecialchars($revenue['amountNet']['value'] ? $revenue['amountNet']['value'] . " " . $revenue['amountNet']['currency'] : '-') . '</td>'; echo '<td align="right">' . htmlspecialchars($revenue['amountVat']['value'] ? $revenue['amountVat']['value'] . " " . $revenue['amountVat']['currency'] : '-') . '</td>'; echo '<td align="right">' . htmlspecialchars($revenue['amountGross']['value'] ? $revenue['amountGross']['value'] . " " . $revenue['amountGross']['currency'] : '-') . '</td>'; echo '</tr>'; } } } echo '<tr><th colspan="5" align="right">TOTAL</th><th align="right">' . htmlspecialchars($settlement->amount->value . " " . $settlement->amount->currency) . '</th></tr>'; echo '</table>'; echo '</li>'; } echo '</ul>'; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } settlements/error_log 0000644 00000003650 15112071677 0011043 0 ustar 00 [25-Nov-2025 19:57:00 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [25-Nov-2025 19:57:00 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/settlements/list-settlements.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 17:37:44 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 17:37:44 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/settlements/list-settlements.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 client-links/error_log 0000644 00000003546 15112071677 0011074 0 ustar 00 [25-Nov-2025 22:00:22 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:00:22 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/client-links/create-client-link.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:06:29 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:06:29 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/client-links/create-client-link.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 client-links/create-client-link.php 0000644 00000004051 15112071677 0013332 0 ustar 00 <?php /* * How to create a new client link in the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['REQUEST_URI'] ?? $_SERVER['PHP_SELF']); /* * ClientLink creation parameters. * * See: https://docs.mollie.com/reference/v2/client-links-api/create-client-link */ $clientLink = $mollie->clientLinks->create([ "owner" => [ "email" => "foo@test.com", "givenName" => "foo", "familyName" => "bar", "locale" => "nl_NL", ], "name" => "Foo Company", "address" => [ "streetAndNumber" => "Keizersgracht 313", "postalCode" => "1016 EE", "city" => "Amsterdam", "country" => "nl", ], "registrationNumber" => "30204462", "vatNumber" => "NL123456789B01", ]); /** * Get the redirect url for the client link, by passing in the 'client_id' of the your app, * a random generated string as 'state' to prevent CSRF attacks. This will be reflected in * the state query parameter when the user returns to the redirect_uri after authorizing your app. * * For more info see: https://docs.mollie.com/reference/oauth2/authorize#parameters */ $redirectUrl = $clientLink->getRedirectUrl("app_j9Pakf56Ajta6Y65AkdTtAv", "decafbad", "force", [ 'onboarding.read', 'onboarding.write', ]); /* * Send the customer off to finalize the organization creation. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $redirectUrl, true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } shipments/create-shipment-all.php 0000644 00000001473 15112071677 0013141 0 ustar 00 <?php /* * Create a shipment for an entire order using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Create a shipment for the entire order with ID "ord_8wmqcHMN4U" * * See: https://docs.mollie.com/reference/v2/shipments-api/create-shipment */ $order = $mollie->orders->get('ord_8wmqcHMN4U'); $shipment = $order->shipAll(); echo 'A shipment with ID ' . $shipment->id. ' has been created for your order with ID ' . $order->id . '.'; foreach ($shipment->lines as $line) { echo $line->name . ' - status: <b>' . $line->status . '</b>.'; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } shipments/get-shipment.php 0000644 00000001467 15112071677 0011712 0 ustar 00 <?php /* * Retrieve a shipment using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve a shipment with ID "shp_3wmsgCJN4U" for the order with ID "ord_8wmqcHMN4U". * * See: https://docs.mollie.com/reference/v2/shipments-api/get-shipment */ $order = $mollie->orders->get('ord_8wmqcHMN4U'); $shipment = $order->getShipment("shp_3wmsgCJN4U"); echo 'Shipment with ID ' . $shipment->id. ' for order with ID ' . $order->id . '.'; foreach ($shipment->lines as $line) { echo $line->name . ' - status: <b>' . $line->status . '</b>.'; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } shipments/create-shipment-partial.php 0000644 00000002447 15112071677 0014027 0 ustar 00 <?php /* * Example 32 - Create a shipment for part of an order using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "./initialize.php"; /* * Create a shipment for only two lines of the order with ID "ord_8wmqcHMN4U". * * See: https://docs.mollie.com/reference/v2/shipments-api/create-shipment */ $order = $mollie->orders->get('ord_8wmqcHMN4U'); $lineId1 = $order->lines()[0]->id; $lineId2 = $order->lines()[1]->id; $shipment = $order->createShipment( [ 'lines' => [ [ 'id' => $lineId1, // assume all is shipped if no quantity is specified ], [ 'id' => $lineId2, 'quantity' => 1, // you can set the quantity if not all is shipped at once ], ], ] ); echo 'A shipment with ID ' . $shipment->id. ' has been created for your order with ID ' . $order->id . '.'; foreach ($shipment->lines as $line) { echo $line->name . '- status: <b>' . $line->status . '</b>.'; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } shipments/error_log 0000644 00000020101 15112071677 0010474 0 ustar 00 [25-Nov-2025 18:00:59 UTC] PHP Warning: require(./initialize.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/create-shipment-partial.php on line 10 [25-Nov-2025 18:01:00 UTC] PHP Fatal error: Uncaught Error: Failed opening required './initialize.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/create-shipment-partial.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/create-shipment-partial.php on line 10 [25-Nov-2025 18:02:49 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:02:49 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/list-shipments.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:03:57 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:03:57 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/get-shipment.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:59:42 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:59:42 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/update-shipment.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 21:38:06 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 21:38:06 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/create-shipment-all.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:49:06 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:49:06 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/create-shipment-all.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:49:31 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:49:31 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/list-shipments.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:05:09 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:05:09 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/get-shipment.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:46:17 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:46:17 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/shipments/update-shipment.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 shipments/list-shipments.php 0000644 00000001547 15112071677 0012270 0 ustar 00 <?php /* * List shipment for an order using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Listing shipments for the order with ID "ord_8wmqcHMN4U". * * See: https://docs.mollie.com/reference/v2/shipments-api/get-shipment */ $order = $mollie->orders->get('ord_8wmqcHMN4U'); $shipments = $order->shipments(); echo 'Shipments for order with ID ' . $order->id . ':'; foreach ($shipments as $shipment) { echo 'Shipment ' . $shipment->id . '. Items:'; foreach ($shipment->lines as $line) { echo $line->name . ' - status: <b>' . $line->status . '</b>.'; } } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } shipments/update-shipment.php 0000644 00000002421 15112071677 0012404 0 ustar 00 <?php /* * Update shipment tracking information using the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Update the tracking information for a shipment with ID "shp_3wmsgCJN4U" and * order ID "ord_8wmqcHMN4U" * * See: https://docs.mollie.com/reference/v2/shipments-api/update-shipment */ $order = $mollie->orders->get('ord_8wmqcHMN4U'); $shipment = $order->getShipment("shp_3wmsgCJN4U"); $shipment->tracking = [ 'carrier' => 'PostNL', 'code' => '3SKABA000000000', 'url' => 'http://postnl.nl/tracktrace/?B=3SKABA000000000&P=1016EE&D=NL&T=C', ]; $shipment = $shipment->update(); echo 'Shipment with ID ' . $shipment->id. ' for order with ID ' . $order->id . '.'; echo 'Tracking information updated:'; echo 'Carrier: ' . $shipment->tracking->carrier; echo 'Code: ' . $shipment->tracking->code; echo 'Url: ' . $shipment->tracking->url; foreach ($shipment->lines as $line) { echo $line->name . ' - status: <b>' . $line->status . '</b>.'; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } error_log 0000644 00000006430 15112071677 0006473 0 ustar 00 [25-Nov-2025 02:34:10 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [25-Nov-2025 02:34:10 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [25-Nov-2025 03:29:14 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 03:29:15 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 01:32:07 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 01:32:07 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 02:03:49 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 [26-Nov-2025 02:03:49 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php:10 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize_with_oauth.php on line 10 customers/update-customer.php 0000644 00000001527 15112071677 0012436 0 ustar 00 <?php /* * Updating an existing customer via the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve an existing customer by his customerId */ $customer = $mollie->customers->get("cst_cUe8HjeBuz"); /** * Customer fields that can be updated. * * @See https://docs.mollie.com/reference/v2/customers-api/update-customer */ $customer->name = "Luke Sky"; $customer->email = "luke@example.org"; $customer->locale = "en_US"; $customer->metadata->isJedi = true; $customer->update(); echo "<p>Customer updated: " . htmlspecialchars($customer->name) . "</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } customers/create-customer-payment.php 0000644 00000003735 15112071677 0014075 0 ustar 00 <?php /* * How to create a new customer in the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve the last created customer for this example. * If no customers are created yet, run create-customer example. */ $customer = $mollie->customers->page(null, 1)[0]; /* * Generate a unique order id for this example. It is important to include this unique attribute * in the redirectUrl (below) so a proper return page can be shown to the customer. */ $orderId = time(); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; /** * Linking customers to payments has a few benefits * * @see https://docs.mollie.com/reference/v2/customers-api/create-customer-payment */ $payment = $customer->createPayment([ "amount" => [ "value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings "currency" => "EUR", ], "description" => "Order #{$orderId}", "redirectUrl" => "{$protocol}://{$hostname}/payments/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}/payments/webhook.php", "metadata" => [ "order_id" => $orderId, ], ]); /* * In this example we store the order with its payment status in a database. */ database_write($orderId, $payment->status); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code */ header("Location: " . $payment->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } customers/create-customer.php 0000644 00000001413 15112071677 0012411 0 ustar 00 <?php /* * How to create a new customer in the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /** * Customer creation parameters. * * @See https://docs.mollie.com/reference/v2/customers-api/create-customer */ $customer = $mollie->customers->create([ "name" => "Luke Skywalker", "email" => "luke@example.org", "metadata" => [ "isJedi" => true, ], ]); echo "<p>New customer created " . htmlspecialchars($customer->id) . " (" . htmlspecialchars($customer->name) . ").</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } customers/error_log 0000644 00000031724 15112071677 0010523 0 ustar 00 [25-Nov-2025 18:03:27 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:03:27 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/update-customer.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:03:56 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 18:03:56 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/create-customer-first-payment.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:50:42 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:50:42 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/create-customer-recurring-payment.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:53:54 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 19:53:54 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/delete-customer.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 20:25:07 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 20:25:07 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/create-customer.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 21:38:06 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 21:38:06 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/list-customer-payments.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:00:21 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [25-Nov-2025 22:00:21 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/create-customer-payment.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:37:20 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 17:37:20 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/create-customer-first-payment.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:43:42 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:43:42 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/update-customer.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:48:06 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 18:48:06 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/create-customer-recurring-payment.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:04:21 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:04:21 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/delete-customer.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:07:44 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:07:44 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/list-customer-payments.php(12): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:34:04 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:34:04 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/create-customer-payment.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:35:59 UTC] PHP Warning: require_once(/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 [26-Nov-2025 19:35:59 UTC] PHP Fatal error: Uncaught Error: Failed opening required '/home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/../vendor/autoload.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php:9 Stack trace: #0 /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/customers/create-customer.php(10): require() #1 {main} thrown in /home/fluxyjvi/public_html/project/vendor/mollie/mollie-api-php/examples/initialize.php on line 9 customers/delete-customer.php 0000644 00000000616 15112071677 0012414 0 ustar 00 <?php /* * Delete a customer from the Mollie API. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; $mollie->customers->delete("cst_fE3F6nvX"); echo "<p>Customer deleted!</p>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } customers/list-customer-payments.php 0000644 00000003577 15112071677 0013774 0 ustar 00 <?php /* * How to retrieve your customers' payments history. */ try { /* * Initialize the Mollie API library with your API key. * * See: https://www.mollie.com/dashboard/developers/api-keys */ require "../initialize.php"; /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; /* * Retrieve the last created customer for this example. * If no customers are created yet, run create-customer example. */ $customer = $mollie->customers->page(null, 1)[0]; /* * Get the all payments for this API key ordered by newest. */ $payments = $customer->payments(); echo "<ul>"; foreach ($payments as $payment) { echo "<li>"; echo "<strong style='font-family: monospace'>" . htmlspecialchars($payment->id) . "</strong><br />"; echo htmlspecialchars($payment->description) . "<br />"; echo htmlspecialchars($payment->amount->currency) . " " . htmlspecialchars($payment->amount->value) . "<br />"; echo "Status: " . htmlspecialchars($payment->status) . "<br />"; if ($payment->hasRefunds()) { echo "Payment has been (partially) refunded.<br />"; } if ($payment->hasChargebacks()) { echo "Payment has been charged back.<br />"; } if ($payment->canBeRefunded() && $payment->amountRemaining->currency === 'EUR' && $payment->amountRemaining->value >= '2.00') { echo " (<a href=\"{$protocol}://{$hostname}/payments/refund-payment.php?payment_id=" . htmlspecialchars($payment->id) . "\">refund</a>)"; } echo "</li>"; } echo "</ul>"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } customers/create-customer-recurring-payment.php 0000644 00000004046 15112071677 0016067 0 ustar 00 <?php /* * How to create an on-demand recurring payment. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve the last created customer for this example. * If no customers are created yet, run the create-customer example. */ $customer = $mollie->customers->page(null, 1)[0]; /* * Generate a unique order id for this example. */ $orderId = time(); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; /** * Customer Payment creation parameters. * * @See: https://docs.mollie.com/reference/v2/customers-api/create-customer-payment */ $payment = $customer->createPayment([ "amount" => [ "value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings "currency" => "EUR", ], "description" => "On-demand payment - Order #{$orderId}", "webhookUrl" => "{$protocol}://{$hostname}/payments/webhook.php", "metadata" => [ "order_id" => $orderId, ], // Flag this payment as a recurring payment. "sequenceType" => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_RECURRING, ]); /* * In this example we store the order with its payment status in a database. */ database_write($orderId, $payment->status); /* * The payment will be either pending or paid immediately. The customer * does not have to perform any payment steps. */ echo "<p>Selected mandate is '" . htmlspecialchars($payment->mandateId) . "' (" . htmlspecialchars($payment->method) . ").</p>\n"; echo "<p>The payment status is '" . htmlspecialchars($payment->status) . "'.</p>\n"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } customers/create-customer-first-payment.php 0000644 00000004456 15112071677 0015223 0 ustar 00 <?php /* * How to create a first payment to allow recurring payments later. */ try { /* * Initialize the Mollie API library with your API key or OAuth access token. */ require "../initialize.php"; /* * Retrieve the last created customer for this example. * If no customers are created yet, run the create-customer example. */ $customer = $mollie->customers->page(null, 1)[0]; /* * Generate a unique order id for this example. It is important to include this unique attribute * in the redirectUrl (below) so a proper return page can be shown to the customer. */ $orderId = time(); /* * Determine the url parts to these example files. */ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http"; $hostname = $_SERVER['HTTP_HOST']; /** * Customer Payment creation parameters. * * @See: https://docs.mollie.com/reference/v2/customers-api/create-customer-payment */ $payment = $customer->createPayment([ "amount" => [ "value" => "10.00", // You must send the correct number of decimals, thus we enforce the use of strings "currency" => "EUR", ], "description" => "First payment - Order #{$orderId}", "redirectUrl" => "{$protocol}://{$hostname}/payments/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}/payments/webhook.php", "metadata" => [ "order_id" => $orderId, ], // Flag this payment as a first payment to allow recurring payments later. "sequenceType" => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_FIRST, ]); /* * In this example we store the order with its payment status in a database. */ database_write($orderId, $payment->status); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code * * After completion, the customer will have a pending or valid mandate that can be * used for recurring payments and subscriptions. */ header("Location: " . $payment->getCheckoutUrl(), true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); } initialize_with_oauth.php 0000644 00000000746 15112071677 0011667 0 ustar 00 <?php /* * Make sure to disable the display of errors in production code! */ ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); error_reporting(E_ALL); require_once __DIR__ . "/../vendor/autoload.php"; require_once __DIR__ . "/functions.php"; /* * Initialize the Mollie API library with OAuth. * * See: https://docs.mollie.com/oauth/overview */ $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setAccessToken("access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ"); functions.php 0000644 00000001064 15112071677 0007275 0 ustar 00 <?php /* * NOTE: The examples are using a text file as a database. * Please use a real database like MySQL in production code. */ function database_read($orderId) { $orderId = intval($orderId); $database = dirname(__FILE__) . "/database/order-{$orderId}.txt"; $status = @file_get_contents($database); return $status ? $status : "unknown order"; } function database_write($orderId, $status) { $orderId = intval($orderId); $database = dirname(__FILE__) . "/database/order-{$orderId}.txt"; file_put_contents($database, $status); }
Simpan