Download the PHP package nazalas/fedex-laravel without Composer
On this page you can find all versions of the php package nazalas/fedex-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download nazalas/fedex-laravel
More information about nazalas/fedex-laravel
Files in nazalas/fedex-laravel
Download nazalas/fedex-laravel
More information about nazalas/fedex-laravel
Files in nazalas/fedex-laravel
Vendor nazalas
Package fedex-laravel
Short Description A service provider to integrate FedEx servces into your Laravel Project
License MIT
Package fedex-laravel
Short Description A service provider to integrate FedEx servces into your Laravel Project
License MIT
Please rate this library. Is it a good library?
Informations about the package fedex-laravel
FedEx Laravel
A service provider to integrate FedEx services into your Laravel Project
Quick Installation
You can install the package most easily through composer
Laravel 5.x
Using it in your project
Add the service provider to your config/app.php
Add the Facade to your config/app.php
Publish the config file
Set up your environment
Add values for the following setting keys in your .env or in config/fedex.php
- FEDEX_API_KEY - Your FedEx API Key
- FEDEX_API_PASSWORD - Your FedEx API Password
- FEDEX_ACCOUNT_NO - Your FedEx Account Number
- FEDEX_METER_NO - Your FedEx Meter Number
- FEDEX_USE_BETA - (Bool) Use the FedEx beta/test system instead of production
Example of Usage
Get FedEx Rates
<?php
$rateRequest = FedEx::rateRequest();
$shipment = new \Arkitecht\FedEx\Structs\RequestedShipment();
$shipment->TotalWeight = new \Arkitecht\FedEx\Structs\Weight(\Arkitecht\FedEx\Enums\WeightUnits::VALUE_LB, $weight);
$shipment->Shipper = new \Arkitecht\FedEx\Structs\Party();
$shipment->Shipper->Address = new \Arkitecht\FedEx\Structs\Address(
$shipper->address,
$shipper->city,
$shipper->state,
$shipper->zip,
null, 'US');
$shipment->Recipient = new \Arkitecht\FedEx\Structs\Party();
$shipment->Recipient->Address = new \Arkitecht\FedEx\Structs\Address(
$recipient->address,
$recipient->city,
$recipient->state,
$recipient->zip,
null, 'US');
$lineItem = new \Arkitecht\FedEx\Structs\RequestedPackageLineItem();
$lineItem->Weight = new \Arkitecht\FedEx\Structs\Weight(\Arkitecht\FedEx\Enums\WeightUnits::VALUE_LB, $weight);
$lineItem->GroupPackageCount = 1;
$shipment->PackageCount = 1;
$shipment->RequestedPackageLineItems = [
$lineItem
];
$rateRequest->Version = FedEx::rateService()->version;
$rateRequest->setRequestedShipment($shipment);
$rate = FedEx::rateService();
$response = $rate->getRates($rateRequest);
$rates = [];
if ($response->HighestSeverity == 'SUCCESS') {
foreach ($response->RateReplyDetails as $rate) {
$rates[$rate->ServiceType] = $rate->RatedShipmentDetails[0]->ShipmentRateDetail->TotalNetCharge->Amount;
}
}
All versions of fedex-laravel with dependencies
PHP Build Version
Package Version
Requires
laravel/framework Version
^9.0
nazalas/fedex-php Version ^9.0
wsdltophp/packagebase Version dev-master
nazalas/fedex-php Version ^9.0
wsdltophp/packagebase Version dev-master
The package nazalas/fedex-laravel contains the following files
Loading the files please wait ....