lyang / braintree-rails

MIT License
65 stars 22 forks source link

Rails not parsing braintree.js-encrypted params correctly? #13

Closed mbhnyc closed 11 years ago

mbhnyc commented 11 years ago

Hey guys so, using braintree-rails in the back-end, i'm connecting to it from a javascript-backbone built end-user site.

I encrypt using braintree.js as recommended, which appears to work just fine — but when the controller receives the POST request, the parameters aren't split/parsed correctly.. so I'm forced to do ugly stuff like:

my_params = CGI.parse(params[:transaction])

and

my_params["amount"].first

Am I missing something fundamental here?

mbhnyc commented 11 years ago

Fixed. Namespacing jquery's serialize() manually = bad idea. :)

lyang commented 11 years ago

Glad you solved it :+1: