Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

0.5.1

  • Loading branch information...
commit d1c6a3c6b83670acabf9848f461b76a0362a8175 1 parent 14ad24e
Braintree Open Source authored February 01, 2012
4  CHANGELOG.md
Source Rendered
... ...
@@ -1,3 +1,7 @@
  1
+## 0.5.1
  2
+
  3
+* Exposes plan_id on transactions
  4
+
1 5
 ## 0.5.0
2 6
 
3 7
 * Update to be compatible with Node 0.6.6 and replace o3-xml with xml2js (special thanks to [thepatrick](https://github.com/thepatrick))
2  package.json
... ...
@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name"                : "braintree",
3  
-  "version"             : "0.5.0",
  3
+  "version"             : "0.5.1",
4 4
   "description"         : "A library for integrating with Braintree.",
5 5
   "keywords"            : ["payments"],
6 6
   "homepage"            : "http://github.com/braintree/braintree_node",
4  spec/braintree/address_gateway_spec.js
@@ -23,7 +23,7 @@ vows.describe('AddressGateway').addBatch({
23 23
           }
24 24
         );
25 25
       },
26  
-      'is succesful': function (err, response) {
  26
+      'is successful': function (err, response) {
27 27
         assert.isNull(err);
28 28
         assert.equal(response.success, true);
29 29
       },
@@ -193,7 +193,7 @@ vows.describe('AddressGateway').addBatch({
193 193
           }
194 194
         );
195 195
       },
196  
-      'is succesful': function (err, response) {
  196
+      'is successful': function (err, response) {
197 197
         assert.isNull(err);
198 198
         assert.equal(response.success, true);
199 199
       },
8  spec/braintree/credit_card_gateway_spec.js
@@ -23,7 +23,7 @@ vows.describe('CreditCardGateway').addBatch({
23 23
         );
24 24
       },
25 25
       'does not have an error': function (err, response) { assert.isNull(err); },
26  
-      'is succesful': function (err, response) { assert.equal(response.success, true); },
  26
+      'is successful': function (err, response) { assert.equal(response.success, true); },
27 27
       'has credit card attributes': function (err, response) {
28 28
         assert.equal(response.creditCard.maskedNumber, '510510******5100');
29 29
         assert.equal(response.creditCard.expirationDate, '05/2012');
@@ -53,7 +53,7 @@ vows.describe('CreditCardGateway').addBatch({
53 53
           }
54 54
         );
55 55
       },
56  
-      'is succesful': function (err, response) {
  56
+      'is successful': function (err, response) {
57 57
         assert.isNull(err);
58 58
         assert.equal(response.success, true);
59 59
       },
@@ -239,7 +239,7 @@ vows.describe('CreditCardGateway').addBatch({
239 239
         );
240 240
       },
241 241
       'does not have an error': function (err, response) { assert.isNull(err); },
242  
-      'is succesful': function (err, response) { assert.equal(response.success, true); },
  242
+      'is successful': function (err, response) { assert.equal(response.success, true); },
243 243
       'has updated credit card attributes': function (err, response) {
244 244
         assert.equal(response.creditCard.cardholderName, 'New Cardholder Name');
245 245
         assert.equal(response.creditCard.maskedNumber, '411111******1111');
@@ -282,7 +282,7 @@ vows.describe('CreditCardGateway').addBatch({
282 282
           }
283 283
         );
284 284
       },
285  
-      'is succesful': function (err, response) {
  285
+      'is successful': function (err, response) {
286 286
         assert.isNull(err);
287 287
         assert.equal(response.success, true);
288 288
       },
13  spec/braintree/subscription_gateway_spec.js
@@ -30,7 +30,7 @@ vows.describe('SubscriptionGateway').addBatch({
30 30
         );
31 31
       },
32 32
       'does not have an error': function (err, response) { assert.isNull(err); },
33  
-      'is succesful': function (err, response) { assert.equal(response.success, true); },
  33
+      'is successful': function (err, response) { assert.equal(response.success, true); },
34 34
       'cancels the subscription': function (err, result) {
35 35
         assert.equal(result.subscription.status, 'Canceled');
36 36
       }
@@ -103,7 +103,7 @@ vows.describe('SubscriptionGateway').addBatch({
103 103
           }, callback);
104 104
         },
105 105
         'does not have an error': function (err, response) { assert.isNull(err); },
106  
-        'is succesful': function (err, response) { assert.equal(response.success, true); },
  106
+        'is successful': function (err, response) { assert.equal(response.success, true); },
107 107
         'has the expected plan id and amount': function (err, response) {
108 108
           assert.equal(response.subscription.planId, specHelper.plans.trialless.id);
109 109
           assert.equal(response.subscription.price, specHelper.plans.trialless.price);
@@ -111,6 +111,7 @@ vows.describe('SubscriptionGateway').addBatch({
111 111
         'returns transactions': function (err, response) {
112 112
           assert.match(response.subscription.transactions[0].id, /^\w{6,7}$/);
113 113
           assert.equal(response.subscription.transactions[0].creditCard.maskedNumber, '510510******5100');
  114
+          assert.equal(response.subscription.transactions[0].planId, specHelper.plans.trialless.id);
114 115
         }
115 116
       },
116 117
 
@@ -126,7 +127,7 @@ vows.describe('SubscriptionGateway').addBatch({
126 127
             firstBillingDate: firstBillingDate
127 128
           }, callback);
128 129
         },
129  
-        'is succesful': function (err, response) {
  130
+        'is successful': function (err, response) {
130 131
           assert.isNull(err);
131 132
           assert.equal(response.success, true);
132 133
         },
@@ -149,7 +150,7 @@ vows.describe('SubscriptionGateway').addBatch({
149 150
             price: '2000.00'
150 151
           }, callback);
151 152
         },
152  
-        'is not succesful': function (err, result) {
  153
+        'is not successful': function (err, result) {
153 154
           assert.isNull(err);
154 155
           assert.equal(result.success, false);
155 156
         },
@@ -404,7 +405,7 @@ vows.describe('SubscriptionGateway').addBatch({
404 405
           }
405 406
         );
406 407
       },
407  
-      'is succesful': function (err, response) {
  408
+      'is successful': function (err, response) {
408 409
         assert.isNull(err);
409 410
         assert.equal(response.success, true);
410 411
       },
@@ -441,7 +442,7 @@ vows.describe('SubscriptionGateway').addBatch({
441 442
           }
442 443
         );
443 444
       },
444  
-      'is not succesful': function (err, response) {
  445
+      'is not successful': function (err, response) {
445 446
         assert.isNull(err);
446 447
         assert.equal(response.success, false);
447 448
       },
30  spec/braintree/transaction_gateway_spec.js
@@ -37,7 +37,7 @@ vows.describe('TransactionGateway').addBatch({
37 37
         }, this.callback);
38 38
       },
39 39
       'does not have an error': function (err, response) { assert.isNull(err); },
40  
-      'is succesful': function (err, response) { assert.equal(response.success, true); },
  40
+      'is successful': function (err, response) { assert.equal(response.success, true); },
41 41
       'is a credit': function (err, response) { assert.equal(response.transaction.type, 'credit'); },
42 42
       'is for 5.00': function (err, response) { assert.equal(response.transaction.amount, '5.00'); },
43 43
       'has a masked number of 510510******5100': function (err, response) {
@@ -96,7 +96,7 @@ vows.describe('TransactionGateway').addBatch({
96 96
         }, this.callback);
97 97
       },
98 98
       'does not have an error': function (err, response) { assert.isNull(err); },
99  
-      'is succesful': function (err, response) { assert.equal(response.success, true); },
  99
+      'is successful': function (err, response) { assert.equal(response.success, true); },
100 100
       'is a sale': function (err, response) { assert.equal(response.transaction.type, 'sale'); },
101 101
       'is for 5.00': function (err, response) { assert.equal(response.transaction.amount, '5.00'); },
102 102
       'has a masked number of 510510******5100': function (err, response) {
@@ -126,7 +126,7 @@ vows.describe('TransactionGateway').addBatch({
126 126
         );
127 127
       },
128 128
       'does not have an error': function (err, response) { assert.isNull(err); },
129  
-      'is succesful': function (err, response) { assert.equal(response.success, true); },
  129
+      'is successful': function (err, response) { assert.equal(response.success, true); },
130 130
       'is a sale': function (err, response) { assert.equal(response.transaction.type, 'sale'); },
131 131
       'snapshots customer details': function (err, response) {
132 132
         assert.equal(response.transaction.customer.firstName, 'Adam');
@@ -161,7 +161,7 @@ vows.describe('TransactionGateway').addBatch({
161 161
         );
162 162
       },
163 163
       'does not have an error': function (err, response) { assert.isNull(err); },
164  
-      'is succesful': function (err, response) { assert.equal(response.success, true); },
  164
+      'is successful': function (err, response) { assert.equal(response.success, true); },
165 165
       'is a sale': function (err, response) { assert.equal(response.transaction.type, 'sale'); },
166 166
       'snapshots customer details': function (err, response) {
167 167
         assert.equal(response.transaction.customer.firstName, 'Adam');
@@ -187,7 +187,7 @@ vows.describe('TransactionGateway').addBatch({
187 187
           }
188 188
         }, this.callback);
189 189
       },
190  
-      'is succesful': function (err, response) {
  190
+      'is successful': function (err, response) {
191 191
         assert.isNull(err);
192 192
         assert.equal(response.success, true);
193 193
       },
@@ -209,7 +209,7 @@ vows.describe('TransactionGateway').addBatch({
209 209
           }
210 210
         }, this.callback);
211 211
       },
212  
-      'is succesful': function (err, response) {
  212
+      'is successful': function (err, response) {
213 213
         assert.isNull(err);
214 214
         assert.equal(response.success, true);
215 215
       },
@@ -233,7 +233,7 @@ vows.describe('TransactionGateway').addBatch({
233 233
         }, this.callback);
234 234
       },
235 235
       'does not have an error': function (err, response) { assert.isNull(err); },
236  
-      'is succesful': function (err, response) { assert.equal(response.success, true); },
  236
+      'is successful': function (err, response) { assert.equal(response.success, true); },
237 237
       'has custom fields in response': function (err, response) {
238 238
         assert.equal(response.transaction.customFields.storeMe, 'custom value');
239 239
       }
@@ -346,7 +346,7 @@ vows.describe('TransactionGateway').addBatch({
346 346
           specHelper.defaultGateway.transaction.refund(transaction.id, callback);
347 347
         });
348 348
       },
349  
-      'is succesful': function (err, response) {
  349
+      'is successful': function (err, response) {
350 350
         assert.isNull(err);
351 351
         assert.equal(response.success, true);
352 352
       },
@@ -363,7 +363,7 @@ vows.describe('TransactionGateway').addBatch({
363 363
           specHelper.defaultGateway.transaction.refund(transaction.id, '1.00', callback);
364 364
         });
365 365
       },
366  
-      'is succesful': function (err, response) {
  366
+      'is successful': function (err, response) {
367 367
         assert.isNull(err);
368 368
         assert.equal(response.success, true);
369 369
       },
@@ -394,7 +394,7 @@ vows.describe('TransactionGateway').addBatch({
394 394
         )
395 395
       },
396 396
       'does not have an error': function (err, response) { assert.isNull(err); },
397  
-      'is not succesful': function (err, response) { assert.equal(response.success, false); },
  397
+      'is not successful': function (err, response) { assert.equal(response.success, false); },
398 398
       'has error 91507 on base': function (err, response) {
399 399
         assert.equal(response.errors.for('transaction').on('base')[0].code, '91506');
400 400
       }
@@ -418,7 +418,7 @@ vows.describe('TransactionGateway').addBatch({
418 418
           }
419 419
         )
420 420
       },
421  
-      'is succesful': function (err, response) {
  421
+      'is successful': function (err, response) {
422 422
         assert.isNull(err);
423 423
         assert.equal(response.success, true);
424 424
       },
@@ -446,7 +446,7 @@ vows.describe('TransactionGateway').addBatch({
446 446
           }
447 447
         )
448 448
       },
449  
-      'is succesful': function (err, response) {
  449
+      'is successful': function (err, response) {
450 450
         assert.isNull(err);
451 451
         assert.equal(response.success, true);
452 452
       },
@@ -478,7 +478,7 @@ vows.describe('TransactionGateway').addBatch({
478 478
         )
479 479
       },
480 480
       'does not have an error': function (err, response) { assert.isNull(err); },
481  
-      'is not succesful': function (err, response) { assert.equal(response.success, false); },
  481
+      'is not successful': function (err, response) { assert.equal(response.success, false); },
482 482
       'has error 91507 on base': function (err, response) {
483 483
         assert.equal(response.errors.for('transaction').on('base')[0].code, '91507');
484 484
       }
@@ -503,7 +503,7 @@ vows.describe('TransactionGateway').addBatch({
503 503
         )
504 504
       },
505 505
       'does not have an error': function (err, response) { assert.isNull(err); },
506  
-      'is succesful': function (err, response) { assert.equal(response.success, true); },
  506
+      'is successful': function (err, response) { assert.equal(response.success, true); },
507 507
       'sets the status to voided': function (err, response) { assert.equal(response.transaction.status, 'voided'); },
508 508
     },
509 509
 
@@ -526,7 +526,7 @@ vows.describe('TransactionGateway').addBatch({
526 526
         )
527 527
       },
528 528
       'does not have an error': function (err, response) { assert.isNull(err); },
529  
-      'is not succesful': function (err, response) { assert.equal(response.success, false); },
  529
+      'is not successful': function (err, response) { assert.equal(response.success, false); },
530 530
       'has error 91504 on base': function (err, response) {
531 531
         assert.equal(response.errors.for('transaction').on('base')[0].code, '91504');
532 532
       }

0 notes on commit d1c6a3c

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