2

Time for my first question. "we have a client..." :)

I'd like to achieve something like:

  1. A visitor (User A) is able to register and create a 'Team' Entry.
  2. They then invite new users (Users B, C, D, E etc) to register by adding them to their 'Team' Entry(s)
  3. User A then pays for the Teams they have created - I am planning on constructing a Craft Commerce 'purchasable' item for each Team Entry and passing all of the Teams to the Cart for the usual Checkout process...

Challenge 1: The client would like payments for a given city to be directed to a specific Payment Gateway i.e. Payments for the Paris Team Entries, should go to a Stripe account which the Paris office has access to and can administrate.

In a similar way, payments for London team entries, need to go via a different Stripe account which only the London office has access to.

(there will be over 13 different cities in various countries by 2017 with more added thereafter)

Q: How could I extend or override the default Stripe Account in Craft Commerce settings, based on the location of the Event which a Team is registered for? e.g. I could use Stripe API custom fields in the City Entry.

Challenge 2: Allowing a user to pay for creating Team entries - I spotted this solution by Mr Kelly from earlier this year: Using Commerce to pay for posting entry

I'd appreciate any solutions or ideas you might have - thanks in advance!

Matt

1 Answer 1

2

You wouldn't need to dynamically change the Stripe credentials on the Stripe payment method, rather it is more likely you would set up a seperate Stripe payment method for each Stripe account.

It is a little known feature that you can set up more than one payment method per gateway with different credentials.

You could then hard code the payment method ID to the relevant teams payment screen (or set it on the cart before they get to the payment page). You could even store the payment method ID in that teams entry.

Hope that helps for the initial question.

3
  • Just realised you're referring to CraftCommerce settings, rather than Stripe - thanks again, Luke. Will keep you updated on progress..
    – Matt P
    Commented Aug 26, 2016 at 10:52
  • Luke, that little known feature - I take it that can only be hardcoded and not configured in the control panel? Our requirement is to set a different merchant account and credentials for different countries.
    – Russ Back
    Commented Oct 2, 2017 at 8:26
  • @RussBack no, setting them up in the control panel is fine. Commented Oct 4, 2017 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.