How do I take payments via Ubercart and distribute them to vendors? I'm working on a site that needs to take custom payment and remit a part of it to one or more vendors that are determined by the products purchased (the vendors essentially create the products themselves in the shop). I have seen Ubercart Marketplace as a possibility for this, but it's rather old. However, it's the closest to what I need. Should I go with it or is there a better, more fully-integrated solution in Drupal (that uses Ubercart) that I should investigate?
This is outside Ubercart, but it's definitely possible with Drupal!

For this demonstration, I will use a point system. Let's say 100 points = $1.00.

Drupal 7 method:


Create a content type, called Products.
Install a Drupal module, called Entity Reference and add an Entity Reference field to the Products content type, select users. This will allow you to reference the product to vendors.
Create another content type, called Points. Also add an Entity Reference field to it, and select type as users, to reference users. In addition, add a decimal field (amount).
Install another Drupal module, called Rules
Create a rule that would, after a certain time (30 days, etc...) from the sale date, create a Point node with that User referenced and add the commission earned.
Create a rule, that would unpublish the Point node anytime the payment is withdrawn.


Another option is to use the Relation module. It's more work and still in early stages.

By creating a Point node for each commission, you're leaving all records of transactions. I would never overwrite the old commission value with new commission, i.e. $user->payment = $user->payment + 10. It will mess things up.

You can still use Ubercart with this, as it uses Drupal's entity/field structure. Simply skip #1 and use Ubercart's product content type.