swelham on master
Add CodeTriage badge to swelham… Merge pull request #22 from cod… (compare)
swelham on overhaul
swelham on overhaul
back to the basics removed missed app in mix file added genstage pipeline and 2 more (compare)
swelham on master
added adding missing asserts (compare)
swelham on master
normalise paypal bad request re… (compare)
swelham on master
small syntax improvement (compare)
swelham on master
bump version to 0.4.0 (compare)
swelham on master
fixes #4 - added common error f… (compare)
swelham on master
fixed merge issues (compare)
swelham on design_refactor
swelham on master
started genstage experimenting added passing dummy authorize P… converted dummy gateway and 12 more (compare)
I have just pushed a commit that will split out the errors for an http 400 and return them from the cashier module. If you are on the 0.2.0 release you will need to switch your dep to use the master branch from the git repo and this will initially break any code that expects cashier to return {:ok, result}
. You will need to update the broken code to expect a 3 element tuple {:ok, id, result}
, result in this case is also a tuple that contains the gateway that handled the request and the raw response (e.g. {:paypal, raw_data}
). For some further examples I would suggest taking a look at the either of these test files cashier_test or paypal_test.
Otherwise feel free to give me a shout if you have any issues.
Can provide the code you are using for me to reproduce with?
I am currently testing this with the code in this gist using deps [{:cashier, git: "http://github.com/swelham/cashier.git"}]
which is returning
%{"debug_id" => "fbb3c70ac78e4",
"details" => [%{"field" => "payer.funding_instruments[0].credit_card.cvv2",
"issue" => "Value must be numeric."}],
"information_link" => "https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERR
OR",
"message" => "Invalid request. See details.", "name" => "VALIDATION_ERROR"}