1

I'm setting up a payment gateway using Gocardless API. I've tried to download and set it up manually, since I don't have composer.

This is a piece of code that I got from the documentation:

require_once APPPATH.'third_party/gocardless/lib/loader.php';
$access_token = "sandbox_xyz";
$client = new \GoCardlessPro\Client(array(
  'access_token' => $access_token,
  'environment'  => \GoCardlessPro\Environment::SANDBOX
));

$client->customers()->list();

$client->customers()->list([
  "params" => ["created_at[gt]" => "2015-11-03T09:30:00Z"]
]);

I expect a list of customers to be added in Gocardless, but I'm getting this error:

An uncaught Exception was encountered
Type: Error

Message: Class 'GuzzleHttp\HandlerStack' not found

Filename: /var/www/html/myapp/application/third_party/gocardless/lib/Client.php

Line Number: 43

I assume that I am doing something incorrectly.

Oliver Nybo
  • 560
  • 1
  • 6
  • 24
GSA
  • 21
  • 4

1 Answers1

1

According to the documentation under manual installation, you also need to require Guzzle's autoloader.php in the guzzle.zip in the src directory.

Oliver Nybo
  • 560
  • 1
  • 6
  • 24