try handling CardException

This commit is contained in:
2023-07-11 10:26:55 +10:00
parent b470e309b3
commit 494b6dfe2b

View File

@@ -235,6 +235,10 @@ function booking_stripe_validate_form_payment($form, &$form_state) {
watchdog('booking', $e->getMessage());
drupal_set_message($error['message'], 'error');
}
catch (\Stripe\Exception\CardException $e) {
watchdog('booking', $e->getMessage());
drupal_set_message($error['message'], 'error');
}
}
function _booking_process_stripe_payment(&$charge, $token) {