sebmak/goabroadhq-sdk

SDK for accessing GoAbroadHQ.

v0.3.11 2015-09-15 23:39 UTC

README

#GoAbroad HQ SDK

##Installation

  composer require sebmak/goabroadhq-sdk

##Configuration

  
 $config = [
 
  'env'=>'prod',
    'credentials'=>[
      'username'=>API_USERNAME,
      'password'=>API_PASSWORD
    ]
  ]

##Usage

###Controller

  use GaHqSdk\LeadCapture;
  
  ...
  
  $hq = new LeadCapture($config);

###View

$hq->render pulls from /src/config/defaults.php and generates html input/textarea/select elements

  $hq->render('FirstName',array('class'=>'input','name'=>'FirstName'))

##Submitting Leads

    $hq = new LeadCapture($config);
    $response = $hq->submitLead($_POST);