Synchronize order status with Worldpay

To synchronize the order status with Worldpay, use the following configurations:

ConfigurationDescription
Sync Order With StatusYou must select the Magento order status to be available for status synchronization with Worldpay status.
Time WindowYou must set n Number of hours. All orders placed in last n number of hours are considered for this synchronization.

Synchronize the order status

Note
This job synchronizes the order status with Worldpay for all orders placed in past 24 hours. The exception is orders placed in past 30 minutes before the synchronization starts, these orders are not included.

Job Group: worldpay_orders

Job Name: order_sync_status

During a rare fail-over of the notification channel update, Magento might not update orders as expected. You can set up a cron job to update them as a fail-over mechanism.

Cron jobs can update and synchronize any type of order (direct, redirect, MOTO, etc) on the Worldpay server. This assumes that the order was placed during the past 24 hours.

Note

You cannot update cancelled orders with a cron job.

Executing the cron job for Worldpay-specific orders

The software utility cron known as a cron job is a time-based job scheduler.

During normal operation, Magento includes plenty of cron jobs. You can run all the cron groups, or you can run single groups.

To avoid running all the groups, run the Worldpay_orders group. This updates Worldpay orders only. Run the command below to execute the script that will update only Worldpay orders:

php bin/magento cron:run --group="worldpay_orders"

When the job is done the results appear on the CLI screen:

cron job results

For more details about order inquiries, please visit the Worldpay support site.

How to set up cron jobs in periodic time

To schedule cron jobs in periodic time, you must set them up on your server. First, use this command line to configure cron:

crontab -e

Use this command to execute a Worldpay cron job every minute (adding in your php.ini file path where indicated).

*/1 * * * * php -c {php.ini_path} {magento_path}/bin/magento cron:run-- group="worldpay_orders"

You can adjust the time setting to suit your needs.