ContributionPage.submit API action does not provide useful feedback
The ContributionPage submit API action returns the results of:
CRM_Contribute_Form_Contribution_Confirm::submit($params); doesn't return anything, so no matter what happens, we always get a success API result with no information in it.
It would be nice to get helpful info like whether the transaction was denied, etc.
Furthermore, as far as I can tell, the submit method of CRM_Contribute_Form_Contribution_Confirm is not called anywhere else besides in the API. When I submit an online contribution I seem to progress through
CRM_Contribute_Form_Contribution_Main->submit and even
CRM_Contribute_Form_Contribution_Confirm->postProcess but never
I also note that the test suite seems to run a lot of tests via
CRM_Contribute_Form_Contribution_Main->testSubmit - although that doesn't seem to return useful information either.
I'd like to help fix this but am not sure what the best strategy is. I think we should change the ContributionPage.submit API action to use
CRM_Contribute_Form_Contribution_Main->submit (or testSubmit) and we should fix that core code to return more useful results (and possible tear out the unused
Does that sound reasonable? Or am I missing something about the
CRM_Contribute_Form_Contribution_Confirm::submit() method and should focus instead on fixing it?