Stripe?

117 views
Skip to first unread message

Tom Longson (nym)

unread,
Jan 13, 2012, 2:51:18 PM1/13/12
to satchm...@googlegroups.com
Curious if anyone has Satchmo using Stripe instead of PayPal, etc.

http://justinvincent.com/page/1790/how-i-converted-my-subscription-site-from-paypal-to-stripe-in-2-days

Cheers,
Tom Longson
----------------------------------------------------------------------------
CUPCAKES!! http://www.cupsandcakesbakery.com/

Message has been deleted

RJ Ryan

unread,
Mar 27, 2012, 11:40:22 AM3/27/12
to satchm...@googlegroups.com
After realizing the Google Checkout API (not related to Satchmo) doesn't support what I need, I hacked up a Stripe payment processor for Satchmo today. It works well on Satchmo 0.9.1. I'll try to clean it up and get the code pushed somewhere soon. The main limitation to be aware of with Stripe is that it only supports USD. 

What's the status of django-bursar? Should I bother trying to get this merged into Satchmo or will the payment processors be deleted soon in favor of django-bursar?

Chris Moffitt

unread,
Mar 27, 2012, 11:52:15 AM3/27/12
to satchm...@googlegroups.com
Unfortunately we haven't had the bandwidth to work on bursar. Targeting Satchmo integration is the wisest approach.

-Chris

--
You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/satchmo-users/-/eHsBr_TkaogJ.

To post to this group, send email to satchm...@googlegroups.com.
To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.

RJ Ryan

unread,
Mar 28, 2012, 6:43:52 PM3/28/12
to satchm...@googlegroups.com
Here's my first hack at the Stripe module. 

It's missing:
* Templates (all my templates are specific to my use of Satchmo. I'll try to make some based on the example project)
* Handling of notifications from Stripe (it just logs them and does nothing more)
 
The way Stripe works is that you never handle credit card details at all. The form that the user enters their details into is posted to Stripe, and then in Javascript you get a token back from Stripe's servers which is a 1-time-use token for charging that credit card. The way I did it, the token is POSTed to Satchmo and its stored in the database much like credit card credentials are stored in the database in other payment modules. When it comes time to charge the credit card, it requests the charge from Stripe and either succeeds or fails. Because of this you don't need a callback from Stripe to indicate that the payment succeeded. 

What you /do/ need to listen to the callbacks for are charge disputes and refund actions. I haven't implemented this yet. 

I wanted to get the code up somewhere so that people can use it and comment on my implementation. It's hard to know if I'm following all the requirements of a Satchmo payment module so I'd appreciate any comments about what I'm doing wrong. 

To use it you need to install the stripe Python package: http://pypi.python.org/pypi/stripe/

Buddy Lindsey

unread,
Apr 2, 2012, 9:05:13 PM4/2/12
to satchm...@googlegroups.com
I have been working on this for a few days now, feels like banging my head against a wall. Mine is a "bit" more generic, but there are some serious problems with satchmo itself when it comes to stripe integration.

Here is my attempt (still doesn't work) https://github.com/buddylindsey/satchmo-stripe

My biggest problem is getting the token to the processor. I am trying to avoid saving to the DB, but if I have to I will.

Just throwing out my attempt as well.

Chris Moffitt

unread,
Apr 2, 2012, 9:25:38 PM4/2/12
to satchm...@googlegroups.com
If the issue is saving a token, you could try throwing it in the cache.

-Chris

--
You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/satchmo-users/-/1kUlJHktPfoJ.

Buddy Lindsey

unread,
Apr 2, 2012, 10:13:40 PM4/2/12
to satchm...@googlegroups.com
I guess there isn't a really big problem saving to the database. Was just wanting to avoid it.

This module is mostly kicking my butt because I haven't used satchmo before, and I am trying to do something this tedious.

Also any suggestions at what I do have would be appreciated.

-Buddy
To unsubscribe from this group, send email to satchmo-users+unsubscribe@googlegroups.com.

RJ Ryan

unread,
Apr 3, 2012, 2:10:32 PM4/3/12
to satchm...@googlegroups.com
Hey Buddy,

Nice! Saving the token is desirable for me because I'd like to be able to go back and audit the whole interaction. It's also helpful because if you need help from the Stripe team to debug why a transaction wasn't approved or something then they'll ask for the token. 

One question -- why are you making credit-card choices a Satchmo setting when it's pretty much up to Stripe whether they accept a given card type or not?

If you end up implementing their webhook callback API then be sure to not trust any data you get from them. Because their callbacks don't include a digital signature you can't be sure the data is coming from them. Just take the event ID you get via the webhook and request the event details using the Stripe API. That way you'll be immune to people tampering with your callback handler. Also you need to make sure the callback handler is idempotent because otherwise someone could attack you by sending you the same event multiple times.

RJ

To view this discussion on the web visit https://groups.google.com/d/msg/satchmo-users/-/F59sQkRFv04J.

To post to this group, send email to satchm...@googlegroups.com.
To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.

Buddy Lindsey, Jr.

unread,
Apr 3, 2012, 2:27:35 PM4/3/12
to satchm...@googlegroups.com
RJ Ryan,

Thanks for the reply.

I didn't want to save the token because I was trying to keep the
stripe philosophy of it in mind.

I actually took your code from your branch on bit bucket and modified
it into my project, hope you don't mind. Your implementation was much
more thorough and more well done. The stripe app actually works now.
Just need to figure out how to make it more "app-like" so it can be
installed as a separate app via pypi.

As for the credit-card choices. I didn't add them because I "needed"
them it was more of I added them because it helped things work. I
never touched satchmo before working on this. I started the heavy
lifting of adding this about a week ago and was plowing through a lot
of payment modules in satchmo and all over the web. That was one of
those things at some point in my working on it satchmo "needed". Going
from zero satchmo to a custom payment module, for stripe, was an
interesting experience and I still have a lot to learn about satchmo.

Thanks for the tips on the webhooks. I don't need them right now so I
am going to take a break on implementing stripe app. I'll need them in
a few weeks so I'll get back to them then, unless someone else wants
to give it a go.

Thanks,
Buddy

>>>> satchmo-user...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/satchmo-users?hl=en.
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Satchmo users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/satchmo-users/-/F59sQkRFv04J.
>>
>> To post to this group, send email to satchm...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> satchmo-user...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/satchmo-users?hl=en.
>
>

> --
> You received this message because you are subscribed to the Google Groups
> "Satchmo users" group.

Reply all
Reply to author
Forward
0 new messages