abantecart / ups-php

PHP SDK to UPS RESTful API
MIT License
13 stars 9 forks source link

Fatal error: Uncaught Error: Class "UPS/* not found #6

Closed graffxdesign closed 9 months ago

graffxdesign commented 9 months ago

Hi,

I can't figure out how to fix this. I had a blank directory, used your composer line and am getting this error.

Am I supposed to add another composer line to add the UPS directory? I do not see one in the files.

Fatal error: Uncaught Error: Class "UPS\OAuthClientCredentials\Configuration" not found in /home/NULL/public_html/dadev/wp-content/plugins/rma/ups.php:13 Stack trace: #0 {main} thrown in /home/NULL/public_html/dadev/wp-content/plugins/rma/ups.php on line 13

Thank you

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

-- account info removed --

$config = \UPS\OAuthClientCredentials\Configuration::getDefaultConfiguration()
    ->setUsername($clientId)
    ->setPassword($password);
abolabo commented 9 months ago

Hi To solve, you can try do download zip with code and run composer install inside directory. Probably command require abantecart/ups-php does not work correctly.

graffxdesign commented 9 months ago
image

Thank you for responding!

I have all the files from your system, am I supposed to install a UPS folder?

abolabo commented 9 months ago

each directory is a separate API. You can use only needed. Composer.json in the root directory just merge all composer.jsons inside all directories. You can delete no needed directories and run composer install i the root to compound one vendor directory instead few

graffxdesign commented 9 months ago
image

Thank you again for responding, I did try that and still no luck. I will try something else.

Thank you for trying to help, there must be something I messed up.