Skip to content
Snippets Groups Projects
Commit 74afb49f authored by mattwire's avatar mattwire
Browse files

Require mjwshared 1.3

parent 6639afb8
Branches
Tags
1 merge request!241Stripe Import extension
......@@ -25,9 +25,8 @@ class CRM_Stripe_Check {
/**
* @var string
*/
const MIN_VERSION_MJWSHARED = '1.2.20';
const MIN_VERSION_MJWSHARED = '1.3';
const MIN_VERSION_FIREWALL = '1.5.9';
const MIN_VERSION_MJWPAYMENTAPI = '0.2';
/**
* @var array
......@@ -169,42 +168,6 @@ class CRM_Stripe_Check {
}
}
/**
* @throws \CRM_Core_Exception
*/
private function checkExtensionMjwPaymentApi() {
$extensionName = 'mjwpaymentapi';
$extensions = civicrm_api3('Extension', 'get', [
'full_name' => $extensionName,
]);
if (empty($extensions['count']) || ($extensions['values'][$extensions['id']]['status'] !== 'installed')) {
$message = new CRM_Utils_Check_Message(
__FUNCTION__ . E::SHORT_NAME . '_requirements',
E::ts('The <em>%1</em> extension requires the <em>MJW Payment API</em> extension which is not installed. See <a href="%2" target="_blank">details</a> for more information.',
[
1 => ucfirst(E::SHORT_NAME),
2 => 'https://civicrm.org/extensions/mjwpaymentapi',
]
),
E::ts('%1: Missing Requirements', [1 => ucfirst(E::SHORT_NAME)]),
\Psr\Log\LogLevel::ERROR,
'fa-money'
);
$message->addAction(
E::ts('Install now'),
NULL,
'href',
['path' => 'civicrm/admin/extensions', 'query' => ['action' => 'update', 'id' => $extensionName, 'key' => $extensionName]]
);
$this->messages[] = $message;
return;
}
if (isset($extensions['id']) && $extensions['values'][$extensions['id']]['status'] === 'installed') {
$this->requireExtensionMinVersion($extensionName, self::MIN_VERSION_MJWPAYMENTAPI, $extensions['values'][$extensions['id']]['version']);
}
}
private function checkWebhooks() {
// If we didn't install mjwshared yet check requirements but don't crash when checking webhooks
if (trait_exists('CRM_Mjwshared_WebhookTrait')) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment