PHP Classes
elePHPant
Icontem

Laravel WebShipper: Manage e-commerce orders using Webshipper API

Recommend this page to a friend!

  Author Author  
Name: Stefan Ninic <contact>
Classes: 3 packages by
Country: Bosnia and Herzegovina Bosnia and Herzegovina
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz  
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.

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


  Classes of Stefan Ninic  >  Laravel WebShipper  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Laravel WebShipper
Base name: laravel-webshipper
Description: Manage e-commerce orders using Webshipper API
Version: -
PHP version: 5
License: MIT/X Consortium License
 
  Groups   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image E-Commerce Online stores, shopping baskets and payment methods View top rated classes
Group folder image Web services Web data clipping, SOAP or XML-RPC clients and servers View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  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

Download Download all files: laravel-webshipper.tar.gz laravel-webshipper.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.