[HCoop-Discuss] Improved Portal Payment Page Preview (Including Stripe!)

Clinton Ebadi clinton at unknownlamer.org
Sat Mar 22 04:06:16 EDT 2014


Greetings,

Check out the experimental https://members3.hcoop.net/portal/portal
(usual hcoop username/password). Discuss! (Warning: The data there is
NOT syncronized with the main portal).

I've added Stripe support (currently in test mode, you
can/are-encouraged-to try out the payment experience using one of the
cards listed at https://stripe.com/docs/testing#cards and any fake
address). I also improved the Paypal experience a bit.

For Paypal, you can now actually enter the amount you want to add to
your balance on the portal page. This has actually *always* been
possible, and trivial :(

My goal is to merge the portal3 branch into a temporary branch and get
it running on deleuze Sunday or Tuesday.

I had to add some javascript to the page for Stripe, so I also added a
Google Checkout-esque drop down that automagically sets the free-form
field for both. The amounts right now do not correspond to dues really,
I'm open to suggestions for the list to use. A barebones javascript fees
calculator would be easy to add too, except for Paypal charging slightly
different fees depending on the origin country.

Stripe payments are partially automated -- it was *much* faster to
implement the card charging logic in a Python CGI, and creating
transactions/charges in the portal is a bit hairy so I created a payment
log to coordinate the CGI and portal. The treasurer then simply has to
hit one button on the portal to apply the charge, instead of juggling
between the Paypal log and finding member emails and ...

For now, I think the two step process will suffice and be faster than
Paypal -- I'm paranoid about bugs, and I designed the tables to make it
easy to match records up with Stripe in case something goes awry.

It's a /bit/ more work to get the Python CGI to POST back to the portal
using some kind of secure token to apply the charge. Once I'm confident
there are no bugs that could cause payments to be
lost/duplicated/etc. I'll add that part, freeing us from human
intervention for payments (at least from Stripe).

With Stripe, an exciting new option opens up for us as well: we can
accept payments from joining members before we confirm their
applications. With Stripe, you can authorize a charge without capturing
the amount, and up to seven days later claim it. If we do nothing... the
charge is automatically refunded.

My only concern would be weaking our identity verification. I don't
think we would be -- we don't require new members to have verified
Paypal accounts, and Stripe does Name/Address validation for the card
used.

I am going to add the code for accepting an optional Stripe payment
after the potential member confirms their email, and beat the portal new
member code into applying it. If we end up not using it... a bit of SML
practice never hurt me.

A detailed changelog is at
http://git.hcoop.net/?p=hcoop/portal.git;a=shortlog;h=refs/heads/portal3

*Eventually* I want to use Paypal's newish REST stuff to automate those
payments too. Unfortunately, their interface is pretty obnoxious to
use... I'll revisit it in a few months, and hopefully the support
libraries have gotten better. Unless I'm blind to some easy to use
library lying around on the net -- if anyone knows of one, tell me!

-- 
                         Ruled by the ebb of my oceans                         
                        Slaves to the dusk and the dawn                        
                         Your petri dish civilisations                        
                             Are buried and born                              
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
Url : http://lists.hcoop.net/pipermail/hcoop-discuss/attachments/20140322/fb7e78a6/attachment.pgp 


More information about the HCoop-Discuss mailing list