Crystalize Plugin
How to install the Dintero Checkout for Crystalize plugin
To get started, you need to create a Dintero account. The Dintero developer documentation provides all the resources you will need to optimize your payment integration.
After you have made an account, you need to follow these steps. to get accsess to:
- Account ID
- Client ID
- Client Secret
These can be found under Settings in your account.
Remix Run - Furniture Boilerplate - Example
The [Remix Run Furniture v2 boilerplate(https://github.com/CrystallizeAPI/furniture-remix)] includes a full Dintero integration.
On the checkout page, we render the Dintero payment form, which does the following:
- makes the cart immutable
- creates a payment (server-to-server)
In this boilerplate, we decided to save the cart in our own service layer, so we push the order to Crystallize only when the payment is successful.
When the user clicks the Pay button, the user is redirected to the /order/cart/$cartId page. This page is actually waiting for the Cart to be saved as an order in Crystallize.
Indeed, while everything is happening, we check the transaction status.
The endpoint, when the event status is ‘AUTHORISED’:
- creates a customer in Crystallize, if one doesn’t exist yet.
- creates the order in Crystallize
- updates the cart from placed to paid, allowing the waiting page to update to the order confirmation
This boilerplate is also using our Node Service API Request Handlers that includes 2 handlers to speed up your Dintero integration.