1 达达那里应该注册两个号,一个是商户号,一个是开发者账号,然后登入商户号,并绑定开发者账号,此时关联成功之后,然后在微信小程序后台新增绑定那里,添加上面的商户号,此时商户号和开发者账号都关联上了小程序,此时才能app_key和app_secret才是对应的
【物流助手/即时配送】使用预下配送单接口返回错误代码2003签名错误,请问应该向谁咨询?使用达达即时配送方案,在预下单(https://api.weixin.qq.com/cgi-bin/express/local/business/order/pre_add?access_token=ACCESS_TOKEN)时,出现2003错误,错误返回如下: {"resultcode":2003,"resultmsg":"签名错误","fee":0,"deliverfee":0,"tips":0,"insurancefee":0,"distance":0,"delivery_token":"","dispatch_duration":0} 请求信息如下($data): { "cargo": { "goods_value": "97.80", "goods_weight": "3", "goods_pickup_info": "", "goods_delivery_info": "", "cargo_first_class": "\u65e5\u7528\u767e\u8d27", "cargo_second_class": "\u5ba0\u7269\u7528\u54c1" }, "delivery_sign": "a6967774e37d812ca9d887efce235ce5606540d3", "delivery_id": "DADA", "openid": "o7OLI5V-JEIH-5qwuonh-ThNCinA", "order_info": { "order_type": "0" }, "receiver": { "name": "\u5f20\u4e09", "city": "\u5357\u4eac", "address": "\u5e7f\u5dde\u5e02\u6d77\u73e0\u533a\u65b0\u6e2f\u4e2d\u8def397\u53f7", "address_detail": "\u5e7f\u5dde\u5e02\u6d77\u73e0\u533a\u65b0\u6e2f\u4e2d\u8def397\u53f7", "phone": "020-81167888", "lng": "113.3237686157", "lat": "23.0964202881" }, "shop_id": "dadae5e77242bf27905", "shop_order_id": "110", "shop_no": "39160-433264", "shop": { "wxa_path": "\/historyOrderDetail\/historyOrderDetail?order_id=110", "img_url": "https:\/\/cyanlake.cn\/crd\/shopImg\/1\/coverImg.jpg", "goods_name": "\u9752\u6e56\u6d4b\u8bd5\u5e97", "goods_count": "10" } } 达达提供的appkey:$dada_shop_id="dadae5e77242bf27905";$dada_app_secret="如需要可提供"; 加密算法:$delivery_sign=sha1($dada_shop_id.$shop_order_id.$dada_app_secret); ------------------------------------------------- 请求发送: $data = array(//主参数构建 "cargo"=>$cargo, "delivery_sign"=>$delivery_sign, "delivery_id"=>$delivery_id, "openid"=>$user_openid, "order_info"=>$order_info, "receiver"=>$receiver, "shop_id" =>$dada_shop_id, "shop_order_id"=>$shop_order_id, "shop_no"=>$dadaID, "shop"=>$shop ); $url="https://api.weixin.qq.com/cgi-bin/express/local/business/order/pre_add?access_token=".$accessToken; $data=json_encode($data,JSON_UNESCAPED_UNICODE); $options = array( 'http' => array( 'method' => 'POST', 'header'=>"Content-type: application/x-www-form-urlencoded;charset=gb2312\r\n". "Content-length:".strlen($data)."\r\n", 'content' => $data, ) ); $context = stream_context_create($options); $codeinfo = file_get_contents($url,false,$context); 服务器使用php7.3
2020-03-30