Integration with Business in a Box API
$encrypt = new Encrypt(
'123456789', // Public Key
'123456789123456789123456789123456789123456789123456789', // Secret Key
)
$client = Client::create([
'title' => 'Mr',
'first_name' => 'Bill',
'surname' => 'Webber',
'house_number' => '123',
'address' => Client::combineAddress('123 Test Road', 'Testville', 'Testerton'),
'postcode' => 'TE5 7ER',
'telephone_no' => '01234567890',
]);
$pensionProduct = Pension::create([
'reference' => '1234567',
'would_you_like_a_review' => 'Yes',
'is_currently_drawing_down' => 'No',
'estimated_pension_value' => 15000,
'provider_name' => 'Some Pension Co',
]);
$appointment = Appointment::create([
new Carbon('2015-11-01 09:20'),
'Knock Loudly'
]);
$result = Remote::request(
$client,
$pensionProduct,
$appointment,
'test-api/echo',
'http://www.myurl.com/',
$encrypt
);