ahyadessam / smsa
laravel SMSA shipping integration
1.0.3
2017-12-02 08:37 UTC
Requires
- php: >=5.5.9
- laravel/framework: ~5.4.0|~5.5.0
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2025-04-13 10:19:16 UTC
README
-
- This package is not a official package from SMSA just my develop *
- it's a laravel package for SMSA Integration
1- Installation
-
Require the package using composer:
composer require ahyadessam/smsa
-
Add the service provider to the
providers
inconfig/app.php
:Smsa\SmsaServiceProvider::class,
-
Add alias provider to the
aliases
inconfig/app.php
:'Smsa' => Smsa\SmsaFacade::class,
-
Publish the public assets:
php artisan vendor:publish
-
Configure your
SMSA
account data inconfig/smsa.php
:
2- Content Methods
Shipping
: Create shipping and git AWB number.PrintAWB
: Create Shipping policy PDF.Tracking
: Get shipping tracking.Cancel
: Cancel shipping.
Parameters is needed
You can get more information from SMSA documentations
Example about using
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' => 'test@test.com', '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'); } }
3- Return structure
All methods will return array contain status
(true|false) and value
(your need value)
4- Contact
for any question you can contact with me on twitter @AhyadEssam, thanks