From b96781de458d847635e32e9dcd73dc2966bb2117 Mon Sep 17 00:00:00 2001 From: Luciano Spiegel <l.spiegel@ixiam.com> Date: Fri, 15 Oct 2021 12:33:39 +0200 Subject: [PATCH] add composer's package name --- composer.json | 2 ++ stripe.php | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 128813a6..afecce61 100644 --- a/composer.json +++ b/composer.json @@ -1,4 +1,6 @@ { + "name": "civicrm/stripe", + "description": "Stripe Payment Processor", "require": { "stripe/stripe-php": "^7" } diff --git a/stripe.php b/stripe.php index c9369d51..037aafc0 100644 --- a/stripe.php +++ b/stripe.php @@ -10,7 +10,11 @@ */ require_once 'stripe.civix.php'; -require_once __DIR__ . '/vendor/autoload.php'; +$autoload = __DIR__ . '/vendor/autoload.php'; +if (file_exists($autoload)) { + require_once $autoload; +} + use CRM_Stripe_ExtensionUtil as E; @@ -72,7 +76,6 @@ function stripe_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { return _stripe_civix_civicrm_upgrade($op, $queue); } - /** * Implementation of hook_civicrm_managed(). * @@ -83,7 +86,6 @@ function stripe_civicrm_managed(&$entities) { _stripe_civix_civicrm_managed($entities); } - /** * Implements hook_civicrm_entityTypes(). */ @@ -160,7 +162,7 @@ function stripe_civicrm_buildForm($formName, &$form) { 'country' => CRM_Core_BAO_Country::defaultContactCountry(), ]; - switch(substr($paymentIntent['stripe_intent_id'], 0, 2)) { + switch (substr($paymentIntent['stripe_intent_id'], 0, 2)) { case 'pi': // pi_ Stripe PaymentIntent $stripePaymentIntent = \Stripe\PaymentIntent::retrieve($paymentIntent['stripe_intent_id']); -- GitLab