O'Reilly logo

Take My Money by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting Up Client-Side Stripe

First off, we need to set things up. We need to add the Stripe.js library to our application. Many JavaScript libraries commonly used with Rails have been bundled into Ruby gems so that they can be added to the manifest file of the Rails asset pipeline. Stripe.js is not most JavaScript libraries. In particular, it is important for PCI compliance purposes that you retrieve the Stripe JavaScript file directly from Stripe and not from your own server or a content-delivery system. The most common practice is to directly include the library directly in the HTML header of your layout template, like so:

 = stylesheet_link_tag(​"application"​,
 media: ​​"all"​, ​ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required