You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have a minimal test case for this yet, but I wanted to get some notes down on the behavior I'm seeing.
Given I have turned on verification:
FakeBraintree.verify_all_cards!
When I submit a TR request with an "invalid" credit card number ("1234123412341234"), I get back an error result with a string where the params hash should be:
Weirdly, result.inspect suggests params is a hash, but result.params is a string. I'd expect it to be a hash of the user-submitted params, which I can use to repopulate the form.
(I don't know why it's saying the rejection is due to "cvv"; AFAIK it's only the card number that's invalid.)
I looked at the situation from within FakeBraintree::Customer#failure_response:
I don't know if that's how an empty hash should be encoded to XML (it doesn't seem to be decoded properly, by whatever's decoding it), but I don't think the params hash should be empty in the first place.
I'm using Ruby 1.9.3, Rails 3.2.12, Braintree 2.22.0, Fake Braintree 0.2.1, and obviously a bunch of other gems. I'd appreciate any informed suggestions about where the trouble might be, or how to figure that out.
The text was updated successfully, but these errors were encountered:
... Actually, looking a little deeper, it's obvious why params is empty: FakeBraintree.failure_response hard-codes the empty params (and the "cvv"). I would like to change this so I can write an integration test for verification errors, but I'm not sure how to go about it.
+1 for this. Just ran into it. I'm using the BraintreeFormBuilder and it expects those params to be available in the result object so that it can re-populate fields following an error.
I don't have a minimal test case for this yet, but I wanted to get some notes down on the behavior I'm seeing.
Given I have turned on verification:
When I submit a TR request with an "invalid" credit card number ("1234123412341234"), I get back an error result with a string where the
params
hash should be:Weirdly,
result.inspect
suggestsparams
is a hash, butresult.params
is a string. I'd expect it to be a hash of the user-submitted params, which I can use to repopulate the form.(I don't know why it's saying the rejection is due to "cvv"; AFAIK it's only the card number that's invalid.)
I looked at the situation from within FakeBraintree::Customer#failure_response:
I don't know if that's how an empty hash should be encoded to XML (it doesn't seem to be decoded properly, by whatever's decoding it), but I don't think the
params
hash should be empty in the first place.I'm using Ruby 1.9.3, Rails 3.2.12, Braintree 2.22.0, Fake Braintree 0.2.1, and obviously a bunch of other gems. I'd appreciate any informed suggestions about where the trouble might be, or how to figure that out.
The text was updated successfully, but these errors were encountered: