Home Forums Stripe Commissions & Gateway Support Error in commission

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 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • #22004
    Bjørn
    Participant

    Hi Ben,

    just had a payment come through to my account, when it should have gone to the vendor.

    I haven’t a clue where to start debugging this properly, could you give me tips as to where to start digging? I have tested purchase on the same live environment with a different vendor account, and that payment went through as expected. That doesn’t help me very much in working out where the errors stems though, since both accounts are set up the exact same.

    Why would the plugin calculate the rate completely opposite for a specific vendor? It’s set to send 100% to the vendor, but sent 100% to me instead.

    Best,
    Bjørn

    #22008
    WC Vendors Support
    Participant

    If you’re using a custom commissions filter code, that controls everything in your themes functions.php file. You’ll know if you have this or not since you would have had to write it.

    Then, first thing I’d check, is that the product doesnt have a commission override. Make sure the the vendor is actually a vendor (user role on the user edit screen).

    That’s really about all I can think of. Commission just “works”.

    #22010
    Bjørn
    Participant

    We’re not using custom code – too scared 🙂

    product does not have a commission override, neither does the vendor – they’re using the global rate of 100% (which is working for other vendors)

    We used a WCV-Pro coupon on the sale, but I tested that on a different vendor too, and it worked fine there.

    There’s absolutely no reason why it would send all the commission my way, but it did. Now I’m worried it’ll happen for every sale from this vendor, as multiple manual bank transfers are not on the top 10 of my favorite things 🙂

    #22011
    Bjørn
    Participant

    It’s a variable product… if that makes any difference.

    #22012
    Bjørn
    Participant

    So, just confirming something here – if a vendor is using global commission rate – their commission dropdown field is supposed to be *empty*, right?

    #22013
    WC Vendors Support
    Participant

    Correct, if there is no override per vendor, or per products, those fields are “empty” as in “blank” as in “nothing there”. 🙂

    Variable products? Eeeeeeh, not sure.

    What does the commission table show? Does it have the correct commission for the transaction in the commission table or did Stripe just not pay the actual vendor?

    #22014
    Bjørn
    Participant

    The admin side commission log says the commission is *paid*. Not to who or what split it made.
    It also has the gross amount listed, without the coupon subtracted.

    When I impersonate the vendor in question, the pro dashboard tells her the commission was paid to *her*
    That’s lying and could get me into trouble 🙂
    The amount listed in the Pro dashboard for the vendor is also just wrong by all counts. It’s not the full payment, it’s not the full payment minus the coupon, and it’s not minus stripe fees either. It’s kinda close to the right number.

    The real data is as follows:
    Received to my stripe account: 1497.00 DKK
    Vendor’s Pro dashboard says: 1437.60 DKK (dashboard/)
    Admin side commissions list says: 1737.00 DKK (wp-admin/admin.php?page=pv_admin_commissions)
    Woocommerce order total says: 1497.00 DKK

    Any more numbers that would be interesting? Do you calculate VAT manually for display in the pro dash for vendors or something, since it’s slightly off? And what about the admin side commissions list, that’s also off?

    The main question is of course still the payment split that went 100% to the wrong person, but there are other things not adding up..

    #22017
    Bjørn
    Participant

    Looking at the stripe API logs it’s actually a slightly differently formatted POST request made for this erroneous transfer. I am pasting them in with slight edits, but the point remains.

    Wrong transfer (went to me)
    currency: “dkk”
    description: “craftie.dk – An Order ID”
    amount: “149700”
    customer: cus_6nxJJqBBBh2C

    Correct transfer (went to vendor)
    currency: “dkk”
    description: “craftie.dk – An Order ID”
    amount: “2220”
    application_fee: “0”
    card: “tok_XXXXXXXXXXXXXXXXXXXXX”

    So the correct event uses a whole different way of talking to stripe.
    Even though they’re placed within minutes of each other.

    #22018
    Bjørn
    Participant

    Actually… Even if we’d set the vendor commission to 0%

    They should still be seeing the charge in their account but with an application fee of 100%. In this case, the transfer went *directly* to my own stripe account, the vendor account was not involved at all.. Why would the stripe gateway do that? Just post directly to the stripe-connect main account? It should *never* do that..?

    #22019
    Bjørn
    Participant

    @ben I will provide any access or info necessary to debug further, this one’s really got me stressed max since it’s the core of the whole business (and plugin) – if we start screwing payments up we start losing business, and we’ve only just started getting business 🙂

    #22076
    Bjørn
    Participant

    Hey @jamie – more info from stripe support

    Thanks for getting back to me with those details.

    I’ve been looking over your account and the charge in question. From what I can see, it appears that when charge was created, the incorrect API keys were used, which is why the charge was created on your account.

    You mentioned that you’ve been having trouble with your plugin recently. I can see that this charge was made using our PHP library and some of the older charges that were made on the connected account, were made using our Java library. This suggests to me that these charges were made using two different sources. If you’ve changed plugin recently, I’d recommend reaching out to them to check that they have the correct API keys configured for both your account and your connected accounts.

    Hopefully this helps to shed some light on the situation. If there’s anything I can help you with regarding this or anything else Stripe related, shoot me a quick email and I’ll be happy to help.

    Hopefully that’s useful information. Sounds very odd.

    #22089
    WC Vendors Support
    Participant

    “From what I can see, it appears that when charge was created, the incorrect API keys were used, which is why the charge was created on your account.” that would be a setting configuration issue in your wp-admin, yes?

    #22122
    Bjørn
    Participant

    It would, except subsequent and previous purchases have worked without error.

    #22123
    Bjørn
    Participant

    Also, the api keys are correct.

    #22127
    Anna
    Member

    Has that particular vendor had successful transactions with the correct commission split?
    Maybe that vendor’s keys are wrong so by default the payment was then sent to you. ?
    Just a thought…

    #22128
    Bjørn
    Participant

    Wait, vendors have to type in their own keys?

    #22129
    Bjørn
    Participant

    Oh FFS…

    So the issue is suddenly clear, thanks to you @fervous – you made me go back and check the basics.

    For some reason, the plugin has “forgotten” that our accounts are connected.

    In Stripe dashboard, the accounts are still connected (and I have full edit access), but in the plugin they somehow are not any longer.

    Can I manually repair that in the DB @ben?

    #22131
    Anna
    Member

    Did this happen during the update to 1.2? Is YOUR admin account still connected to Stripe but the vendors accounts are no longer connected?

    I hope you can get it worked out.

    I also use the Stripe connect, so when I update everything I will check very closely. I don’t have any live vendors on my site yet- still testing.. but I was hoping to open on the 1st of Feb. so I was following your issue closely. Like you said… the last thing you need is to have the payments messed up! Yikes! 😉

    #22134
    Jamie
    Keymaster

    Hello,

    I’ll have to look into this further regarding the 1.2 update and whether it disconnects the stripe accounts for any reason. I’m not sure why it would as I didn’t touch that at all.

    cheers,

    Jamie.

    #22151
    WC Vendors Support
    Participant

    The Stripe connect key is to the user_meta it was never part of Pro’s custom store post type. Should have zero affect at all on it. I’m in a hotel in bed at 3am right now, but you can find the meta key easy enough by inspecting the element. Nap time. 😉

    #22155
    Bjørn
    Participant

    It’s not 1.2 – I’m waiting til it’s safe 🙂

    I’ll try finding the user meta thing Ben, thanks! I’ll report back if I’m too nooby 🙂

    #22161
    Bjørn
    Participant

    Hiya again – I soon realised that the key has to be generated on oauth acceptance by the vendor, so I’ve sent them to try auth again.

    #22162
    Bjørn
    Participant

    Question – the keys are stored as plain text in the DB. Should they not be stored encrypted? I mean they do allow write access to someone’s Stripe account, right?

    #22164
    WC Vendors Support
    Participant

    Plain text is fine. It’s a tokenization scheme. Only Stripe knows what that code actually means, to us it’s nothing but a random pile of characters. If your database got hacked it’d be useless data to have.

    http://speakinginbytes.com/2014/02/credit-card-tokenization/

    #22177
    Bjørn
    Participant

    Aight, thanks for that useful bit of info 🙂

    #23097
    WC Vendors Support
    Participant

    Bj0rn, Jamie is about to check this out and wants to know if it’s still an open issue or not. Let me know!

    Ben

    #266 ref

    #23099
    Bjørn
    Participant

    It looks like the issue is this:

    The vendor already has a stripe account – the account is already connected to ours – the plugin doesn’t agree with that – and we can’t connect the vendor (in the plugin) using the connect button.

    I’m not sure exactly where the process skips out – *but* this vendor had a stripe account prior to signing up with us, that might have something to do with all this, yeah? That’s the only difference between this vendor and others.

    #23101
    WC Vendors Support
    Participant

    I’m not entirely sure I understand. The vendor already has a stripe account -- the account is already connected to "ours".

    – The admin account is connected via the checkout settings of Stripe in wp-admin — correct?

    – The vendor connecting their account is not the same as the admins account being connected — correct?

    A vendor having a Stripe account before connecting is easy — you’d just click Connect and login. Then you’re done. If the vendor doesnt have a Stripe account, all they do is sign up on that page and then connect, and then they are done, too.

    Really need some exact step by steps to be able to tinker around on this one. Gateway testing is a LOT more time consuming than just general Pro bug fixes because there’s sooooooo many more tests and steps along the way. With exact, repeatable steps to reproduce an error or an issue, we can get it done much quicker.

    #23105
    Bjørn
    Participant

    I understand that it’s hard to repro, truly, but I don’t know what the vendor *did* to have this happen. I have no idea if it was the vendor that created an error – or if the plugin coughed something up all by itself.

    Whatever they did, they managed to connect our stripe accounts, but *only* in stripe. The plugin doesn’t have a client id for this vendor – there’s not even an entry in the DB for it (the token you get back from stripe).

    #23106
    Bjørn
    Participant

    Next steps I took were to send the link to the vendor (copied from the stripe connect button while impersonating the vendor) and ask them to
    a) log in to stripe
    and then
    b) open that link in the browser.

    They said that this prompted them to create a new account, at which point I told them to stop, since that was *not* expected behaviour. As you said – it’s supposed to just let the vendor click accept, then they come back.

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