Jump to content

Payment is confirmed but Order is not placed with Swipe HQ payment module


Recommended Posts

Hello to Prestashop users and developers.
 
I need your help. !!!! 
 
I found at my company e-commerce website that payments are received from customer by credit or debit card,
but the orders are not created at back office. And also products in shopping cart are still exist.
 
Prestashop version was 1.5 and I updated it to 1.6.1.4 on 30th of March.
From 30.March to 27.April the payment and order seemed to be fine as I received the payment and the order was placed.
Out of sudden,(I think), From 27.April, the problem happened. And it is still exist.
 
I looked the log at back office, found a message
"Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart"
 
The error message seems to happen after the Presashop upgraded, but as I mentioned, the payment and creating order were alright.
 
We have two methods to pay at the website.http://www.aussiesox.co.nz
1)Bank wire
2)Swipe( Credit and Card)
 
When I purchase and confirm a order by Bank wire payment, an order is created but
with Swipe payment method, order is not created and the products are still exist.
 
And I looked at the log after I purchased product by both of the payment methods.
(I turned on DEBUG MODE at paymentModule.php to see the log)
 
When I purchased a product with Bank wire method, logs are created. 
But with the Swipe method, even the logs are not created.
 
 
I added code below to PaymentModule.php and add the file to override/classes and turn the back office to 

allow override.

This solved not to show an error masage

"Frontcontroller::init - Cart cannot be loaded or an order has already been placed using this cart"

 

But, the original problem is still exist.

 

 

public function init()
{
if ((int)$this->context->cookie->id_cart) {
$this->context->cookie->__unset('id_cart');
}

parent::init();
}

 

 

I also upgraded Swipe Hq version from 1.1 to 1.7 but it was not the solution.

 

And then I did

or us, this has solved the issue: https://www.prestash...ckavailablephp/

 

It is a bug in file Core/Business/Stock/Core_Business_Stock_StockManager.php at line 126
 
you should have like this:


$stockAvailable->quantity = $stockAvailable->quantity + $delta_quantity;
$stockAvailable->id_product = (int)$product->id;
$stockAvailable->id_product_attribute = (int)$id_product_attribute;
$stockAvailable->update();

 

 

But, it did not help as well.

 

 

 

Please guys help me to solve this issue. It is emergent...!!!

 

 

Link to comment
Share on other sites

There is nothing to do but trying to debug the broken module. Since the other works, it's not an issue related to prestashop but the specific Swipe module. If it's paid, you should be able to get free support from the developer. If you want top debug yourself, the module should have a custom validateOrder method (I suppose) that you can try to kill at various points to check where it breaks. If it doesn't break there, you will have to inspect the payment flow for that module and see where it does

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...