110,539
社区成员
发帖
与我相关
我的任务
分享
TypReq = Type.GetTypeFromProgID("ALLINPAY.RequestData");
TypRes = Type.GetTypeFromProgID("ALLINPAY.ResponseData");
TypMis = Type.GetTypeFromProgID("ALLINPAY.MisPos");
request = Activator.CreateInstance(TypReq);
response = Activator.CreateInstance(TypRes);
mispos = Activator.CreateInstance(TypMis);
TypMis.InvokeMember("PutValue", BindingFlags.InvokeMethod, null, request, new Object[] { "CardType", "01" });
TypMis.InvokeMember("PutValue", BindingFlags.InvokeMethod, null, request, new Object[] { "TransType", TransType });
TypMis.InvokeMember("TransProcess", BindingFlags.InvokeMethod, null, mispos, new Object[] { request, response });
Console.WriteLine(request);
Console.WriteLine(response);
txtRejcode.Text = TypRes.InvokeMember("RejCode", BindingFlags.GetProperty, null, response, null).ToString();
txtRejCodeExplain.Text = TypRes.InvokeMember("RejCodeExplain", BindingFlags.GetProperty, null, response, null).ToString();
TypRes.InvokeMember("RejCode", BindingFlags.GetProperty, null, response, null).ToString();