Giter VIP home page Giter VIP logo

Comments (4)

rikterbeek avatar rikterbeek commented on August 20, 2024

Hi @marcellofiore,

It looks like the autoloader is not picking up this class.
Did you run it through composer ?

composer require adyen/php-api-library

Make sure you include the autoloader:

require __DIR__ . '/vendor/autoload.php';

Regards,
Rik
Adyen

from adyen-php-api-library.

wesweat avatar wesweat commented on August 20, 2024

Hi Guys,

Don't want to hijack this thread but I got a similar question. I am also trying out Adyen testing code, like Marcel uses. In my case i get

Fatal error: Class 'Service\Payment' not found

I have searched and I think it has to do with classes not being loaded but I can't find out why?

On my local XAMPP i have a test.php with
require __DIR__ . '/vendor/autoload.php';

and the rest of adyen test/example code

FYI: I have installed with composer:
` composer require adyen/php-api-library
Using version ^1.5 for adyen/php-api-library
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 0 updates, 0 removals

  • Installing psr/log (1.0.2): Loading from cache
  • Installing monolog/monolog (1.24.0): Downloading (100%)
  • Installing adyen/php-api-library (1.5.3): Downloading (100%)
    monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
    monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
    monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
    monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
    monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
    monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
    monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
    monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
    monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
    monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
    monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
    Writing lock file
    Generating autoload files`

Any tips/suggestios appreciated

Regards,

from adyen-php-api-library.

rikterbeek avatar rikterbeek commented on August 20, 2024

Hi @wesweat,

Can you check if in your folder where you have the test.php you have a folder called vendor with the autoload.php file ? make sure this path is indeed correct with the location of the file.

Regards,
Rik
Adyen

from adyen-php-api-library.

rikterbeek avatar rikterbeek commented on August 20, 2024

Hi @wesweat,

Make sure you use Adyen\Service\Payment instead of Service\Payment. Closing the issue as there is no responds. Feel free to open a new issue if you still have a problem.

Regards,
Rik
Adyen

from adyen-php-api-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.