Skip to content

Instantly share code, notes, and snippets.

@InTheCloudDan
Created September 18, 2016 14:06
Show Gist options
  • Save InTheCloudDan/01cdeb5e5a69b12120af785b769a59d1 to your computer and use it in GitHub Desktop.
Save InTheCloudDan/01cdeb5e5a69b12120af785b769a59d1 to your computer and use it in GitHub Desktop.
function send_order( $lob_api, $address_line1, $address_line2, $address_city,
$address_state, $address_zip, $name, $email = null, $phone = null ) {
//var_dump(func_get_args());
try {
$this->to_address = $this->lob->addresses()->create(array(
'address_line1' => $address_line1,
'address_line2' => $address_line2,
'address_city' => $address_city,
'address_state' => $address_state,
'address_zip' => $address_zip,
'name' => $name,
'email' => $email,
'phone' => $phone,
));
return print_r($this->to_address);
}
catch (Exception $e) {
return print_r($e->getMessage());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment