blockonomics / opencart-plugin

Bitcoin plugin for Opencart v4 by Blockonomics
4 stars 7 forks source link

Order status changing to Processing on checkout #15

Open blockonomics opened 3 years ago

blockonomics commented 3 years ago

Even if customer doesn't pay order status is changing to Processing

DarrenWestwood commented 3 years ago

The order status is always set to the 1st status in the extension settings. https://github.com/blockonomics/opencart3-plugin/blob/master/catalog/controller/extension/payment/blockonomics.php#L142

This is incorrect behavior, as this should be reserved for Paid Status Test order 3 settings

This can be changed to always set orders to Pending, or removed (status will be Missing until payment).

DarrenWestwood commented 3 years ago

Tested this issue. $this->model_checkout_order->addOrderHistory($order_id, 1, "", true); is working as it was designed to.

Status 1 is equivalent to Pending and orders are always being marked as Pending during checkout. 1 - Pending 2 - Processing 3 - Shipped 5 - Complete 7 - Canceled 8 - Denied 9 - Canceled Reversal 10 - Failed 11 - Refunded 12 - Reversed 13 - Chargeback 14 - Expired 15 - Processed 16 - Voided

Order statuses on callback are also working as designed. Paid Status is applied on 0 confirmations Confirmed Status is applied on 1 confirmation Complete Status is applied on 2 confirmations https://github.com/blockonomics/opencart3-plugin/blob/master/catalog/controller/extension/payment/blockonomics.php#L275-L306