Comments (7)
did you tried this? #8 (comment)
from ups-php.
Yes, no luck.
from ups-php.
ups-php.zip
try this
from ups-php.
That didn't work. Here's my controller with the code. Maybe I did something wrong?
`namespace App\Http\Controllers;
require DIR . '/../../../vendor/autoload.php';
use Illuminate\Http\Request;
class UPSSaturdayDelivery extends Controller
{
public function SatCheck(Request $request)
{
//YOUR ACCOUNT NUMBER (6 characters)
$accNumber = env('UPS_ACCOUNT_NUMBER', false);
//UPS API Credentials (obtain after APP creation)
$clientId = env('UPS_API_CLIENT_ID', false);
$password = env('UPS_API_PASSWORD', false);
$config = \UPS\OAuthClientCredentials\Configuration::getDefaultConfiguration()
->setUsername($clientId)
->setPassword($password);
$apiInstance = new \UPS\OAuthClientCredentials\Request\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new \GuzzleHttp\Client(),
$config
);
$grant_type = "client_credentials"; // string |
$x_merchant_id = $accNumber; // string | Client merchant ID
try {
$result = $apiInstance->createToken($grant_type, $x_merchant_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->generateToken: ', $e->getMessage(), PHP_EOL;
}
}
}`
from ups-php.
debug include path.
var_dump( is_file(DIR . '/../../../vendor/autoload.php'));
from ups-php.
Thank you for the suggestion. The path is correct. Result is true. Could it be something in my autoload.php file then?
from ups-php.
Thank you for the suggestion. The path is correct. Result is true. Could it be something in my autoload.php file then?
Unfortunately, i cannot to resolve issue with composer-merge-plugin.
It works different when you install this package via composer require shell command.
It builds autoupload file without dependencies from subdirectories.
If you plan to use all APIs of UPS you should to download code from git and run composer install command to build common vendor directory for all UPS APIs.
from ups-php.
Related Issues (19)
- More Examples? HOT 2
- Cannot use "parent" when current class scope has no parent Error HOT 1
- Error in OneOfLabelRecoveryResponseLabelResults HOT 1
- Error in OneOfShipmentResponseShipmentResultsPackageResults HOT 2
- installation via composer miss-configured HOT 1
- License? HOT 2
- Example not working HOT 1
- Which host to use in production HOT 1
- Fatal error: Uncaught Error: Class ‘UPS\OAuthClientCredentials\Configuration’ not found in / HOT 13
- an example below?
- Rating seems broken, Successful API call returns all NULL values for all entities HOT 5
- PackageResults does not work as expected HOT 3
- Missing Tracking api after upgrade to v1.0.2 HOT 1
- Update Codebase by UPS Documentation HOT 2
- Fatal error: Uncaught Error: Class "UPS/* not found HOT 4
- Implement library for drupal commerce ups module HOT 1
- Installation Question HOT 12
- Uncaught Error: Class "OneOfRateResponseResponseAlert" not found HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ups-php.