PHP Classes
elePHPant
Icontem

Laravel WebShipper: Manage e-commerce orders using Webshipper API

Recommend this page to a friend!
  Info   View files Documentation   View files View files (21)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-12-27 (4 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 53 All time: 9,477 This week: 371Up
Version License PHP version Categories
laravel-webshipper 1.0.0MIT/X Consortium ...5PHP 5, E-Commerce, Web services
Description Author

This package can manage e-commerce orders using Webshipper API.

It can send HTTP requests to the Webshipper API Web server to perform several types of operations for e-commerce orders.

Currently it can create, update, find and delete orders with given details.

Innovation Award
PHP Programming Innovation award nominee
December 2018
Number 6
Webshipper is a service that simplifies the processing of e-commerce orders of one site by outsourcing that service to WebShipper using its API.

This package provides a interface to take advantage of the WebShipper service from PHP.

Manuel Lemos
Name: Stefan Ninic is available for providing paid consulting. Contact Stefan Ninic .
Classes: 3 packages by
Country: Bosnia and Herzegovina Bosnia and Herzegovina
Age: ???
All time rank: 41837 in Bosnia and Herzegovina Bosnia and Herzegovina
Week rank: 704 Up3 in Bosnia and Herzegovina Bosnia and Herzegovina Up
Innovation award
Innovation award
Nominee: 2x

Details

Laravel webshipper integration

This plugin provides a laravel wrapper for webshipper api. Webshipper at this point uses 2 versions of api. V1 api uses its own classes while V2 uses different classes Usage of any of it is based on the classes you use so it can be used as pleased

laravel-webshipper v1

Creating and using webshipper api:

To instantiate and create api instance

use Webshipper\Webshipper';
$api = new Webshipper();

Using api to create orders

Api has an exposed property called orders $this->api->orders This property is used to manipualte orders

Creating webshipper order $data object

[
        'billing_address' =>
            [
                'address_1' => 'Test Road 66',
                'address_2' => 'Test Road 120',
                'city' => 'Test City',
                'company_name' => 'webshipr Aps',
                'contact_name' => 'mathias',
                'country_code' => 'DK',
                'email' => 'info@webshipr.com',
                'phone' => '66666666',
                'phone_area' => '+45',
                'zip' => '8230',
            ],
        'delivery_address' =>
            [
                'address_1' => 'Test Road 66',
                'address_2' => 'Test Road 120',
                'city' => 'Test City',
                'company_name' => 'webshipr Aps',
                'contact_name' => 'mathias',
                'country_code' => 'DK',
                'email' => 'info@webshipr.com',
                'phone' => '66666666',
                'phone_area' => '+45',
                'zip' => '8230',
            ],
        'dynamic_address' =>
            [
                'address_1' => 'GLS Pakkeshop XX',
                'address_2' => '',
                'city' => 'Åbyhøj',
                'company_name' => 'GLS Pakkeshop XX',
                'contact_name' => '',
                'country_code' => 'DK',
                'email' => 'info@webshipr.com',
                'phone' => '',
                'phone_area' => '',
                'zip' => '8230',
            ],
        'custom_pickup_identifier' => '341',
        'items' =>
            [
                [
                    'description' => 'Testdesc1',
                    'product_name' => 'TestName1',
                    'product_no' => 12,
                    'quantity' => 45,
                    'uom' => 'pcs',
                    'weight' => 500,
                    'location' => 'EP432S2',
                    'sub_total_price' => 50,
                    'total_price' => 60,
                    'currency' => 'EUR',
                    'tarif_number' => '1234',
                    'origin_country_code' => 'NO',
                    'ext_ref' => 'myitemref1',
                ],
                [
                    'description' => 'Testdesc1',
                    'product_name' => 'TestName1',
                    'product_no' => 12,
                    'quantity' => 45,
                    'uom' => 'pcs',
                    'weight' => 500,
                    'location' => 'EP432S2',
                    'sub_total_price' => 50,
                    'total_price' => 60,
                    'currency' => 'EUR',
                    'tarif_number' => '1234',
                    'origin_country_code' => 'NO',
                    'ext_ref' => 'myitemref2',
                ],
            ],
        'webshop_id' => 3752,
        'ext_ref' => '00929812',
        'shipping_rate_id' => 983,
        'user_id' => 123,
        'comment' => 'Sample Comment',
    ]

Full create order will look like:

$this->api->orders->create(
    [
            'billing_address' =>
                [
                    'address_1' => 'Test Road 66',
                    'address_2' => 'Test Road 120',
                    'city' => 'Test City',
                    'company_name' => 'webshipr Aps',
                    'contact_name' => 'mathias',
                    'country_code' => 'DK',
                    'email' => 'info@webshipr.com',
                    'phone' => '66666666',
                    'phone_area' => '+45',
                    'zip' => '8230',
                ],
            'delivery_address' =>
                [
                    'address_1' => 'Test Road 66',
                    'address_2' => 'Test Road 120',
                    'city' => 'Test City',
                    'company_name' => 'webshipr Aps',
                    'contact_name' => 'mathias',
                    'country_code' => 'DK',
                    'email' => 'info@webshipr.com',
                    'phone' => '66666666',
                    'phone_area' => '+45',
                    'zip' => '8230',
                ],
            'dynamic_address' =>
                [
                    'address_1' => 'GLS Pakkeshop XX',
                    'address_2' => '',
                    'city' => 'Åbyhøj',
                    'company_name' => 'GLS Pakkeshop XX',
                    'contact_name' => '',
                    'country_code' => 'DK',
                    'email' => 'info@webshipr.com',
                    'phone' => '',
                    'phone_area' => '',
                    'zip' => '8230',
                ],
            'custom_pickup_identifier' => '341',
            'items' =>
                [
                    [
                        'description' => 'Testdesc1',
                        'product_name' => 'TestName1',
                        'product_no' => 12,
                        'quantity' => 45,
                        'uom' => 'pcs',
                        'weight' => 500,
                        'location' => 'EP432S2',
                        'sub_total_price' => 50,
                        'total_price' => 60,
                        'currency' => 'EUR',
                        'tarif_number' => '1234',
                        'origin_country_code' => 'NO',
                        'ext_ref' => 'myitemref1',
                    ],
                    [
                        'description' => 'Testdesc1',
                        'product_name' => 'TestName1',
                        'product_no' => 12,
                        'quantity' => 45,
                        'uom' => 'pcs',
                        'weight' => 500,
                        'location' => 'EP432S2',
                        'sub_total_price' => 50,
                        'total_price' => 60,
                        'currency' => 'EUR',
                        'tarif_number' => '1234',
                        'origin_country_code' => 'NO',
                        'ext_ref' => 'myitemref2',
                    ],
                ],
            'webshop_id' => 3752,
            'ext_ref' => '00929812',
            'shipping_rate_id' => 983,
            'user_id' => 123,
            'comment' => 'Sample Comment',
        ]
)

Updating order is done by using this code:

$this->api->orders->update($id, $data)

$data in update is the same as in create

Finding order is done by following code:

$this->api->orders-find($id)

Deleting order is done by following code:

$this->api->orders-delete($id)

laravel-webshipper v2

  Files folder image Files  
File Role Description
Files folder imagesrc (3 files, 4 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file sample.php Aux. Auxiliary script

  Files folder image Files  /  src  
File Role Description
Files folder imageconfig (1 file)
Files folder imageModel (4 files)
Files folder imageUtil (1 file)
Files folder imageV2 (2 directories)
  Plain text file Webshipper.php Class Class source
  Plain text file WebshipperServiceProvider.php Class Class source
  Plain text file WebshipperV2.php Class Class source

  Files folder image Files  /  src  /  config  
File Role Description
  Accessible without login Plain text file webshipper.php Aux. Auxiliary script

  Files folder image Files  /  src  /  Model  
File Role Description
  Plain text file Fulfillment.php Class Class source
  Plain text file Model.php Class Class source
  Plain text file Order.php Class Class source
  Plain text file ShippingRate.php Class Class source

  Files folder image Files  /  src  /  Util  
File Role Description
  Plain text file Request.php Class Class source

  Files folder image Files  /  src  /  V2  
File Role Description
Files folder imageModel (8 files)
Files folder imageUtil (1 file)

  Files folder image Files  /  src  /  V2  /  Model  
File Role Description
  Plain text file DropPointLocator.php Class Class source
  Plain text file Fulfillment.php Class Class source
  Plain text file Model.php Class Class source
  Plain text file Order.php Class Class source
  Plain text file OrderChannel.php Class Class source
  Plain text file Shipment.php Class Class source
  Plain text file ShippingRate.php Class Class source
  Plain text file Webhook.php Class Class source

  Files folder image Files  /  src  /  V2  /  Util  
File Role Description
  Plain text file Request.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:53
This week:0
All time:9,477
This week:371Up