Skip to content

Commit

Permalink
Removing non-functional parameters from one time transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
JesterMan committed Mar 5, 2012
1 parent 5037aa8 commit 6a12f1b
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 34 deletions.
8 changes: 2 additions & 6 deletions build/recurly.js
@@ -1,4 +1,4 @@
// Recurly.js - v2.0.5
// Recurly.js - v2.0.6
//
// Communicates with Recurly <https://recurly.com> via a JSONP API,
// generates UI, handles user error, and passes control to the client
Expand Down Expand Up @@ -50,7 +50,7 @@ R.settings = {
, oneErrorPerField: true
};

R.version = '2.0.5';
R.version = '2.0.6';

R.dom = {};

Expand Down Expand Up @@ -1008,8 +1008,6 @@ R.Transaction = {
return {
currency: this.currency
, amount_in_cents: this.cost.cents()
, description: this.description
, accounting_code: this.accountingCode
};
}
, create: createObject
Expand Down Expand Up @@ -1709,8 +1707,6 @@ R.buildTransactionForm = function(options) {
transaction.account = account;
transaction.billingInfo = billingInfo;
transaction.currency = options.currency;
transaction.description = options.description;
transaction.accountingCode = options.accountingCode;
transaction.cost = new R.Cost(options.amountInCents);

var $form = $(R.dom.one_time_transaction_form);
Expand Down
2 changes: 1 addition & 1 deletion build/recurly.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions changelog.md
@@ -1,5 +1,10 @@
#Recurly.js CHANGELOG

##Version 2.0.6 (March 5, 2012)

- Removed non-functional parameters from one time transactions.
- Updated example HTML files.

##Version 2.0.5 (March 1, 2012)

- Fixed issue where an empty plan quantity would cause totals to display as 0.
Expand Down
11 changes: 3 additions & 8 deletions examples/one_time_transaction.html
Expand Up @@ -3,7 +3,6 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>RecurlyJS One-time Transaction Example</title>
<!-- <link rel="stylesheet" href="../style/reset.css" type="text/css" /> -->
<link rel="stylesheet" href="examples.css" type="text/css" />
<link rel="stylesheet" href="../themes/default/recurly.css" type="text/css" />
<script src="../lib/jquery-1.7.1.js"></script>
Expand All @@ -13,19 +12,15 @@
subdomain: 'recurlyjsdemo-test'
, currency: 'USD'
, country: 'US'
/* , baseURL: 'http://api.lvh.me:3000/jsonp/emeryco/' */

, baseURL: 'http://api.dev.recurly.com/jsonp/emery-test/'
});

Recurly.buildTransactionForm({
target: '#recurly-transaction'
, amountInCents: 5000
// Signature must be generated server-side with a utility method provided in client libraries.
, signature: '9c466fc7d09c773fa0d284cb275e0808c19518b5-1325286991'
, successURL: 'confirmation.html'
, description: 'hello'
, amountInCents: 5000
, accountCode: 123
, signature: '9c466fc7d09c773fa0d284cb275e0808c19518b5-1325286991+account.first_name+transaction.description'

, account: {
firstName: 'Joe'
, lastName: 'User'
Expand Down
8 changes: 4 additions & 4 deletions examples/subscribe.html
Expand Up @@ -3,7 +3,6 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>RecurlyJS Subscribe Example</title>
<!-- <link rel="stylesheet" href="../style/reset.css" type="text/css" /> -->
<link rel="stylesheet" href="examples.css" type="text/css" />
<link rel="stylesheet" href="../themes/default/recurly.css" type="text/css" />
<script src="../lib/jquery-1.7.1.js"></script>
Expand All @@ -17,9 +16,11 @@

Recurly.buildSubscriptionForm({
target: '#recurly-subscribe'
// Signature must be generated server-side with a utility method provided in client libraries.
, signature: 'bc3027a216e3fa51382c3cbdbb24bf7eb7b4bc69-0'
, successURL: 'confirmation.html'
, planCode: 'simpleplan'
, accountCode: 'test'
, successURL: 'confirmation.html'
, distinguishContactFromBillingInfo: true
, collectCompany: true
, termsOfServiceURL: 'http://example.com/tos'
Expand All @@ -42,13 +43,12 @@
, cardNumber: '4111-1111-1111-1111'
, CVV: '123'
}
, signature: 'bc3027a216e3fa51382c3cbdbb24bf7eb7b4bc69-0'
});
</script>
</head>
<body>
<h1>Subscribe to Plan</h1>
<h2>Plan Code: simpleplan (exists)</h2>
<h2>Plan Code: simpleplan</h2>
<div id="recurly-subscribe">
</div>
</body>
Expand Down
14 changes: 4 additions & 10 deletions examples/update_billing_info.html
Expand Up @@ -3,7 +3,6 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>RecurlyJS Update Billing Info Example</title>
<!-- <link rel="stylesheet" href="../style/reset.css" type="text/css" /> -->
<link rel="stylesheet" href="examples.css" type="text/css" />
<link rel="stylesheet" href="../themes/default/recurly.css" type="text/css" />
<script src="../lib/jquery-1.7.1.js"></script>
Expand All @@ -19,23 +18,18 @@

Recurly.buildBillingInfoUpdateForm({
target: '#recurly-update-billing-info'
// Signature must be generated server-side with a utility method provided in client libraries.
, signature: '6b2d4700d38cf90d121268c400a6874e38dea8fc-0'
, successURL: 'confirmation.html'
, accountCode: 'testaccount'
, distinguishContactFromBillingInfo: false
, successURL: 'confirmation.html'
, signature: '6b2d4700d38cf90d121268c400a6874e38dea8fc-0'
// Signature must be generated server-side with a utility method provided in client libraries.
// e.g. Recurly::billing_info_signature(accountcode)
// It guarantees that you grant the end-user the right to update billing info for this account
// Without it the request will be rejected.
//
// The example signature only works for recurlyjsdemo-test
});
</script>

</head>
<body>
<h1>Update Billing Info</h1>
<h2>Account Code: testaccount (exists)</h2>
<h2>Account Code: testaccount</h2>
<div id="recurly-update-billing-info">
</div>
</body>
Expand Down
2 changes: 0 additions & 2 deletions src/js/transaction.js
Expand Up @@ -4,8 +4,6 @@ R.Transaction = {
return {
currency: this.currency
, amount_in_cents: this.cost.cents()
, description: this.description
, accounting_code: this.accountingCode
};
}
, create: createObject
Expand Down
2 changes: 0 additions & 2 deletions src/js/ui.js
Expand Up @@ -655,8 +655,6 @@ R.buildTransactionForm = function(options) {
transaction.account = account;
transaction.billingInfo = billingInfo;
transaction.currency = options.currency;
transaction.description = options.description;
transaction.accountingCode = options.accountingCode;
transaction.cost = new R.Cost(options.amountInCents);

var $form = $(R.dom.one_time_transaction_form);
Expand Down
2 changes: 1 addition & 1 deletion version
@@ -1 +1 @@
2.0.5
2.0.6

0 comments on commit 6a12f1b

Please sign in to comment.