Resolved: API issues in order creation from webservice request
This commit is contained in:
@@ -374,7 +374,11 @@ abstract class PaymentModuleCore extends Module
|
||||
// We don't use the following condition to avoid the float precision issues : http://www.php.net/manual/en/language.types.float.php
|
||||
// if ($order->total_paid != $order->total_paid_real)
|
||||
// We use number_format in order to compare two string
|
||||
if ($order_status->logable && number_format($cart_total_paid, _PS_PRICE_COMPUTE_PRECISION_) != number_format($amount_paid, _PS_PRICE_COMPUTE_PRECISION_)) {
|
||||
// If webservice order request then no need to impose equal amounts(total cart and sent amount) condition
|
||||
if ($order_status->logable
|
||||
&& number_format($cart_total_paid, _PS_PRICE_COMPUTE_PRECISION_) != number_format($amount_paid, _PS_PRICE_COMPUTE_PRECISION_)
|
||||
&& $this->name != 'wsorder'
|
||||
) {
|
||||
// if customer is paying full payment amount
|
||||
$id_order_state = Configuration::get('PS_OS_ERROR');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user