Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.

Commit 1b84b0c

Browse files
committed
1.1.2
1 parent 0e54c37 commit 1b84b0c

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.1.2
2+
* Compatibility with Node 0.8.x
3+
14
## 1.1.1
25
* Fix dateFormat bug with months after October in CreditCardGateway
36
* Fix TransparentRedirecteGateway url method to return full url (thanks to [sberryman](https://github.com/sberryman))

lib/braintree.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ connect = (config) ->
77
new BraintreeGateway(new Config(config))
88

99
exports.connect = connect
10-
exports.version = '1.1.1'
10+
exports.version = '1.1.2'
1111
exports.Environment = Environment
1212
exports.errorTypes = errorTypes

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name" : "braintree",
3-
"version" : "1.1.1",
3+
"version" : "1.1.2",
44
"description" : "A library for integrating with Braintree.",
55
"keywords" : ["payments"],
66
"homepage" : "http://github.com/braintree/braintree_node",
77
"author" : "Braintree <[email protected]> (http://www.braintreepayments.com)",
88
"main" : "./lib/braintree.js",
99
"repository" : { "type": "git", "url" : "https://github.com/braintree/braintree_node.git" },
1010
"dependencies" : {},
11-
"engines" : { "node": "~0.6.6" },
11+
"engines" : { "node": ">=0.6.6" },
1212
"bundledDependencies" : [ "dateformat" ],
1313
"dependencies" : {
1414
"coffee-script" : "=1.1.3",

spec/spec_helper.coffee

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ settleTransaction = (transactionId, callback) ->
5454
)
5555

5656
simulateTrFormPost = (url, trData, inputFormData, callback) ->
57-
client = http.createClient(
58-
specHelper.defaultGateway.config.environment.port,
59-
specHelper.defaultGateway.config.environment.server,
60-
specHelper.defaultGateway.config.environment.ssl
61-
)
6257
headers = {
6358
'Content-Type': 'application/x-www-form-urlencoded',
6459
'Host': 'localhost'
@@ -67,13 +62,27 @@ simulateTrFormPost = (url, trData, inputFormData, callback) ->
6762
formData.tr_data = trData
6863
requestBody = querystring.stringify(formData)
6964
headers['Content-Length'] = requestBody.length.toString()
70-
request = client.request('POST', url, headers)
71-
request.write(requestBody)
72-
request.end()
65+
66+
options = {
67+
port: specHelper.defaultGateway.config.environment.port
68+
host: specHelper.defaultGateway.config.environment.server
69+
method: 'POST'
70+
headers: headers
71+
path: url
72+
}
73+
74+
if specHelper.defaultGateway.config.environment.ssl
75+
request = https.request(options, ->)
76+
else
77+
request = http.request(options, ->)
78+
7379
request.on('response', (response) ->
7480
callback(null, response.headers.location.split('?', 2)[1])
7581
)
7682

83+
request.write(requestBody)
84+
request.end()
85+
7786
dateToMdy = (date) ->
7887
year = date.getFullYear().toString()
7988
month = (date.getMonth() + 1).toString()

0 commit comments

Comments
 (0)