lol trash plugin
-
Square Payment Failed ([VALUE_TOO_LOW] Money field
base_price_moneymust not have a negative amount.) Order status changed from Pending payment to Failed.How can this be fixed? This plugin blocks orders for thousands of dollars. Well done guys. If you cant fix it ill make a new plugin using AI better than this rubbish. LOL
-
Hi there,
I understand this situation is frustrating, and I’m happy to help you look into what’s causing this error.
The message:
[VALUE_TOO_LOW] Money field base_price_money must not have a negative amountusually indicates that the final order total being sent to Square becomes negative or invalid during calculation. This can sometimes happen due to discounts, coupons, or adjustments applied to the order.
To help us narrow this down, could you please share a few details?
- Was a coupon code used for this order?
- If yes, was the coupon created in the WooCommerce dashboard, the Square dashboard, or generated using a third-party coupon/discount plugin?
- Could you please share a screenshot of the WooCommerce Order Details page for one affected order? (You can hide any personal customer information.)
- Which payment method was used when this error occurred (Square card payment, digital wallet, etc.)?
- Have you experienced this issue before, and if yes, do the affected orders have anything in common (same coupon, product, discount type, fees, or plugin)?
Also, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:
- System Status Report which you can find via WooCommerce > Status
- Enable Square logging (found in WooCommerce > Settings > Square) after that go to under WooCommerce > Status > Logs and share logs related to this order.
Please use https://pastebin.com/ or https://gist.github.com/ and share a link to that paste in reply here. Once we have more information, we’ll be able to assist you further.
This is the same error as my post – https://wordpress.org/support/topic/coupons-cause-square-to-fail/
it is not negative order total, it is negative line item. My post has example function to test with, but I have not done a proper isolation test yet.
-
This reply was modified 2 weeks, 1 day ago by
technicalx.
I put this slop of a plugin into Claude and got the fix.
File: wp-content/plugins/woocommerce-square/includes/Gateway/API/Requests/Orders.php – Line 549
$subtotal_amount = $is_product ? (float) $item->get_subtotal() : $total_amount;
change it to
$subtotal_amount = $is_product ? (float) $item->get_subtotal() : max( 0, $total_amount );
Let me know if it works for you.
This plugin is an ABSOLUTE DISGRACE for computer programming. I will be working on a simpler square plugin that actually works and doesn’t block payments for thousands of dollars. LOL!
On a side note, the Stripe plugin never had this issue. We always kept it as a back up when we got “failed orders” from “payment plugin” LOL!
I can confirm the fixed worked, but square ended up blocking the payment because they cant handle large orders. Which signals the time to change processors completely. Utterly pathetic process and plugin. LOL.
Hi @fmh999,
Thanks for your patience, and we’re sorry for the frustration. We completely understand how disruptive failed payments are for a live store.
We’re seeing a similar error pattern reported by a few merchants recently, and we’d love to fully understand your specific setup before we dig deeper. Could you help us with a few questions?
- Are you using any custom code to apply discounts or fees to the cart, like @technicalx? For example, a snippet using
$cart->add_fee()with a negative value to simulate a discount or loyalty reward? We’ve seen this pattern cause theVALUE_TOO_LOWerror on Square’s end because negative line items get passed directly to Square’s API, which rejects them. - Are you using any third-party discount or pricing plugins? Looking at your active plugins, we can see things like WooCommerce Dynamic Pricing, WooCommerce Smart Coupons, Extended Coupon Features, and Booster for WooCommerce. Any of these could potentially create negative line items in certain configurations.
- Do the failed orders have anything in common? For example, do they all have a specific discount type applied, a certain product, or a particular cart combination?
- Which version of WooCommerce Square are you currently on? Please share your System Report (see initial reply for instructions)
This will help us confirm whether your scenario matches what we’re already investigating, and point you in the right direction more quickly.
Looking forward to your response.
Since there’s been no recent activity on this thread, I’m marking it as resolved. Don’t hesitate to start a new thread if you need help in the future.
If you have time, we’d be grateful for a review: https://wordpress.org/support/plugin/woocommerce-square/reviews/#new-post
- Was a coupon code used for this order?
You must be logged in to reply to this topic.