Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.x port of #420 (doPayment exception / doTransferCheckout) #423

Merged
merged 1 commit into from
Dec 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion includes/wf_crm_webform_postprocess.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,13 @@ class wf_crm_webform_postprocess extends wf_crm_webform_base {
$paymentProcessor->doTransferCheckout($params, 'contribute');
}
else {
$paymentProcessor->doPayment($params);
try {
$paymentProcessor->doPayment($params);
}
catch (\Civi\Payment\Exception\PaymentProcessorException $e) {
drupal_set_message(ts('Payment approval failed with message: ') . $e->getMessage(),'error');
CRM_Utils_System::redirect($this->getIpnRedirectUrl('cancel'));
}
}

}
Expand Down