Welcome Guest, Not a member yet? Register   Sign In
Stripe Library
#3

(05-14-2021, 01:32 AM)InsiteFX Wrote: I believe that you need to add a use clause just above the class name.

PHP Code:
use Stripe\StripeClient

No sure if that is what is callusing your warning.

Hi InsiteFX,

Thanks very much for your help again. Big Grin

Unfortunately I'm still getting a thumbs down from intelephense. It is displaying Undefined type 'Stripe\StripeClient' for the Stripe instantiation in the constructor

Code:
<?php

namespace App\Libraries;

use Stripe\StripeClient;

class StripePayments
{
  protected $stripe;

  public function __construct()
  {
    $this->stripe = new \Stripe\StripeClient([
      'api_key' => getenv('stripe.secretkey'),
      'stripe_version' => '2020-08-27'
    ]);
  }

Do you think I should add anything to  app\Config\Autoload.php ?
Reply


Messages In This Thread
Stripe Library - by paulkd - 05-14-2021, 12:48 AM
RE: Stripe Library - by InsiteFX - 05-14-2021, 01:32 AM
RE: Stripe Library - by paulkd - 05-14-2021, 02:26 AM
RE: Stripe Library - by InsiteFX - 05-14-2021, 06:07 AM
RE: Stripe Library - by paulkd - 05-14-2021, 07:48 AM
RE: Stripe Library - by InsiteFX - 05-14-2021, 11:02 AM
RE: Stripe Library - by paulkd - 05-16-2021, 12:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB