ios - ShippingRates not getting in Shopify SDK -


i working on shopify sdk in ios app.

i want shipping rates. when call method:

- (nsoperation *)getshippingratesforcheckoutwithtoken:(nsstring *)checkouttoken completion:(buydatashippingratesblock)block {     buyasserttoken(checkouttoken);      nsurl *url  = [self urlforcheckoutsshippingrateswithtoken:checkouttoken parameters:@{                                                                                           @"checkout" : @"",                                                                                           }];      buyrequestoperation *operation = (buyrequestoperation *)[self getrequestforurl:url start:no completionhandler:^(nsdictionary *json, nshttpurlresponse *response, nserror *error) {         nsarray *shippingrates = nil;         if (json && !error) {             shippingrates = [self.modelmanager insertshippingrateswithjsonarray:json[@"shipping_rates"]];         }          block(shippingrates, [self statusforstatuscode:response.statuscode error:error], error);     }];      operation.pollinghandler = ^bool(nsdictionary *json, nshttpurlresponse *response, nserror *error) {         return response.statuscode == buystatusprocessing;     };      [self startoperation:operation];     return operation; } 

then, response like:

<nshttpurlresponse: 0x6000004266c0>  { url: https://3abbas.myshopify.com/api/checkouts/4f9d202e6998631042d9a519c6b05cc3/shipping_rates.json?checkout= } { status code: 412, headers } 

and:

error domain=buyshopifyerrordomain code=412 "(null)" userinfo={errors={     checkout =     {         "shipping_address" =         (                         {                 code = blank;                 message = "can't blank";                 options =                 {                 };             }         );     }; }} 

how can shipping rates? can pass static shipping rates in checkout?


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -