Shopify not accepting CarrierService's answer

Highlighted
Shopify Expert
10 0 0

Hi!

 

I have looked into the response that my server replies with - and everything seems ok - the app was also working previously - and I have looked into similar topics here on this forum only to found that most were missing an intermediary response or some kind of other issue.

 

Now I'm wondering if the issue might be a timeout - as sometimes the reply takes 2 seconds to be given

 

I also have some doubts on the content of the reply itself - as in the docs it does not state what kind of JSON it is e.g. JSON allows unquoted numbers and booleans (and there's both a number and boolean there)

Regardless here's the initial support ticket I wrote to Shopify support - only to find out after 4/5 emails that they don't give that kind of support anymore via email..  *sigh*
--

Hi!
 
I have implemented on behalf of a client - https://guillon-fleur.myshopify.com  - a custom CarrierService - which was working and to my knowledge is working correctly.
 
I have tried adding a lax
min_delivery_date
and max_delivery_date - I have also tried to add the phone_required field - and set the total_price field as a string as per the example found here: https://help.shopify.com/en/api/reference/shipping-and-fulfillment/carrierservice
 
Yet to no avail
 
I still get the same error on Shopify's checkout - although I double checked with the server logs and emulating Shopify that the response is correct.
 
e.g.: for the following POST body:

{"rate":{"origin":{"country":"FR","postal_code":"75006","province":"Ile-De-France","city":"Paris","name":null,"address1":"120 Boulevard Raspail, ","address2":"","address3":null,"phone":"+33145489616","fax":null,"email":null,"address_type":null,"company_name":"Guillon Fleurs"},"destination":{"country":"FR","postal_code":"745005","province":null,"city":"Paris","name":"Test Cancel","address1":"32 Rue Poliveau","address2":"","address3":null,"phone":"","fax":null,"email":null,"address_type":null,"company_name":null},"items":[{"name":"Giverny","sku":"","quantity":1,"grams":100,"price":8000,"vendor":"Guillon Fleurs","requires_shipping":true,"taxable":true,"fulfillment_service":"manual","properties":{"Votre message de accompagnent":""},"product_id":714878713913,"variant_id":17627471609913}],"currency":"EUR","locale":"fr"}}
 
I'm replying with the following code:

{"rates":[{"service_name":"Vélo","description":"STUART delivery","service_code":"bike","currency":"EUR","total_price":"750.0","min_delivery_date":"2019-12-09 14:48:45 -0400","phone_required":"true","max_delivery_date":"2020-01-09 14:48:45 -0400"}]}


this is critical to the store's proper functioning - for now it has been replaced with a flat rate - but this needs to be fixed ASAP.

These are the details of the CarrierService:
 
{
    "carrier_service": {
        "id"11797758009,
        "name""Stuart Provider",
        "active"true,
        "service_discovery"true,
        "carrier_service_type""api",
        "admin_graphql_api_id""gid://shopify/DeliveryCarrierService/11797758009",
        "format""json",
    }
}

 
Please advise on how to fix this issue.
 
Best regards,
João Antunes



0 Likes
Highlighted
Shopify Partner
1777 211 370

So what's the error you are getting on the checkout?

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
1 Like
Highlighted
Shopify Expert
10 0 0

Thanks for your interest Sergiu (we have interacted before on Slack).
This is the error that the client sees:

Screenshot_2019-12-11 Erreur - Livraison - Guillon Fleurs - Paiement(1).png

 

0 Likes