try handling CardException
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user