GithubHelp home page GithubHelp logo

aftership-laravel's Introduction

###Laravel 4 package to Integrate with Aftership API

Build Status Bitdeli Badge endorse

####Installation

Using Composer

 "require": {
        ....
        "abishekrsrikaanth/aftership-laravel": "1.0"
    },

Update composer:

$ php composer.phar update

Add the provider to your app/config/app.php:

'providers' => array(
    ...
    'Abishekrsrikaanth\Aftership\AftershipServiceProvider',
),

and the Facade info on app/config/app.php

'aliases'   => array(
    ...
	'AfterShip'      => 'Abishekrsrikaanth\Aftership\Facades\Aftership',
),

Publish the Configuration and setup the config with the credentials of the different email providers

php artisan config:publish abishekrsrikaanth/aftership-laravel

####Couriers

Getting an instance of the Courier Object

$courier = AfterShip::Couriers();
$response = $courier->get();

####Tracking

Getting an instance of the Tracking Object

$tracking = AfterShip::Tracking();
$response = $tracking->get($options);

####Webhooks Setup This library has in-built support to easily configure the webhook notifications of Aftership. To configure the Webhook Route, open the published configuration file and setup the following configurations.

'web_hook' => array(
		'enabled'   => true,                    //Set this to true to enable Web hook Route
		'route_url' => '/wehbooks/aftership',   //Setup the Route Url that has been configured on Aftership Control Panel
		'listener'  => array(
			'type'             => 'event',      //Can be "event" or "queue"
			'handler'          => '',           //Handler to be called when the Webhook notification is received
			'queue_name'       => '',           //Used only if the type == "queue"
			'queue_connection' => ''            //To be used if a connection based queue needs to be used
		)
	)

aftership-laravel's People

Contributors

abishekrsrikaanth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aftership-laravel's Issues

Webhook response parsing

Hi Abishek,

Thank you for sharing this sdk, I have integrated Aftership API with my system and everything seems to be working except webhook notification. I have added my webhook url here on (https://www.aftership.com/settings/trigger) and can see this webhook url was triggered with json data here (https://www.aftership.com/notifications). But on my website i didn't received anything. Let me explain this with following example:

Assume my wbhook url is: http://www.example.com/tracking/webhook.php?key=test-key

on webhook.php i assumed to have data in $_POST and added following code to put log on my server:

In 'GET LOGS' am successfully received key=>test-key but in 'POST LOGS' is always empty. Please suggest how i can get data from webhook response and please also share code snippet for this if you can. Just to let you know i am premium user at aftership and have complete access of webhook feature.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.