@propeller-commerce/propeller-mollie
v1.0.0
Published
<div align="center"> <a href="https://propel.us/"><img src="https://propel.us/wp-content/themes/ecs-propeller/assets/build/images/theme/logo-blue.png" height="100px" /></a> </div>
Downloads
6
Keywords
Readme
Propel.us Mollie Nuxt module
Overview
Extension module
The extension module acts as a middleware between Propeller platform and Payment Service Provider. Once Extensions is configured to call PSP, for every payment created or update, Propeller GraphQL API is called to register that transaction.
Notification module
Notification module receives asynchronous notifications sent by Payment Service Provider. Through notifications, PSP provides asynchronously payment status changes like paid, authorization, charge, or refund of the payment. The notification module processes the notification sent by PSP and matches the Propeller payment for this notification, then modifies Propeller payment and order accordingly.
How to install
- Open your theme directory and run: -
yarn add @propeller-commerce/propeller-mollie
- Open your
nuxt.config.js
- At the bottom of
modules
add:
['@propeller-commerce/propeller-mollie/nuxt', {
propellerKey: 'PROPELLER_KEY',
propellerApiUrl: 'PROPELLER_API_URL',
mollieKey: 'MOLLIE_KEY',
mollieIsTest: true,
mollieRedirectUrl: '/checkout/thank-you',
}],
propellerKey
is used for authentication to Propeller GraphQL queries
propellerApiUrl
is Propeller GraphQL URL
mollieKey
is Mollie authentication key
mollieIsTest
allows to define if mollie if we are using Mollie test environment
mollieRedirectUrl
is the URL used for redirect after payment is finished
Render payment handlers & finalize payment
- Import
useMollie
:
import { useMollie } from "@propeller-commerce/propeller-mollie";
In this step you need:
const { makePayment } = useMollie();
- Calling
makePayment
and redirecting to payment page:
const payment = await makePayment({
amount: cartGetters.getTotals(cart.value).total,
currency: "EUR",
orderId: orderGetters.getId(order.value),
userId: 146443,
});
const paymentUrl = payment.paymentUrl;