Processing Payments

The Sylius PayPal Plugin supports asynchronous payment completion, ensuring that orders are updated only after successful confirmation from PayPal.

To handle this, the plugin provides a console command:

bin/console sylius-paypal:complete-payments

How It Works

  • The command scans all PayPal payments with the status processing.

  • It checks with PayPal whether the order has been successfully completed.

  • If confirmed, it updates the payment and order state in Sylius.

Setting Up as a Cron Job

To keep payment statuses in sync with PayPal, you should run the command regularly via a cron job.

Example Crontab Entry

*/5 * * * * /path/to/your/project/bin/console sylius-paypal:complete-payments >> /var/log/paypal-payments.log 2>&1

This runs the command every 5 minutes and logs the output.

Adjust the interval based on your transaction volume and server ca

Keeping this command active ensures your orders are finalized correctly, even in edge cases.

Last updated

Was this helpful?