elgentos/falcon-mollie

This package is abandoned and no longer maintained. No replacement package was suggested.

Mollie implementation for Deity Falcon

Installs: 107

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 2

Forks: 2

Open Issues: 2

Type:magento2-module

dev-master 2020-10-24 12:50 UTC

This package is auto-updated.

Last update: 2023-02-24 18:49:53 UTC


README

This Magento 2 module facilitates the implementation of the Mollie iDeal & Bancontact payment method into Deity Falcon.

Implementation

First you should configure the Magento 2 Mollie extension and set the Redirect URL under Payment Methods > Mollie > Deity.

Then, you should implement a bit of code in Falcon;

Falcon implementation

Extend the Magento2Api class in Falcon and override the placeOrder function. After the part about adyenCc, paste this;

    if (orderData.extensionAttributes && orderData.extensionAttributes.mollieData) {
      return this.handleMollieData(orderData.extensionAttributes.mollieData);
    }

Then, below the placeOrder function, add the new handleMollieData function;

  /**
   * Handling Mollie payment
   * @param {object} data mollieRedirect data
   * @return {object} Redirect response data
   */
  handleMollieData(data) {
    const { redirectUrl } = data;

    return {
      url: redirectUrl,
      method: 'GET',
      fields: []
    };
  }

Flow

After choosing the Mollie iDeal payment method in the Falcon checkout, the API will return the external URL from Mollie. Falcon will then redirect the user to Mollie's payment platform. After payment of the order, the user will be redirected to the configured Redirect URL. At the same time, Mollie will send a webhook request to the webhook URL, letting Magento know the payment has been processed.