tidy up requirements check

This commit is contained in:
Nathan Coad
2016-07-22 11:51:12 +10:00
parent a103d34276
commit 3794fece83

View File

@@ -946,20 +946,17 @@ function booking_requirements($phase) {
watchdog('booking_debug', "<pre>Stripe library check\n@info</pre>", array('@info' => print_r($info, true)));
$requirements['booking_stripe_library'] = array(
'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'])),
'severity' => REQUIREMENT_OK,
);
}
else {
// Something went wrong. :(
// This contains a short status code of what went wrong, such as 'not found'.
//$error = $library['error'];
// This contains a detailed (localized) error message.
// Stripe library is not installed or something else is wrong with it
$error_message = $library['error message'];
$requirements['booking_stripe_library'] = array(
'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,
'severity' => REQUIREMENT_ERROR,
);