Console Commands

Update order status

For any unforeseen reasons, sometimes the order status is directly updated to the database (may be from a 3rd party service), and Magento is not able to handle the status change to trigger Tamara events such as (cancel/capture/refund).

In such a scenario, run the following console command to update an order:

bin/magento tamara:orders-scan --start-time={startTime} --end-time={endTime}

ParamDefaultDescription
start-time (required)Orders created since this time will be scanned and updated
end-time (optional)current timeOrders created up to this time will be scanned and update

For example, if you want to scan orders created in the last 7 days, run the following command:

bin/magento tamara:orders-scan --start-time="-7 days"

or in the last 30 minutes:

bin/magento tamara:orders-scan --start-time="-30 minutes"

or a specific exact time to scan:

bin/magento tamara:orders-scan --start-time="2021-01-01 00:00:00" --end-time="2021-01-01 23:59:59"

Cancel abandoned orders

For any unforeseen reasons, sometimes your site is unable to redirect to Tamara to complete the payment, and there is a need to cancel all such expired checkout sessions. When the order is canceled, the stock will be reverted.

In such a scenario, run the following console command to cancel an abandoned order:

bin/magento tamara:orders-cancel-abandoned --cancel-before={time} --store-id={storeId}

ParamDefaultDescription
cancel-before (Optional)-40 minutesOrders created before this time will be scanned and canceled
store-id (Optional)0Specific store id as required

For example, if you want to cancel all the abandoned orders from all the stores, run the following command:

bin/magento tamara:orders-cancel-abandoned