pinax-stripe-light icon indicating copy to clipboard operation
pinax-stripe-light copied to clipboard

Add support for Stripe Connect

Open elenaoat opened this issue 10 years ago • 13 comments

As far as I see, django-stripe-payments isn't meant for Stripe Connect. Since a lot of the functions are useful for Connect, I thought of re-using the code. Is it in the plans to get Stripe Connect included in django-stripe-payments too?

elenaoat avatar Feb 22 '15 09:02 elenaoat

+1, I'm also planning some integration against Stripe Connect and it'd be great if we can share this effort. That said, there's some work to be done on this project to begin using a more recent version of Stripe's API (required in order to use Connect). This library has fallen pretty far behind in that regard and defaults to using a version of Stripe's API from 2012. Not surprisingly it doesn't fully function against Stripe's latest version as of now: "2015-07-13". So .. some work to be done there. :)

lukeburden avatar Jul 22 '15 00:07 lukeburden

I've started an implentation of this on my fork: wahuneke/django-stripe-payments branch: basic_stripe_connect

Very basic so far, just a start. A few things needed: 1) webhooks intgr, 2) a create function 3) integration into charges

I have implemented number 3 already but only for direct charge, not for customer charge. See branch stripe_connect_and_direct_charge for that work. The work there can prob just be copied into Customer.charge().

Anyway, it's a start. I'm mostly just developing the areas that I need but if folks want to fork and submit pull requests I will happily integrate things and eventually get it all into a clean pull request for inclusion in the main-line

wahuneke avatar Jul 24 '15 14:07 wahuneke

@wahuneke was just getting ready to write some connect code myself, funny you just started this. How is it coming along? Anything I can help with? I'd like to get something working by the next day or so - would much rather contribute towards work that is already done if I can be of help.

boulderdave avatar Jul 28 '15 16:07 boulderdave

ah actually I'm using pydanny's djstripe package. They are both so identical.. seems they should just merge at some time and move forward at one.

boulderdave avatar Jul 28 '15 16:07 boulderdave

agreed. I'm going to focus my work on the pydanny fork as well, it already has most of the things I need

wahuneke avatar Jul 28 '15 16:07 wahuneke

Great - I actually just emailed him to see if he knew anybody working on it.

What is left with your code? looks like you implemented the code in Customer.charge().. is it just the webhooks work?

boulderdave avatar Jul 28 '15 16:07 boulderdave

The code here: https://github.com/wahuneke/django-stripe-payments/tree/20s_production is in production and processes payments every day for the last 2 years. It does not do anything with webhooks.

I won't be working on that fork any further, but will continue this work at wahuneke/dj-stripe. This is already under some discussion here, for one: https://github.com/pydanny/dj-stripe/issues/97

wahuneke avatar Jul 28 '15 17:07 wahuneke

ah good fine -strange, i searched through there with no luck. Thanks @wahuneke

I just forked pydanny's code, and am likely going to pull in a lot of your connect code, and see where things are at.

boulderdave avatar Jul 28 '15 17:07 boulderdave

@wahuneke @boulderdave Just completed a massive refactor of including a rename. I know this discussion was had a while back but I'd be very much interested in seeing any pull requests you might have for the Stripe Connect stuff. master now supports latest API so is ready to start adding in new and awesome features. I understand if you have long moved on and have no more interest in contributing here but in just wanted to welcome you to submit some PRs if you were so inclined.

paltman avatar Nov 22 '15 11:11 paltman

Didn't mean to close the issue. I'm going to reopen and and rename it a bit as I certainly plan on supporting Stripe Connect.

paltman avatar Nov 22 '15 11:11 paltman

I've personally implemented Stripe Connect for Standalone accounts only. As we know, there's also Stripe Connect Managed Accounts. I took a look at my code now and I see that the only contribution I could make is just adding another model for Stripe Connect: AccessToken - a model for tokens for managing payments on behalf of marketplace merchants. Also there are a couple of functions I could add: one for authorizing marketplaces to sell merchants' products and another one for deauthorizing them. I am not sure how much would that help.

elenaoat avatar Mar 17 '16 11:03 elenaoat

@paltman Thoughts on @elenaoat's idea?

ossanna16 avatar Mar 18 '16 07:03 ossanna16

This would be tremendous help @elenaoat

paltman avatar Mar 18 '16 13:03 paltman