petter386 Posted August 26, 2013 Share Posted August 26, 2013 Hi, I have some problems with order status. I have successfuly placed a new order via webservice but even though I have set total_paid_real to 0 and current_state to 10(awaiting bankwire payment) it's somehow automatically changed to status 12(payment remotely accepted) and total_paid_real gets the same value as total_paid. Strange thing is that after request for new order I successfuly get response with XML of just placed order and it has correct values for both mentioned fields. But when I check it in browser via webservice api or in backoffice the values are changed like described before. Does anybody have an idea what would cause this behaviour? Thanks, Peter Link to comment Share on other sites More sharing options...
petter386 Posted August 26, 2013 Author Share Posted August 26, 2013 Anyone? Which part of code handles adding of a new order? Link to comment Share on other sites More sharing options...
Ale76 Posted February 1 Share Posted February 1 HI, have you found some solution? I have the same problem. If I have a payment of 15,50...the "total_paid_real" is forced to "15"...it removes the decimals, and I have "Error in payment" status. And If I put a number like "15" for both payment total and total_paid_real (only to have a situation without decimals) it forced the "payment_status"(current_state) to 11 (remote payment accepted). Why it touch the XML infos?? Link to comment Share on other sites More sharing options...
WisQQ Posted February 1 Share Posted February 1 45 minut temu, Ale76 napisał: HI, have you found some solution? I have the same problem. If I have a payment of 15,50...the "total_paid_real" is forced to "15"...it removes the decimals, and I have "Error in payment" status. And If I put a number like "15" for both payment total and total_paid_real (only to have a situation without decimals) it forced the "payment_status"(current_state) to 11 (remote payment accepted). Why it touch the XML infos?? Float requires you to use dot instead of comma for decimal values. try to set it like that 15.50 and see it it changes. Value is validated using Validate::isPrice function. public static function isPrice($price) { return preg_match('/^[0-9]{1,10}(\.[0-9]{1,9})?$/', $price); } Check classes/order/Order.php file for more information. If you need any advice, open new topic and explain the problem you are facing. Link to comment Share on other sites More sharing options...
Ale76 Posted February 2 Share Posted February 2 Thank you WisQQ, yes, I always use the point for decimals. I don't know why it doesn't consider, only in that filed, the decimals, and replace all with a double 00. I'm sure to send the right well formatted number. I will go deeply in the class "order" as you suggested. Thank you Alessio Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now