Jump to content

Help: carrier module results in payment error.


Recommended Posts

We recently developed a carrier module to get prices dynamically from an API. PS version 1.6.1.4.

 

Nothing out of the ordinary, it includes the getOrderShippingCost function which returns the calculated shipping cost.

 

The correct prices are being displayed for the carriers on the front end, and it's correctly adding the cost to the order total.

 

However, when an order is placed, in the back office it generates a payment error. The order shows the shipping price to be $0.00. The correct amount was charged in the transaction, but prestashop sees the order total as less than this because of the $0.00 shipping, hence the payment error.

 

Looking at the order in the database, I can see there is no value added for the shipping cost there. Adding this value in manually resolves the payment error.

 

What could be causing the shipping price to not be applied to the order properly?

 

 

 

 

 

Link to comment
Share on other sites

There are really two places it could break, it could either break on saving the shipping cost as a stand alone, or it could be breaking when the payment method comes back from the gateway, but is supposed to be saving a shipping cost and does not. 

 

Have you tried orders with another gateway? Or even a payment method like bank wire and check? Are they creating the error with them too? 

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...