Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

error message customization added to README

  • Loading branch information...
commit b7a2890868d13b2c0e014f968b6a0adc0a7fbe92 1 parent 32ff3a8
@em em authored
Showing with 25 additions and 8 deletions.
  1. +24 −5 README.md
  2. +1 −3 recurly.js
View
29 README.md
@@ -42,11 +42,30 @@ Recurly.buildSubscribeForm({
## Additional Options
```javascript
Recurly.config({
- subdomain: 'mycompany',
- environment: 'sandbox', // or 'production'
- currency: 'USD', // GBP | CAD | EUR, etc...
- VATPercentage: 10, // European Value Added Tax
- country: 'GB', // Seller country, needed for VAT to work
+ subdomain: 'mycompany'
+ , environment: 'sandbox' // or 'production'
+ , currency: 'USD' // GBP | CAD | EUR, etc...
+ , VATPercentage: 10 // European Value Added Tax
+ , country: 'GB' // Seller country, needed for VAT to work
+ , locale: {
+ // Currency formatting rules
+ currency: {
+ format: "%u%n" // Unit symbol and Number
+ , separator: "."
+ , delimiter: ","
+ , precision: 2
+ }
+ // Error messages
+ , errors: {
+ emptyField: 'Butt something?'
+ , missingFullAddress: 'Please enter your full address.'
+ , invalidEmail: 'This doesn\'t look right.'
+ , invalidCC: 'This doesn\'t look right.'
+ , invalidCVV: 'This doesn\'t look right.'
+ , invalidCoupon: 'Coupon not found'
+ , cardDeclined: 'Sorry, your card was declined.'
+ }
+ }
});
Recurly.buildSubscribeForm({
View
4 recurly.js
@@ -95,7 +95,7 @@ function pluralize(count, term) {
}
R.config = function(settings) {
- $.extend(R.settings, settings);
+ $.extend(true, R.settings, settings);
if(!settings.baseURL) {
@@ -222,7 +222,6 @@ R.locale.errors = {
, invalidCVV: 'This doesn\'t look right.'
, invalidCoupon: 'Coupon not found'
, cardDeclined: 'Sorry, your card was declined.'
-
};
R.locale.currencies = {};
@@ -1280,7 +1279,6 @@ R.buildSubscribeForm = function(options) {
$coupon.removeClass('checking');
subscription.coupon = coupon;
- console.log(subscription.coupon);
$coupon.removeClass('invalid').addClass('valid');
$coupon.find('.description').text(coupon.description);
Please sign in to comment.
Something went wrong with that request. Please try again.