Mollie
You can use Mollie to receive payments from your customers. It’s a redirect gateway, so customers pay on Mollie’s hosted checkout and then return to your site. It comes as a separate add-on (reachweb/resrv-payment-mollie) that supports Resrv v6.
For manual reservations, customers pay from the payment page and only Mollie’s webhook can confirm the booking, so make sure the webhook route below is set up.
Install the Mollie payment gateway add-on
First, install the add-on that provides the Mollie payment gateway:
composer require reachweb/resrv-payment-mollie
Setting up the API key
From your Mollie account you need your Live API key.
For security reasons, your key is not stored in the add-on’s configuration but in your .env file. Add it there:
MOLLIE_KEY=...
If you have cached your config, remember to clear the config cache after changing the .env file:
php artisan config:clear
Register the gateway
You enable Mollie in config/resrv-config.php, in one of two ways.
Recommended: register it under payment_gateways
Add Mollie to the payment_gateways array with its class and a label. We recommend this for Mollie, since it’s a redirect gateway:
'payment_gateways' => [
'mollie' => [
'class' => Reach\ResrvPaymentMollie\Http\Payment\MolliePaymentGateway::class,
'label' => 'Mollie',
],
],
You can also give it a surcharge or amount limits (see Payment gateways).
Alternative: set it as the single gateway
If Mollie is your only gateway, you can instead swap the Stripe class for Mollie in the payment_gateway setting, near the end of config/resrv-config.php:
'payment_gateway' => Reach\ResrvPaymentMollie\Http\Payment\MolliePaymentGateway::class,
Mollie’s webhook route is then the bare /resrv/api/webhook URL.
Next steps
That’s it! You should now be able to receive payments using Mollie.
To build your own gateway, see Writing a custom payment gateway.