PaymentMollie by typografics

Processwire payment module for Mollie

PaymentMollie

Mollie payment method for ProcessWire

Requirements


Requires PaymentModule -module

Mollie API


(Info form https://github.com/mollie/mollie-api-php)

To use the Mollie API client, the following things are required:

  • Get yourself a free Mollie account. No sign up costs.
  • Now you're ready to use the Mollie API client in test mode.
  • Follow a few steps to enable payment methods in live mode, and let us handle the rest.
  • PHP >= 5.6
  • Up-to-date OpenSSL (or other SSL/TLS toolkit)

Composer Installation

By far the easiest way to install the Mollie API client is to require it with Composer.

$ composer require mollie/mollie-api-php:^2.0

{
    "require": {
        "mollie/mollie-api-php": "^2.0"
    }
}

The version of the API client corresponds to the version of the API it implements. Check the notes on migration to see what changes you need to make if you want to start using a newer API version.

Manual Installation

If you're not familiar with using composer we've added a ZIP file to the releases containing the API client and all the packages normally installed by composer. Download the mollie-api-php.zip from the releases page.

Include the vendor/autoload.php as shown in Initialize example.

Example (with Padloper)


$checkout = modules()->get("PadOnePageCheckout");
$checkout->setPaymentModule("PaymentMollie");
$payment = modules()->get("PaymentMollie");

$urlSegment = input()->urlSegment1;

if (input()->urlSegment1 == "payment") {
    $payment->processPayment();
    exit;
}

if (!input()->urlSegment1 && input()->get('id')) {

    // Check the order
    $order = pages()->get(input()->get('id'));

    // Check if the order has been paid
    if($order->pad_paid){
        session()->redirect(page()->url."success");
        exit;

    }else{
        session()->redirect(page()->url."confirmation");
        exit;
    }
}

License


MIT License

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #554
    In the 554th issue of ProcessWire Weekly we'll check out the latest core updates, introduce a couple of new third party modules, and more. Read on!
    Weekly.pw / 21 December 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits