opscms-paystack-plugin
v1.2.1
Published
Accept card, bank-transfer and USSD payments through Paystack for an OpsCMS platform.
Maintainers
Readme
opscms-paystack-plugin
Accept payments through Paystack. A payment plugin for the OpsCMS platform, built with opscms-sdk.
- A payment provider (
paystack): starts a payment for an order, confirms it by asking Paystack directly over its own API (the customer's return and Paystack's notification only prompt that check), and marks the order paid or failed once. The platform's E-Commerce does the rest. - Its own settings table,
paystack-settings, one row per site, for admins of the site only: its switch, test or live mode, the address in use, the currency, the platform owner's address override, the webhook address to give Paystack, and the keys. Secrets are encrypted under the site's key and shown masked.
A site sets a public key and a secret key under Payments, Paystack settings. Paystack's own API address serves both modes: its test and live KEYS choose the sandbox.
Install
From the admin: Plugins → Install from npm → opscms-paystack-plugin. The platform creates the plugin's table (its one migration), lists the plugin with its
logo, and restarts to start it. Removing the plugin drops its table and the keys in it (a site's orders and payment ledger belong to the platform
and are never touched).
The platform currently carries this plugin in its own code under the same key; install the package only after that copy has been removed.
Needs
payload ^3 and opscms-sdk ^0.1.3 (the platform provides both), and the platform's E-Commerce plugin.
Develop
npm install
npm run typecheck && npm test && npm run build && npm pack --dry-runopscms-sdk is linked from a sibling checkout (file:../opscms-sdk) until it is published.
