Stripe payments with Pyramid

93 views
Skip to first unread message

Silviu Dicu

unread,
Mar 11, 2016, 4:08:16 PM3/11/16
to pylons-discuss
Hi,

I'm looking for a package that will allow payment management with Stripe integrated with Pyramid.

Found https://github.com/jkoelker/pyramid_stripe but the author says is not updating it anymore nor
he released it to pypi.

thanks!

Chris Rossi

unread,
Mar 11, 2016, 4:26:27 PM3/11/16
to pylons-...@googlegroups.com
What would you need special to integrate with Pyramid?  I use Stripe in a Pyramid based website, but I have no idea what I would put in a pyramid_stripe package.   Just, you know, use the Stripe API--it's pretty straightforward.

Chris


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
Visit this group at https://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Vincent Catalano

unread,
Mar 11, 2016, 4:38:56 PM3/11/16
to pylons-...@googlegroups.com
The Stripe Python API can handle most of the basic functionality you may need. I currently use jkoelker's library in one of my projects since it allows me to integrate with Stripe webhook events as Pyramid events. This is really helpful for when I need to handle user subscriptions that expire or failed subscription payments. However, you don't need the library uploaded to Pypi in order to use it, if you are using pip, you can include the git project in your requirements.txt with the following line:


I've been meaning to talk to jkoelker for a few months to see about taking over this project though. Unfortunately, I haven't gotten around to it quite yet...
--
Vincent Catalano
Software Engineer and Web Developer,
(520).603.8944

Silviu Dicu

unread,
Mar 14, 2016, 8:32:34 AM3/14/16
to pylons-discuss
Hi,

The events hook seems useful, makes sense to use it - I was a bit worry since
this is not 'maintained' so asking jkoelker's to add somebody as maintainer seems logical.

thanks!

Jonathan Vanasco

unread,
Mar 15, 2016, 1:23:00 PM3/15/16
to pylons-discuss
Just a word of caution to Vincent's method...

I strongly suggest that you fork from github and install off your personal fork.  If the original maintainer's version disappears (that has happened to me), you'll spend way too much time tracking down a compatible version (if you can find one) or turning some checkout on a random machine into the new source for deployments.

You can also create a tag on your fork and install that specific tag -- so you can keep the master in sync and not worry about incompatibilities.

James Bennett Saxon

unread,
Jan 16, 2018, 12:38:06 AM1/16/18
to pylons-discuss
I have been pondering how to handle the heap of webhooks that stripe spits out.  This small library seems like a great interface to that API.

Alternatively in a Stripe best practices post, there was a suggestion to avoid processing authentic calls by using the only the event ID and then querying Stripe to get the event data (to avoid processing imposter events).  With such a minimal interface, this might avoid the need for this layer perhaps as @ChrisRossi pointed out.

I'm not sure which way I'll go yet.

I may fork it.

James Bennett Saxon

unread,
Jan 16, 2018, 2:58:39 AM1/16/18
to pylons-discuss
Ok, so something kept bothering me about pyramid_stripe only using the api_key and I realized it was that it's not calling `stripe.Webhook.construct_event`.  So it might require a little more tweaking.

Vincent Catalano

unread,
Jan 16, 2018, 12:30:04 PM1/16/18
to pylons-discuss
I have a fork of the project that has a number of updates. You can check it out: https://github.com/vcatalano/pyramid_stripe. I haven't looked at it in a while though.

James Bennett Saxon

unread,
Jan 17, 2018, 2:17:48 AM1/17/18
to pylons-discuss
Ah great!  I'll take a look! 

I'm not all that sure what's new and or old at stripe but they're now recommending verifying signatures. So perhaps the back and forth suggested by launchdarkly is no longer necessary.

Have you added in the signature verification? 

Thanks for the response!

On another note, what kinds of data are you storing on your system to interface with stripe?  I'm trying to MVP my project and am not sure what data I should be keeping on my side.  Seems like customer token is the critical piece.  Can I just keep that and handle everything else on stripe via the API?  Thanks again!

Vincent Catalano

unread,
Jan 19, 2018, 2:06:13 PM1/19/18
to pylons-discuss
Unfortunately, no. My changes do not contain functionality for signature verification.
Reply all
Reply to author
Forward
0 new messages