http://jsbin.com/alesuk/16/edit
https://stripe.com/blog/stripe-checkout
or the model/controller code in the article? Maybe I've missed the point.