Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated readme

  • Loading branch information...
commit 06e5ce3524dd867f9024291cacaa6c6cdf633d18 1 parent 60e3cfa
@em em authored
Showing with 15 additions and 10 deletions.
  1. +15 −10 README.md
View
25 README.md
@@ -2,8 +2,11 @@
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.
+*Currently depends on jQuery version 1.5.2 or higher.*
+
# Why you should use it
-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.
+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.
+
# How it works
@@ -22,7 +25,8 @@ Recurly.js comes with:
# Getting Started
Accepting subscriptions is as simple as dropping in this js:
-<pre>
+
+```javascript
Recurly.config({
subdomain: 'mycompany',
environment: 'sandbox' // or 'production'
@@ -33,10 +37,10 @@ Recurly.buildSubscribeForm({
plan: 'myplancode' // A plan you have created in recurly-app
successURL: '/success?account_code={account_code}' // Redirect on success URL
});
-</pre>
+```
## Additional Options
-<pre>
+```javascript
Recurly.config({
subdomain: 'mycompany',
environment: 'sandbox', // or 'production'
@@ -53,22 +57,22 @@ Recurly.buildSubscribeForm({
enableAddOns: true | false,
enableCoupons: true | false
});
-</pre>
+```
## Customizing the style
-A stock stylesheet is provided that is coded in stylus, a wonderful language that compiles to CSS.
+A stock stylesheet is provided that is coded in [stylus](/LearnBoost/stylus), a wonderful language that compiles to CSS.
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.
# Responding to subscription creates
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)
-The easiest way to do this is by simply passing a <pre>successURL</pre> option to buildSubscribeForm.
-When the user's credit card is processed successfully, recurly.js will redirect to successURL replacing {account_code} with the newly created account.
+The easiest way to do this is by simply passing a <code>successURL</code> option to buildSubscribeForm.
+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.
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.
-Alternatively, you can pass in an option to buildSubscribeForm, 'afterSubscribe', to handle subscription creates.
+Alternatively, you can pass in an option to buildSubscribeForm, <code>afterSubscribe</code>, to handle subscription creates.
# Caveats
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
# Soon To Come
* Multi-currency
-* Localization
+* Localization (english only right now)
* Account Management (update billing info, upgrade/downgrade, cancellation)
+* One time transactions
Please sign in to comment.
Something went wrong with that request. Please try again.