Installation Steps
- Install and activate Monime Gateway.
- Add your custom plugin or theme code that implements the Monime adapter interfaces.
- Load your adapter classes from the main plugin file.
- Register the payment adapter from the main plugin file during plugin boot.
- If your plugin handles webhooks, load and register the webhook adapter from the same main plugin file.
Recommended File Structure
For a small plugin, keep the integration code in a dedicated class file and load it from your main plugin bootstrap file. Example structure:Example Registration
If You Also Handle Webhooks
If your custom plugin processes webhook data, make sure the webhook adapter class is also loaded and the same adapter instance implementsWebhookAdapterInterface.
In practice, that means your main plugin file should:
- require the adapter class file,
- register the payment adapter,
- and expose the webhook handler before Monime initializes its shared webhook service.
Verify the Setup
Confirm that your adapter class is available and that Monime can load it without autoloading errors. You can verify this by:- loading a page that triggers plugin boot,
- checking your PHP error log for class-loading problems,
- and running a test checkout plus a test webhook to confirm that both the payment flow and callback flow work.