ahyadessam/smsa is a Laravel package for laravel smsa shipping integration.
It currently has 4 GitHub stars and 59 downloads on Packagist (latest version 1.0.3).
Install it with composer require ahyadessam/smsa.
Discover more Laravel packages by ahyadessam
or browse all Laravel packages to compare alternatives.
Last updated
Require the package using composer:
composer require ahyadessam/smsa
Add the service provider to the providers in config/app.php:
Smsa\SmsaServiceProvider::class,
Add alias provider to the aliases in config/app.php:
'Smsa' => Smsa\SmsaFacade::class,
Publish the public assets:
php artisan vendor:publish
Configure your SMSA account data in config/smsa.php:
Shipping : Create shipping and git AWB number.PrintAWB : Create Shipping policy PDF.Tracking : Get shipping tracking.Cancel : Cancel shipping.You can get more information from SMSA documentations
use Smsa;
class HomeController extends Controller
{
public function smsa_shipping(){
$parameters = [
'refNo' => '22222',
'idNo' => 'id',
'cName' => 'name',
'cntry' => 'KSA',
'cCity' => 'Riyadh',
'cMobile' => '033333333',
'cAddr1' => 'test',
'cAddr2' => '',
'PCs' => '1',
'cEmail' => '[email protected]',
'weight' => '1',
'cZip' => '',
'cPOBox' => '',
'cTel1' => '',
'cTel2' => '',
'carrValue' => '',
'carrCurr' => '',
'codAmt' => '',
'custVal' => '',
'custCurr' => '',
'insrAmt' => '',
'insrCurr' => '',
'itemDesc' => '',
'prefDelvDate' => '',
'gpsPoints' => ''
];
$test = Smsa::Shipping($parameters);
dd($test);
}
public function print_label(){
$get_pdf = Smsa::PrintAWB('290012998106');
dd($get_pdf);
}
public function tracking(){
$tracking = Smsa::Tracking('290012998106');
dd($tracking);
}
public function cancel_shipping(){
$cancel = smsa::Cancel('290012998106', 'test');
}
}
All methods will return array contain status (true|false) and value (your need value)
for any question you can contact with me on twitter @AhyadEssam, thanks