Git er done. It's begging you.

CommentFileSizeAuthor
#4 test_exception_handling-1409936-4.patch1.31 KBmmilano

Comments

vordude’s picture

Commit 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.

vordude’s picture

Status: Active » Needs review
jlyon’s picture

Works as expected for me!

mmilano’s picture

StatusFileSize
new1.31 KB

I 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

mmilano’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.