Closed (fixed)
Project:
Stripe
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
19 Jan 2012 at 06:01 UTC
Updated:
19 Mar 2013 at 05:20 UTC
Jump to comment: Most recent file
Git er done. It's begging you.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | test_exception_handling-1409936-4.patch | 1.31 KB | mmilano |
Comments
Comment #1
vordude commentedCommit 50899c2 is the first peak of actually having something useful with this module. The test form is functional if you:
1) add the contents of the stripe php library to /sites/all/libraries
2) add your test api keys
3) fill out the form with the test card data and amount.
4) click submit.
Comment #2
vordude commentedComment #3
jlyon commentedWorks as expected for me!
Comment #4
mmilano commentedI implemented the error handling on the test form in the attached patch.
- Moved the charge into the validation hook
- Wrapped the charge in a try/catch
- Set form error when the exception is caught
- Stored $charge in $form_state['storage'] in case it's needed in the submit hook
Comment #5
mmilano commentedcommitted