Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4258

Import Manager: WHMCS importClients fails when there are no Stripe tokens to import

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0-b1
    • Fix Version/s: 5.1.0-b1
    • Component/s: Plugins
    • Labels:
      None

      Description

      In the file "components/migrators/whmcs/8.0/whmcs8_0.php" replace:

      From line 202 to 204 replace

              if (!is_array(Configure::get($gateway . '.map'))) {
                  $gateway = 'generic_' . $gateway_type;
                  Configure::load($gateway, dirname(__FILE__) . DS . 'config' . DS);
              }
      

      with

              if (is_array(Configure::get($gateway . '.map'))) {
                  return Configure::get($gateway . '.map');
              }
      

      From line 557 to 581 replace

                  if (empty($mapping)) {
                      continue;
                  }
       
                  // Install Stripe Gateway
                  $gateway_id = null;
                  if (!$this->GatewayManager->isInstalled(
                      $mapping['gateway'],
                      $mapping['type'],
                      Configure::get('Blesta.company_id')
                  )) {
                      $gateway_id = $this->GatewayManager->add([
                          $mapping['gateway'],
                          $mapping['type'],
                          'company_id' => Configure::get('Blesta.company_id')
                      ]);
                  }
       
                  if (is_null($gateway_id)) {
                      $gateway = $this->GatewayManager->getByClass(
                          $mapping['gateway'],
                          Configure::get('Blesta.company_id')
                      );
                       $gateway_id = !is_null($gateway[0]->id) ? $gateway[0]->id : null;
                   }
      

      with

                  if (empty($mapping) || empty($credit_card)) {
                      continue;
                  }
      
                  // Get Stripe gateway
                  $gateway = $this->GatewayManager->getByClass(
                      $mapping['gateway'],
                      Configure::get('Blesta.company_id')
                  );
      
                  if (isset($gateway[0]->id)) {
                      $gateway_id = !is_null($gateway[0]->id) ? $gateway[0]->id : null;
                  }
      

      Replace line 482

                  if (empty($mapping)) {
      

      with

                  if (empty($mapping) || empty($settings)) {
      

        Activity

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            abdy Abdy Franco
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              8/Jun/21

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 28 minutes
              28m

                Agile