记:.net对接拼多多加签的坑(一)
作者:互联网
拼多多需要服务商自己实现加签接口,只需要data_to_sign,对data_to_sign字段中的值实现加签
string datasign = JsonConvert.SerializeObject(request["data_to_sign"]);
string sgin = SignHelper.SignatureValue(JsonConvert.SerializeObject(request["data_to_sign"])).Item1;
jObject["response_code"] = 1;
jObject["response_msg"] = "加签成功。";
jObject["signature"] = sgin;
return jObject;
public static Tuple<string, string> SignatureValue(string xmlValue, bool isKeyInfo = false)
{
State state = WebSocketSign(xmlValue);
JObject jObject = JObject.Parse(state.Data);
JArray jArray = jObject["Data"].ToObject<JArray>();
string keyName = null;
if (isKeyInfo)
keyName = jArray[1].ToString();
return Tuple.Create(jArray[0].ToString(), keyName);
}
具体加签实现:记:.net 海关179自行加签方法_q1606671375的博客-CSDN博客
标签:string,jObject,data,jArray,sign,多多,net,加签 来源: https://blog.csdn.net/q1606671375/article/details/122256290