I am trying to implement Shippo for estimating shipping costs during an order process. I am using Laravel 5.4 with shippo-php
.
This is regarding a test environment, and I have added a Purolator Carrier in "Test-Mode".
Once the postal code is entered, an AJAX script is called to call a php function in my ShippingController to calculate the shipping cost based on the items selected for purchase.
The responses returned are always empty {} objects.
For example, the following shippo request returns {}
$address = \Shippo_Address::
create(
array(
'object_purpose' => 'QUOTE',
'name' => 'John Smith',
'company' => 'Initech',
'street1' => '6512 Greene Rd.',
'city' => 'Woodridge',
'state' => 'IL',
'zip' => '60517',
'country' => 'US',
'phone' => '773 353 2345',
'email' => 'jmercouris@iit.com',
'metadata' => 'Customer ID 23424'
));
return $address;
$address is printed to my console.log once the AJAX script completes executing.
I have tested printing out several functions, to see what the JSON response data is, and everything is just EMPTY {} - Shippo_Shipment::create() and Shippo_CarrierAccount also returns {}
What could be the issue here? Is it related to the test environment?
The purolator details I have added to my Carrier list is a Account#/PRODUCTION KEY...
How can I specify which carrier to use when searching for Rates?