Hello,

It would be really great to configure the payment methods by shop.
I would like each seller on a marketlace to be able to link his mode of payment to his shop (eg paypal). In order to be paid directly into his account.

Second thing.
If a seller proposes the method of payment by check, with the following instructions:
- the check must be made payable to "monsieur x".
And that a second seller offers the method of payment by check, with the following instructions:
- the check must be made payable to "monsieur y".
It is essential to link the payment methods to each shop.

EDIT (if I understand properly, related to discussion here #2881327: Payplug avec plusieurs boutique):
In a marketplace context, how to set up each payment gateway configurations (API key, etc...) per shop rather then globally.

Comments

zenimagine created an issue. See original summary.

Dom.’s picture

Title: Choose the shop in the payment mode configuration page. » MarketPlace: Per shop payment gateway configurations
Issue summary: View changes

This is related I guess to the feature request here #2881327: Payplug avec plusieurs boutique
Also set this as parent: #2869505: [meta] Marketplace model

I would second that request, plus I am okay to work on this, but I would need an architectural opinion from CommerceGuys first.

Dom.’s picture

bojanz’s picture

We can (and should) add an OrderStore condition which would allow gateways to be limited to specific stores.

However, that won't work for marketplace sites, cause you can potentially have thousands of stores, but you can't have thousands of payment gateway config entities (they're all always loaded at once, due to their configy nature).
Thus, marketplaces need a different approach. In that case the choice of gateway has already been made and is the same for all stores, so the best way is to store the credentials on each store, then override the payment gateway class to take those credentials from the order's store.
That might be doable in a generic fashion, suitable for a custom contrib.

bojanz’s picture

Title: MarketPlace: Per shop payment gateway configurations » Create an OrderStore condition

Let's focus on the part that we can solve in Commerce.

We need an OrderStore condition that stores a set of store UUIDs, and uses the commerce_entity_select form element in the settings.
We also need a way to hide the condition for promotions, since promotions have a store field that's used for this use case.

  • bojanz committed cf8fc17 on 8.x-2.x
    Issue #2896145 by bojanz: Create an OrderStore condition
    
bojanz’s picture

Status: Active » Fixed

Done.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.