Riverty Payments: Installation and Operations
Installing Riverty Payments for Sylius - Composer via Packeton, bundle and route setup, setup command, update, cron job and uninstall in the correct order
Riverty Payments: Installation and Operations
This documentation always describes the latest published version.
Check the requirements
The full list is on the overview. Two points often decide between success and failure:
Never change
APP_SECRETafter Riverty API keys have been saved. The keys are stored encrypted, and the encryption key is derived fromAPP_SECRET(%kernel.secret%). If the value changes, the stored keys can no longer be decrypted and every Riverty call fails until you enter all keys again. Back upAPP_SECRETtogether with your database backups. If you rotate it on purpose, save all Riverty API keys again afterwards.
Keep the payment request transport synchronous. The authorization at Riverty is a payment request command. If it runs through a queue, it is only carried out once a worker consumes that queue, and until then the payment stays New and the customer is not sent to Riverty. The Sylius default is
SYLIUS_MESSENGER_TRANSPORT_PAYMENT_REQUEST_DSN=sync://. Some skeleton.envfiles set a Doctrine queue here, so check yours.
Installation
The plugin lives in a private repository and is served through Packeton (https://packeton.markus-michalski.net). You receive the credentials after buying the license.
Private repositories are managed through Packeton. Add the repository to your
composer.jsonand store the credentials as you would for any private Composer repository.
-
Add the repository and install the plugin:
{ "repositories": [{ "type": "composer", "url": "https://packeton.markus-michalski.net" }] }composer require mmd/sylius-riverty-payments -
Register the bundle in
config/bundles.php:Mmd\SyliusRivertyPaymentsPlugin\MmdSyliusRivertyPaymentsPlugin::class => ['all' => true], -
Import the admin routes, for example in
config/routes/mmd_sylius_riverty_payments.yaml:mmd_sylius_riverty_payments_admin: resource: "@MmdSyliusRivertyPaymentsPlugin/config/routes/admin.yaml"There are no shop routes: the plugin ships no storefront or API endpoints of its own (see Shop API).
-
Run the setup command. It creates the tables. Do not use
doctrine:migrations:migrate, see Migrations:bin/console mmd:riverty:setup -
Schedule the reconciliation of open payments, for example every 10 minutes:
*/10 * * * * cd /path/to/shop && bin/console mmd:riverty:reconcile -
Continue with the configuration: enter the API keys and create the payment methods.
Migrations
mmd:riverty:setup runs only the open migrations of this plugin, nothing from the app or other plugins:
- idempotent: without a new migration nothing happens, so it is safe after every
composer update - checks that the admin routes are imported and prints the snippet from step 3 if they are not (it never writes to
config/) - aborts if migrations of Sylius itself are still open, with the hint to run
doctrine:migrations:migratefirst - Doctrine asks for confirmation, in scripts use
--no-interaction - run it as the same user as your other console commands
The migrations are written for MySQL 8 and MariaDB. On any other platform they abort with an error message.
Update
-
Update the plugin:
composer update mmd/sylius-riverty-payments -
Run the setup command again (idempotent, it adds new tables and columns):
bin/console mmd:riverty:setup -
Clear the cache:
bin/console cache:clear
Cron job
| Command | Recommended interval | Description |
|---|---|---|
bin/console mmd:riverty:reconcile |
every 10 minutes | Reconciles open payments with Riverty, checks expiring reservations, sends the daily digest mail and cleans up old API log entries |
All options are listed on the page Reconciliation and expiry.
Uninstall
The order matters, because the migrations must be rolled back while the bundle is still registered.
-
Disable the Riverty payment methods in the admin so that no customer can choose them any more.
-
Roll back the migrations, one version at a time, newest first:
bin/console doctrine:migrations:execute --down 'Mmd\SyliusRivertyPaymentsPlugin\Migrations\Version20261106090000' bin/console doctrine:migrations:execute --down 'Mmd\SyliusRivertyPaymentsPlugin\Migrations\Version20261105090000' bin/console doctrine:migrations:execute --down 'Mmd\SyliusRivertyPaymentsPlugin\Migrations\Version20261104090000' bin/console doctrine:migrations:execute --down 'Mmd\SyliusRivertyPaymentsPlugin\Migrations\Version20261103090000' bin/console doctrine:migrations:execute --down 'Mmd\SyliusRivertyPaymentsPlugin\Migrations\Version20261102090000' bin/console doctrine:migrations:execute --down 'Mmd\SyliusRivertyPaymentsPlugin\Migrations\Version20261101100000' bin/console doctrine:migrations:execute --down 'Mmd\SyliusRivertyPaymentsPlugin\Migrations\Version20261101090000' -
Remove the route import and the bundle entry.
-
Remove the plugin:
composer remove mmd/sylius-riverty-payments
Rolling back deletes the Riverty transactions and the API log. Back up the database first if you still need them.