Home Forums WC Vendors Pro Support Coupon Codes Causing Payments to Fail

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 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #40817
    Chris
    Participant

    @digitalchild, we are having an issue when customers try and use a coupon code at checkout. If they select Stripe, they are getting the error message: “Error: Invalid Non-Negative Integer” and if they select paypal, “This transaction is invalid. Please return to the recipient’s website and try again.”

    I have tried creating the coupon vs the vendor creating the coupon, and in both instances, the same error appears. This coupon is a product specific one, where the vendor is giving 40% off every product they make.

    In our settings, we have it set to take commission after the coupon has been applied.

    I’ve done a bit of testing, and it looks like there is some funky rounding going on somewhere.

    The vendor who received this payment sent me a screen shot of the email Stripe sent them. It’s super blurry, but I can see where they received 18.88. I started digging around in my Stripe account to see what details I could find, and it turns out I can log into this vendors account though my account and get access to the logs (very cool). The commission split and everything seemed to work correctly, the only issue is the amount that was sent to Stripe for processing.

    Now, to take it one step further, when I log into the site as the vendor (user spoofing is also very cool) and click on the order details, it shows a total commission of $17.68, but when I click on the “Print Invoice” button, the invoice is showing a total of $18.29. Interestingly enough, this is a difference of $.61, which is what the taxes add up to be after discounting the product. However, on the order information, it shows taxes as $.62, even though adding up the itemized taxes only comes to $.61. Now, how we ended up at $18.88 that was sent to Stripe, I have no clue, but maybe that will help.

    I’ve attached the order details and the printed invoice for this order. We are using the WooThemes invoice plugin for our invoices, so that is why it looks a bit different. I’ve also emailed our dev about this issue, but I know he is away for ~week, so I thought I’d throw this up to see if it might set off any light bulbs.

    Any ideas what may be happening with that?

    Thanks
    Chis

    #40821
    Jamie
    Keymaster

    Hello,

    Is the cart showing the correct details before you check out with the total discount equal to 40% off all products. I have no idea how that woocommerce invoice thing gets its details as I didn’t write any integration code for this. What does the commission table show for amounts for the order? Not the admin table the actual database table.

    What theme are you using?
    What commission rates are you setting?
    What is your tax rates and are the prices input inc or ex tax ?

    cheers,

    Jamie.

    #40874
    Chris
    Participant

    @digitalchild, I’ll do my best to answer these for you.

    Some of the info above may not be relevant anymore, since some of it pertained to Stripe overcharging, and me thinking the two issues were related. Like I mentioned in the other thread, I think that has been sorted (nice work btw!), but the coupon issue is still sticking around for me. Everything works fine if there is no discounts applied to the order, but once I apply a discount and try to pay either via Stripe or Paypal, I get an error and a failed payment. Because of that, there is no commission stored in the database to look at, so that was my fault for muddling the issue with my first post.

    As far as your other questions:

    Theme: Mindig
    Commission Rates: Default is 93% to the vendor, but some are currently set at 100%
    Taxes: We use a custom plugin that ties the avalara (sp) tax tables in with the buyer/sellers location. I’ve tested scenarios where tax would be and would not be collected, and the issue occurs in both circumstances.

    I saw some prior threads about percentage discounts causing this error, so I’ve tried both percentage and dollar off discounts. Both are causing the failed payment. I also verified our decimals are set to two places.

    With all that said, I did some additional testing, and it looks like the coupon issue is isolated to this particular vendor and their products. In the case of this vendor, I created their products as the marketplace admin, and once the vendor signed up, I moved them over to that vendors store, using the “Vendor” selection on the product page. I’m thinking this may be the root cause of the issue, but why that is causing an issue, I am not sure. I even tried logging in as the vendor, making changes to a product and saving it, just to see if that might clear up something on the db end.

    #40880
    Chris
    Participant

    Sorry for the double posts, but I had a bit more time to think about this one, and do some additional testing. This issue is specific to the products that I entered as one vendor, and then updated them to another vendor, once that vendor signed up. I created new products under the “problem vendors” username, and the coupons work perfectly there. Hopefully that helps, and will allow you to recreate the issue on your end.

    Thanks!
    Chris

    #40921
    Jamie
    Keymaster

    Hello @pbmang

    No wonder I couldn’t replicate this problem. I’m not sure why that would be the case because changing the vendor just changes the author of that specific product. All the meta is the same, well it should be.. Are you able to do a product comparing of the post_meta tables for the two post ids?

    cheers,

    Jamie.

    #40945
    Chris
    Participant

    Hey @digitalchild,

    I looked in the wp_post table, and pulled the values for each. In the post_author field, they both show the same number. That was my initial suspicion as well, that possibly that value didn’t get changed. I also checked the wp_postmeta table, and didn’t see any fields that would jump out at me in relation to the vendor. With that said, I really don’t know much about db structure and how that is all tied together. If you can think of other tables to look into, I’d be more than happy to do it.

    #56877
    TWL
    Participant

    I am also having this issue – some customer paying by coupon are receiving “Error: Invalid non-negative integer”

    Has anyone found a solution to this?

    Thanks

    #56965
    Anna
    Member

    Hello,
    Are you using admin created coupons (WooCommerce) or the Vendor coupons created by the vendors from their dashboard?
    Only the vendor coupons will calculate properly with WC Vendors at this time.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.