Home Forums Stripe Commissions & Gateway Support Error: Invalid non-negative integer

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 31 posts - 1 through 31 (of 31 total)
  • Author
    Posts
  • #34634
    Brian
    Participant

    Hello,

    User are getting the following error on seemingly random transactions.

    Error: Invalid non-negative integer

    I have gone into the pending orders and have noticed this is happening on specific products when a coupon code is used. But the same coupon code works on certain other products. I keyed on on once specific order that got this error and was able to replicate the error. I then removed the coupon code and the transaction processed as normal.

    I am at a loss.

    Any help would be greatly appreciated.

    Thanks!

    #34662
    Brian
    Participant

    Update on this..

    I installed the woocommerce Stripe plugin and temporarily disabled the Stripe Connect plugin and ran a transaction with one of the same products that was failing with a coupon code that was failing and the woocommerce Strip plugin was able to process the transaction with no error.

    This points to it being some sort of conflict with the Stripe Commissions & Gateway plugin and certain products with a coupon applied.

    Thoughts?

    #34665
    Matthew Boyd
    Participant

    Hi Brian and support team,

    I am having the exact same issue and found others are having it on this thread.

    It only happens when a coupon code is applied but not every time – I can’t actually recreate the issue because it works on coupon codes I create for test products. I’m getting emails from customers who can’t checkout because they get that error message. I told them to try checkout without the discount code and it goes through (then get the vendor to issue a partial refund).

    Please could someone help with this as a matter of urgency.

    Thanks,
    Mat

    #34837
    Brian
    Participant

    Any update?

    #34861
    WC Vendors Support
    Participant

    Jamie is working on this one, and will likely have some followup questions on this for all of you. This issue is a top priority for us, and he’s on it now. Stay tuned…..

    #34863
    Jamie
    Keymaster

    Hello,

    I will need some numbers to recreate this.

    Product details – Product Type, Product Price
    Coupon details – Coupon Type, Coupon Amount, product it applies to
    Commission details – kind of commission that it is

    I will assume it is because a coupon is messing with one of the commission values.

    cheers,

    Jamie.

    #34889
    Matthew Boyd
    Participant

    Hi Jamie,

    Product details – Product Type = Virtual (ticket for an event – created using The Events Calendar), Product Price = 480 USD
    Coupon details – Coupon Type = Cart Discount, Coupon Amount = 39 USD, product it applies to = follow this link to see the two products it applies to
    Commission details – kind of commission that it is = 100% to vendor (default)

    It just occurred to me that I should have set the discount code to a ‘product discount’ not a ‘cart discount’. Would that cause an error? I don’t see why it would since the customers only had that one product in their cart when checking out (my site sells event tickets and people always buy them one at a time, we don’t sell any other type of product)

    Thanks for your help Jamie,
    Mat

    #34940
    WC Vendors Support
    Participant

    @matthewjamesboyd1984 — I would try once with a “normal” product (simple) and no coupon, then as a normal product with the coupon. Then we can isolate if it’s a coupon issue, or a “the events calendar” custom product type issue. Let us know!

    #34941
    WC Vendors Support
    Participant

    Oh, for the coupon, yea, it should be a product coupon not a cart coupon.

    #35069
    Joey Bordelon
    Participant

    I was having a similar issue still not fixed. If I create a coupon that has a 50% discount for friends and family that also gives them free shipping, I get this non negative integer error. If I disable the free shipping as part of the coupon code, it seems to work fine. Not sure what is being caused when I have both a percentage discount and free shipping or how that would cause a negative integer.

    #35227
    Jamie
    Keymaster

    @matthewjamesboyd1984 who is creating these coupons? The admin or the vendors?

    cheers,

    Jamie.

    #35250
    Matthew Boyd
    Participant

    Hi @digitalchild and @ben

    It not a ‘the events calendar’ problem as it often works with the events calendar tickets. Like I said this problem doesn’t happen every time. I did a test of a the events calendar ticket with a coupon I created and it worked fine, but customers and vendors are contacting me to describe the problem. Also, other people in this thread are having the same problem with simple products.

    I created the coupons, I don’t give my vendors the ability to create products or coupons I do it for them.

    Please let me know if you want me to try anything else.

    Mat

    #35292
    Jamie
    Keymaster

    Hello,

    Ok now that I know you’re creating the coupons I need to know how have you got this configured for the coupons settings page in WC Vendors? Have you got it set to take commission before or after the coupon is applied? Are the coupons possibly going over the total amount sent to the vendors?

    I’ll see if I can replicate this.

    cheers,

    Jamie.

    #35372
    Jamie
    Keymaster

    Hello All,

    Just to let you know, after 10 hours of debugging I’ve located where the issue lies, I just need to work out how to fix it. Thought I would give you an update so you’re not left hanging. It’s not the stripe plugin at all but how pro is calculating commissions.

    Will update when it’s fixed.

    cheers,

    Jamie.

    #35400
    Jamie
    Keymaster

    Hello Friends,

    I have fixed the bug, will be fixing a few others and then pushing 1.3.3 by the weekend.

    cheers,

    Jamie.

    #35446
    Matthew Boyd
    Participant

    Hi @digitalchild

    That’s awesome, thanks Jamie. Sorry I didn’t get back to you sooner on those questions earlier I don’t work on this full time and didn’t get chance.

    Cheers,
    Mat

    #35755
    Matthew Boyd
    Participant

    Hi @digitalchild

    You mentioned 1.3.3. Will the bugs you fix solve the problem for WC Vendors free? I’m not running pro (I have the Stripe plugin though).

    Cheers,
    Mat

    #35770
    WC Vendors Support
    Participant

    Hi Mat,

    Coupons are not supported in Free……. 🙁 It’s a Pro-only feature…..

    #35771
    Matthew Boyd
    Participant

    Ah, I see.

    Is that the case even though I created the coupon, not the vendor?

    #35773
    WC Vendors Support
    Participant

    Correct. The coupons will just break things because there’s no code to tell the commissions what to do when a coupon is applied, such as deduct it from admin commissions, or deduct it from vendor commissions, etc….

    #35775
    Matthew Boyd
    Participant

    Ah, I see.

    Thanks for your help Ben,

    Mat

    #43302
    Joey Bordelon
    Participant

    I am still receiving this issue. I gave a customer a coupon code for $50 off this morning and free shipping since they already paid me in cash for the product and I just wanted them to “purchase” through the site so they could review the products and take out of inventory. They can’t complete checkout because of the following error: Invalid non-negative integer.

    Any ideas?

    #47271
    Clare
    Participant

    Hello

    Just reporting that I see this error too. It seems to happen randomly – I can run a test and see the error, then re-test with the same users, products, coupons, card, etc, and not see the error. Sometimes one product will cause the error a few times in a row, sometimes it fails once then is fine. It doesn’t seem to be dependent on a particular product, vendor, or user.

    I’m using WC Vendor 1.9.6, WC Vendor Pro 1.3.7 with the Stripe Commissions & Gateway extension.

    #60005
    Stefan Bolboceanu
    Participant

    Hello everyone,

    A. I am testing the coupons and received the same error at the checkout. Please find below the scenarios:
    -I have in my basket three different products from three different vendors
    -I have a coupon code for each product (the coupon codes was created on each vendor dashboard/coupons)
    -If I apply all three coupons for the same basket, I receive this error when I press buy now (I am using stripe plugin in test mode)
    -If I remove a coupon (randomly) I still have the same error at the checkout
    -If I leave only one coupon code it works and I can proceed with the payment
    In order to see which coupon or product causes the error, I try to buy each product individually in separate transactions and applied the correspondent coupon for each product. All payments were successful.
    -I tried to add only two products from two vendors in the same basket and applied the coupons and all payments were successful (e.g.: product 1 from Vendor A with Product 2 from Vendor B; Product 2 from Vendor B with product 3 from vendor C, etc)

    I would appreciate if you can explain me if I am doing something wrong. Maybe I am missing something…

    B. Also, a bit off topic ish:
    -When setting up a coupon and tick the box to “allow free shipping”, should this option cancel the shipping fee for that specific product? E.g: if a product by default has a $5 shipping fee and I create a coupon code of $1 discount and tick “allow free shipping2, the coupon doesn’t cancel the delivery fee. It applies only -$1 for the product price. Is this how it should work?

    Best,
    Stefan

    #60140
    Stefan Bolboceanu
    Participant

    Hello support,

    Any updates on this would be much appreciated.

    Thanks
    Stefan

    #60188
    Anna
    Member

    Stefan @cakecompare ,
    – For the coupons… if you switch to the WC Vendors test Gateway and run an identical transaction to the first one and the last one (all vendor coupons..) do you still receive the error? (I am assuming you receive the non-negative integer error…)

    – What are the coupons (percent, flat amount?)?

    For the second question w/ free shipping vs coupons …. This is a bug that has been fixed and the fix will be in our next release, WC Vendors Pro v1.4.0

    #60203
    Stefan Bolboceanu
    Participant

    Hi Anna,

    Thanks for your reply.
    I switched to WC Vendors test Gateway and the error doesn’t occur anymore. I switched back to Stripe Connect and the error persists. This is very odd…Do you think it might be the Stripe plugin the cause?
    The coupons are as follows: one fixed, one fixed plus “allow free shipping” and one percentage.

    I am waiting for further instructions as I really want to fix this issue before launching the website.

    Thanks
    Stefan

    #60327
    Anna
    Member

    @cakecompare
    That helps- thanks. It sounds like it may be Stripe related, since the error does not occur when you use the test gateway.
    I will submit this issue and when Jamie can get to the Stripe work he can look into this, and contact you if he has further questions or needs more information to debug this issue.

    #60379
    Stefan Bolboceanu
    Participant

    Thanks Anna!
    Do you have any idea how long it will take until Jamie get back to me? Just to know if I can launch my website and hope nobody will use three different coupons in one transaction 🙂
    Regards,
    Stefan

    #60454
    Anna
    Member

    @cakecompare ,
    No- I do not know when Jamie will be able to get to working with Stripe. Right now he is trying to get our next release ready and all of the changes forced upon us by this WooCommerce update. That’ll happen in about a week- then after that he may be able to work on Stripe.

    #60479
    Stefan Bolboceanu
    Participant

    No problem! Thanks for letting me know. If I don’t receive any news, I will send you a reminder in about two weeks or so.

    Also, I am a bit off topic, but still related with coupons. I can create a new topic if need…
    -I am wondering how/if I (the admin / the platform) can create a general coupon that can be applied to all stores. I am planning to give away a few coupons when launching the website and I don’t know if is possible to achieve this. I found a few details here: https://www.wcvendors.com/help/topic/general-coupons-causing-error/ but I still don’t know how to create a general coupon and if is possible. If it’s possible, is there any way to give the vendors the same commission as they was entitled to receive without applying that specific coupon?
    E.G:
    -the general coupon is for $5 off
    -I pay the vendor 90% (10%for admin)
    -the buyer purchase a $20 product, but applies the coupon and will pay $15 at the checkout.
    -I have to pay the vendor 90% from $20 = $18
    -is there any way I can make Stripe to pay the vendor the difference of $3 from the admin Stripe account?
    -if not, can the admin receive an email when a general coupon is used in order to pay that difference manually?

    Thanks
    Stefan

Viewing 31 posts - 1 through 31 (of 31 total)
  • The forum ‘Stripe Commissions & Gateway Support’ is closed to new topics and replies.