Add full payment switch

This commit is contained in:
Abhishek Kumar
2024-02-13 17:18:55 +05:30
parent 7fb3a5574c
commit b2d791c565
4 changed files with 72 additions and 28 deletions

View File

@@ -430,7 +430,7 @@ abstract class PaymentModuleCore extends Module
if ($order_status->logable
&& number_format($cart_total_paid, _PS_PRICE_COMPUTE_PRECISION_) != number_format($amount_paid, _PS_PRICE_COMPUTE_PRECISION_)
&& $this->name != 'wsorder'
&& !(isset($this->hasPartialPayment) && $this->hasPartialPayment)
&& $this->name != 'bo_order'
) {
// if customer is paying full payment amount
$id_order_state = Configuration::get('PS_OS_ERROR');
@@ -479,7 +479,7 @@ abstract class PaymentModuleCore extends Module
}
// Register Payment only if the order status validate the order
if ($order_status->logable || (isset($this->hasPartialPayment) && $this->hasPartialPayment && $amount_paid)) {
if ($order_status->logable) {
// $order is the last order loop in the foreach
// The method addOrderPayment of the class Order make a create a paymentOrder
// linked to the order reference and not to the order id