https://github.com/simsustech/vendure-plugin-payment-mollie
Mollie payment plugin for Vendure.io
https://github.com/simsustech/vendure-plugin-payment-mollie
Last synced: over 1 year ago
JSON representation
Mollie payment plugin for Vendure.io
- Host: GitHub
- URL: https://github.com/simsustech/vendure-plugin-payment-mollie
- Owner: simsustech
- Created: 2021-03-31T14:29:02.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-01T09:51:54.000Z (about 5 years ago)
- Last Synced: 2025-01-04T14:48:44.348Z (over 1 year ago)
- Language: TypeScript
- Size: 109 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mollie payment plugin for Vendure.io
## Warning: Not tested in production yet
This plugins provides a [PaymentMethodHandler](https://www.vendure.io/docs/typescript-api/payment/payment-method-handler/) for [Mollie](https://www.mollie.com/). It also provides a simple PaymentEligibilityChecker which checks if an order can be paid with iDeal according to the [limits](https://help.mollie.com/hc/en-us/articles/115000667365-What-is-the-minimum-and-maximum-amount-per-payment-method-).
## Arguments
- apiKey: The [API key for your Mollie account](https://help.mollie.com/hc/en-us/articles/115000328205-Where-can-I-find-the-live-API-key-)
- 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](https://www.vendure.io/docs/graphql-api/shop/input-types/#paymentinput).
## Installation
- `yarn add vendure-plugin-payment-mollie`
- Add MolliePlugin to your [Vendure config](https://www.vendure.io/docs/typescript-api/configuration/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](https://docs.mollie.com/guides/testing) as an environment variable:
```
MOLLIE_TEST_API_KEY=test_yourmollietestapikey yarn test
```