kulikov-dev / shipstation

Connector/WebHook to the ShipStation for PHP 5.5>=

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connector to the shipping system ShipStation for PHP 5.5 >=

The connector allows to communicate with the ShipStation through the REST API, realizing operations of obtaining and updating data. Using the connector it's easy to upload new orders to the ShipStation and track shipments using WebHooks.

There are four classes here:

shipstation_connector - low-level API. Allow to send queries and get a response. Before work it's necessary to setup credentials:

	 /**
     * Open connection to ShipStation
     */
    public function open_connection()
    {
        // TODO: Load key, password from your config.
        $key = "";
        $secret = "";
        $this->entry_point = "https://ssapi.shipstation.com";

shipstation_api - top-level API:

  • Create a CMS order in the ShipStation;
  public static function set_order($shipstation_order)
  • WebHook event from ShipStation when order/order items are shipped. Update information in CMS;
  public static function on_shipstation_order_webhook($call_url, $is_item_hook)
  • Create webhooks in ShipStation on first connection.
  private static function subscribe_to_webhooks()

shipstation_data_converter - used to convert data from your CMS order data object to the ShipStation and vice versa.

shipstation_webhook - webhook for tracking shipment information from the ShipStation.

Small useful tooltips:

  • Use link for webhooks debugging;
  • Easy way to test webhook labels is to create in your ShipStation personal account the FedEx account. It's free;

About

Connector/WebHook to the ShipStation for PHP 5.5>=

License:MIT License


Languages

Language:PHP 100.0%