tidy up requirements check
This commit is contained in:
@@ -946,20 +946,17 @@ function booking_requirements($phase) {
|
|||||||
watchdog('booking_debug', "<pre>Stripe library check\n@info</pre>", array('@info' => print_r($info, true)));
|
watchdog('booking_debug', "<pre>Stripe library check\n@info</pre>", array('@info' => print_r($info, true)));
|
||||||
$requirements['booking_stripe_library'] = array(
|
$requirements['booking_stripe_library'] = array(
|
||||||
'title' => $t('Booking Module Libraries'),
|
'title' => $t('Booking Module Libraries'),
|
||||||
'description' => $t('Ensure that the stripe module is installed.'),
|
'description' => $t('Stripe library is installed.'),
|
||||||
'value' => $t('Version !version installed.', array('!version' => $info['version'])),
|
'value' => $t('Version !version installed.', array('!version' => $info['version'])),
|
||||||
'severity' => REQUIREMENT_OK,
|
'severity' => REQUIREMENT_OK,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Something went wrong. :(
|
// Stripe library is not installed or something else is wrong with it
|
||||||
// This contains a short status code of what went wrong, such as 'not found'.
|
|
||||||
//$error = $library['error'];
|
|
||||||
// This contains a detailed (localized) error message.
|
|
||||||
$error_message = $library['error message'];
|
$error_message = $library['error message'];
|
||||||
$requirements['booking_stripe_library'] = array(
|
$requirements['booking_stripe_library'] = array(
|
||||||
'title' => $t('Booking Module Libraries'),
|
'title' => $t('Booking Module Libraries'),
|
||||||
'description' => $t('Ensure that the stripe module is installed.'),
|
'description' => $t('Stripe payment processor library not installed correctly.'),
|
||||||
'value' => $error_message,
|
'value' => $error_message,
|
||||||
'severity' => REQUIREMENT_ERROR,
|
'severity' => REQUIREMENT_ERROR,
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user