Comments (10)
This is my log file from today
2023-06-15T07:31:33+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:31:33.81Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:31:33.810Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:31:35+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:31:35.542Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:31:35.542Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:36:05+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:36:05.181Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:36:05.181Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:36:07+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:36:07.33Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:36:07.330Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:37:16+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:37:16.652Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:37:16.652Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:37:18+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:37:18.531Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:37:18.531Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:42:01+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:42:01.795Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:42:01.795Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:42:03+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:42:03.393Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:42:03.393Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:43:58+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:43:58.113Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:43:58.113Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:43:59+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:43:59.823Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:43:59.823Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:48:29+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:48:29.75Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:48:29.750Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:48:31+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:48:31.52Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:48:31.520Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:48:35+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:48:35.258Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:48:35.258Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:48:38+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:48:38.885Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:48:38.885Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:48:42+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:48:42.908Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:48:42.908Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
2023-06-15T07:49:07+00:00 DEBUG Error 442 connecting to the API (https://app-wallee.com/api/transaction/create?spaceId=5353) : {"date":"2023-06-15T07:49:07.438Z","defaultMessage":"The line item discount must have the same sign as the line item amount.","id":"NDr2xV3lnPSkEW1A9vFg8dduO235Z4T3k3lGFb0DK-c (2023-06-15T07:49:07.438Z)","message":"The line item discount must have the same sign as the line item amount.","type":"DEVELOPER_ERROR"}
from woocommerce.
Dear snmabaur
We still have one open BUG, that let the payment methods disappear, when a coupon as well a tax is defined on the order.
If the deactivation of the line item consistency didn't work for you, I think the only way is to wait for the BUG fix.
Please also consider, that we are only compatible with the WooCommerce Standard Coupons as well the Smart Coupon Plugin.
If you are using some other coupon or product plugins, which could change the product object structure, compared to the WooCommerce standard environment, this also could be an issue for the current issue you got.
We will let you know as soon the BUG fix has been published.
Best regards
from woocommerce.
Do you have a timeline when this bug should be fixed?
We use PDF Product Vouchers from SkyVerge and the normals Woocommerce Coupons... the problems exist with both of them
But then we wait until the bugfix will be published
Thanks
from woocommerce.
We are experiencing the exact same issue.
Here's what I've discovered so far:
The problem occurs only when there is a single line item in the cart.
However, when we have at least two line items per product, everything functions as expected.
I would greatly appreciate a hotfix, even if it means I have to implement it directly into the currently running plugin myself.
Thanks!
Phil
from woocommerce.
Hi @snmabaur,
is there an ETA when this bug with a single line item together with a coupon code in cart gets fixed?
from woocommerce.
@philb74
I also would like to know if there is an ETA :) Is there one @theodorspringwallee ?
from woocommerce.
@snmabaur @theodorspringwallee Any news in this case? We are experiencing the exact same issue and waiting desperately for a bugfix.
from woocommerce.
Dear mschaer
According to our product owner, we will work on this developer sprint. So it probably will be finished after 2 weeks.
Best regards.
from woocommerce.
Dear mschaer, snmabaur, philb74
I had right now a talk with our developers, and they can't reproduce the mentioned issue in the newest plugin version and without the line item consistency option.
To provide you optimal support on this, please can you create a ticket by writing to [email protected], that we can take a more in deep look on your shop systems. This can help us to identify possible issues, we don't see on our developer instances.
Many thanks for your cooperation.
Best regards
from woocommerce.
Dear contributors!
The issue might be caused by lost precision when using a rounded tax value in calculations.
See \WC_Wallee_Service_Line_Item::create_product_line_items_from_session
lines 98-99 on current master:
$amount_including_tax = $values['line_subtotal'] + $values['line_subtotal_tax'];
$discount_including_tax = $values['line_total'] + $values['line_tax'];
Here $values['line_subtotal_tax']
are already rounded to 2 digits!
Example fix using raw tax data from $values['line_tax_data']
:
$subtotal_tax = array_sum($values['line_tax_data']['subtotal']);
$total_tax = array_sum($values['line_tax_data']['total']);
$amount_including_tax = $values['line_subtotal'] + $subtotal_tax;
$discount_including_tax = $values['line_total'] + $total_tax;
The same issue is obviously in \WC_Wallee_Service_Line_Item::create_product_line_items_from_order
. There you can obtain precise tax data from $item->get_taxes()
.
Another possibly dangerous place to check - it seems masking this issue by using abs()
on incorrectly calculated discount when value becomes negative and therefore submitting wrong data to Wallee API. See: class-wc-wallee-service-line-item.php:380:
$discount = abs($amount_including_tax - $discount_including_tax - $coupon_discount);
Hope this helps...
from woocommerce.
Related Issues (18)
- Wallee checkout is not added automatically to checkout page
- Support WooCommerce Blocks HOT 9
- Plugin Closure HOT 4
- Critical fault by entering admin or checkout HOT 10
- Option to disable device_id cookie HOT 1
- Bug with coupons activated HOT 2
- Attaching Wallee Innvoice to WooCommerce HOT 7
- Payment page not working HOT 1
- PHP Notice: wpdb::prepare was called incorrectly HOT 1
- WooCommerce support
- Wallee not showing in the Payments tab HOT 1
- Incorrect consistency adjustment item type HOT 1
- what update ? HOT 2
- English text HOT 1
- Stop Wallee Email to Custoer HOT 5
- E_WARNING: Cannot modify header information - headers already sent (Most recent call first) HOT 1
- Orders won't change to processing anymore HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from woocommerce.