Skip to content

simsustech/vendure-plugin-payment-mollie

Repository files navigation

Mollie payment plugin for Vendure.io

Warning: Not tested in production yet

This plugins provides a PaymentMethodHandler for Mollie. It also provides a simple PaymentEligibilityChecker which checks if an order can be paid with iDeal according to the limits.

Arguments

  • apiKey: The API key for your Mollie account
  • webhookHostname: The hostname of your Vendure server. The plugin provides a controller which handles webhooks performed by Mollie after the status of a payment changes. Mollie contacts your server at https://webhookHostname/mollie.
  • redirectUrl: The URL which Mollie redirects you to after the payment is completed. Can also be set individually for each payment by setting redirectUrl in the metadata of PaymentInput.

Installation

  • yarn add vendure-plugin-payment-mollie
  • Add MolliePlugin to your Vendure config:
import { MolliePlugin } from 'vendure-plugin-payment-mollie'

...
plugins: [
  ...
  MolliePlugin,
  ....
]

You might also want to add your own PaymentEligibilityChecker or CustomPaymentProcess to the configuration.

  • Create a new PaymentMethod, either in the Admin UI or with a GraphQL mutation. For example:
  mutation {
    createPaymentMethod(input:{
      name: "mollie-payment-provider",
      code: "mollie-payment-provider",
      enabled: true,
      checker: {
          code: "ideal-payment-eligibility-checker",
          arguments: []
      },
      handler: {
        code: "mollie-payment-provider",
        arguments: [
        {
            name: "webhookHostname",
            value: "https://yourvendurehostname"
        },
        {
            name: "apiKey",
            value: "REPLACE_WITH_YOUR_MOLLIE_API_KEY"
        }]
      }
    }) {
      name
      code
    }
  }

Testing

To run the tests you need to provide the test API key as an environment variable:

 MOLLIE_TEST_API_KEY=test_yourmollietestapikey yarn test

About

Mollie payment plugin for Vendure.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published