PHP code example of ahyadessam / smsa

1. Go to this page and download the library: Download ahyadessam/smsa library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ahyadessam / smsa example snippets


    Smsa\SmsaServiceProvider::class,

    

    'Smsa' => Smsa\SmsaFacade::class,

    

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');
  }
}

    php artisan vendor:publish