瑞信在线提货系统对接京东宙斯系统的路线图
1:去京东宙斯系统,注册申请开发者账户。
2:给宙斯系统的对应负责人,发送账户权限开通申请。
3:提交公司相关的营业执照和需要补充的相关资料。
4:等待权限的开通,开通后即可获得access_token,app_key,app_secret。
5:宙斯系统的接口,会提供相应的测试工具,可以先行模拟测试数据。
6:下面就是编写提货系统的代码,去对接宙斯系统。
对接时注意事项:
1:如果有理解不了,一定要给相应的部门发送邮件询问,一般都会很快答复。2:测试通过后,申请账号的正式权限。3:瑞信在线提货系统,对接代码如下。public static jd_faka Jd_Fk(ref string ex_result,string app_key, string app_secret, string merchantId, string merchantName, string channelType, string couponType,string couponNumber, string trackingName, string trackingNumber, string sendTime, string sendSerialNumber, string sign, string orderId, string receiverName, string receiverMobile)
{
try
{string uri = string.Format(“https://api.xxx.com/routerjson?v=2.0&method=jingdong.virtual.crabCoupon.getcoupon&app_key={0}&360buy_param_json={{”merchantId”:”{1}”,”merchantName”:”{2}”,”orderId”:”{3}”,”channelType”:”{4}”,”couponType”:”{5}”,”couponNumber”:”{6}”,”trackingName”:”{7}”,”trackingNumber”:”{8}”,”sendTime”:”{9}”,”receiverName”:”{10}”,”receiverMobile”:”{11}”,”sendSerialNumber”:”{12}”}}×tamp={13}&sign={14}”,app_key,merchantId,merchantName,orderId,channelType,couponType,couponNumber,trackingName,trackingNumber,DateTime.Now.ToString(),receiverName,receiverMobile,sendSerialNumber,DateTime.Now.ToString(),sign);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream streamReceive = response.GetResponseStream();
Encoding encoding = Encoding.UTF8;
StreamReader streamReader = new StreamReader(streamReceive, encoding);
string strResult = streamReader.ReadToEnd();
streamReceive.Dispose();
streamReader.Dispose();
using (MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(strResult)))
{
DataContractJsonSerializer serializer1 = new DataContractJsonSerializer(typeof(jd_faka));
jd_faka p1 = (jd_faka)serializer1.ReadObject(ms);
return p1;
}
}
catch (Exception ex)
{
ex_result = ex.Message;}
return null;
}