Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updated readme

  • Loading branch information...
commit 06e5ce3524dd867f9024291cacaa6c6cdf633d18 1 parent 60e3cfa
Emery Denuccio em authored

Showing 1 changed file with 15 additions and 10 deletions. Show diff stats Hide diff stats

  1. +15 10 README.md
25 README.md
Source Rendered
@@ -2,8 +2,11 @@
2 2
3 3 Recurly.js makes it easy to provide the user experience available on our hosted payment pages, on your site, with complete control over the look and feel, outside of PCI scope.
4 4
  5 +*Currently depends on jQuery version 1.5.2 or higher.*
  6 +
5 7 # Why you should use it
6   -Don't reinvent the wheel. The fundamentals of paying for subscriptions doesn't change across implementations, there's got to be one approach that gets it right for everyone. We aim to be that solution. The one thing that does change, however, is design: your website has its own look, and we want you to keep it. This is why we created Recurly.js to handle all of the hard work, leaving you with the sole task of styling to fit your design. And with the help of stylus, that couldn't be easier.
  8 +Don't reinvent the wheel. The fundamentals of paying for subscriptions doesn't change across implementations, there's got to be one approach that gets it right for everyone. We aim to be that solution. The one thing that does change, however, is design: your website has its own look, and we want you to keep it. This is why we created Recurly.js to handle all of the hard work, leaving you with the sole task of styling to fit your design. And with the help of [stylus](/LearnBoost/stylus), that couldn't be easier.
  9 +
7 10
8 11 # How it works
9 12
@@ -22,7 +25,8 @@ Recurly.js comes with:
22 25 # Getting Started
23 26
24 27 Accepting subscriptions is as simple as dropping in this js:
25   -<pre>
  28 +
  29 +```javascript
26 30 Recurly.config({
27 31 subdomain: 'mycompany',
28 32 environment: 'sandbox' // or 'production'
@@ -33,10 +37,10 @@ Recurly.buildSubscribeForm({
33 37 plan: 'myplancode' // A plan you have created in recurly-app
34 38 successURL: '/success?account_code={account_code}' // Redirect on success URL
35 39 });
36   -</pre>
  40 +```
37 41
38 42 ## Additional Options
39   -<pre>
  43 +```javascript
40 44 Recurly.config({
41 45 subdomain: 'mycompany',
42 46 environment: 'sandbox', // or 'production'
@@ -53,22 +57,22 @@ Recurly.buildSubscribeForm({
53 57 enableAddOns: true | false,
54 58 enableCoupons: true | false
55 59 });
56   -</pre>
  60 +```
57 61
58 62 ## Customizing the style
59   -A stock stylesheet is provided that is coded in stylus, a wonderful language that compiles to CSS.
  63 +A stock stylesheet is provided that is coded in [stylus](/LearnBoost/stylus), a wonderful language that compiles to CSS.
60 64
61 65 The first thing you'll want to do is take a look at the variables defined at the top. You'll notice that the default stylesheets is all centered around defined grid system dimensions, making customization a breeze.
62 66
63 67 # Responding to subscription creates
64 68 Once the user subscribes through the recurly.js form on your site, you have to act accordingly with your respective business logic. (giving your users what it is they just paid for)
65 69
66   -The easiest way to do this is by simply passing a <pre>successURL</pre> option to buildSubscribeForm.
67   -When the user's credit card is processed successfully, recurly.js will redirect to successURL replacing {account_code} with the newly created account.
  70 +The easiest way to do this is by simply passing a <code>successURL</code> option to buildSubscribeForm.
  71 +When the user's credit card is processed successfully, recurly.js will redirect to successURL replacing <code>{account_code}</code> with the newly created account.
68 72
69 73 All you have to do is have your server read the GET variable, pull down the account from Recurly with one of our client libraries, and act accordingly giving them what they paid for.
70 74
71   -Alternatively, you can pass in an option to buildSubscribeForm, 'afterSubscribe', to handle subscription creates.
  75 +Alternatively, you can pass in an option to buildSubscribeForm, <code>afterSubscribe</code>, to handle subscription creates.
72 76
73 77 # Caveats
74 78 You will still need to use one of our existing server-side client libraries to pull down the account after it's been created, and act accordingly. But that's the easy part. The hard part in the past has been building out subscription UX and mediating errors.
@@ -78,5 +82,6 @@ It currently depends on jQuery 1.5.2+. Not a problem if you already use it. A fu
78 82 # Soon To Come
79 83
80 84 * Multi-currency
81   -* Localization
  85 +* Localization (english only right now)
82 86 * Account Management (update billing info, upgrade/downgrade, cancellation)
  87 +* One time transactions

0 comments on commit 06e5ce3

Please sign in to comment.
Something went wrong with that request. Please try again.