lyang / braintree-rails

MIT License
65 stars 22 forks source link

Braintree::UnexpectedError (expected a gzipped response): #27

Closed curbsaleem closed 9 years ago

curbsaleem commented 9 years ago

Hi i am getting 'Braintree::UnexpectedError (expected a gzipped response)' while using following code Braintree::Transaction.sale(amount: amt, merchant_account_id: ENV[merchant_id], custom_fields: {user_id: user_id }, :credit_card => { :number => credit_card["number"], :expiration_month => credit_card["expiration_month"], :expiration_year => credit_card["expiration_year"], :cardholder_name => credit_card["cardholder_name"], :cvv => credit_card["cvv"] }, :billing => { :country_code_alpha2 => "US" } ) Any idea how i can fix it?

curbsaleem commented 9 years ago

logs:

D, [2015-07-27T16:43:26.778537 #19617] DEBUG -- : [Braintree] [27/Jul/2015 11:13:26 UTC] POST /transactions D, [2015-07-27T16:43:26.778982 #19617] DEBUG -- : [Braintree] <?xml version="1.0" encoding="UTF-8"?> [Braintree] [Braintree] 2.98 [Braintree] f5zrp23rsjmmw6dg [Braintree] [Braintree] 555f176f69702d4812040000 [Braintree] [Braintree] [Braintree] 424242***_4242 [Braintree] 11 [Braintree] 2015 [Braintree] 4242424242424242 [Braintree] _ [Braintree] [Braintree] [Braintree] US [Braintree] [Braintree] sale [Braintree]

I, [2015-07-27T16:43:27.119495 #19617] INFO -- : [Braintree] [27/Jul/2015 11:13:27 UTC] POST /transactions 503 D, [2015-07-27T16:43:27.119849 #19617] DEBUG -- : [Braintree] [27/Jul/2015 11:13:27 UTC] 503 Service Unavailable

lyang commented 9 years ago

Hi @curbsaleem, This seems like a server issue from the last two log lines:

[2015-07-27T16:43:27.119495 #19617] INFO -- : [Braintree] [27/Jul/2015 11:13:27 UTC] POST /transactions 503
[2015-07-27T16:43:27.119849 #19617] DEBUG -- : [Braintree] [27/Jul/2015 11:13:27 UTC] 503 Service Unavailable

Also matches Braintree's sandbox status page event. Should be fixed now.