improve error logging
This commit is contained in:
@@ -238,8 +238,8 @@ function booking_stripe_validate_form_payment($form, &$form_state) {
|
|||||||
catch (\Stripe\Exception\CardException $e) {
|
catch (\Stripe\Exception\CardException $e) {
|
||||||
$e_json = $e->getJsonBody();
|
$e_json = $e->getJsonBody();
|
||||||
$error = $e_json['error'];
|
$error = $e_json['error'];
|
||||||
watchdog('booking', "Detected exception processing Stripe payment : !message . !error",
|
watchdog('booking', "<pre>Detected exception processing Stripe payment (!message)\n!error</pre>",
|
||||||
array('!message' => $e->getMessage(), '!error' => $error));
|
array('!message' => $e->getMessage(), '!error' => print_r($e_json)));
|
||||||
drupal_set_message($e->getMessage(), 'error');
|
drupal_set_message($e->getMessage(), 'error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user