using System;
using System.Data;
using System.IO;
using System.Xml;
using yh_interface;
using yh_local;namespace YinHai
{
public class YinHai_JK
{
//业务接口函数
private static CoClass_n_yh_interface YinHai = new CoClass_n_yh_interface(); //常用的变量
public static int AppCode = 0;
public static string AppMsg = "";
//初始化接口
public static bool JK_Init()
{
YinHai.yh_interface_init(ref AppCode, ref AppMsg);
if (YinHai_JK.AppCode >= 0)
{
return true;
}
return false;
}
//交易主函数
//传入交易编号
public static bool JK_JY(string JYBH)
{
string JYSR = GetJYSR_XML(JYBH);
YinHai.yh_interface_call(JYBH, JYSR, ref astr_JYLSH, ref astr_JYYZM, ref astr_JYSC, ref AppCode, ref AppMsg);
if (AppCode >= 0)
{
return true;
}
return false;
}
是我写的程序,在项目中对 yh_interface.dll yh_local.dll 做了引用。
现在问题是,初始化时正常,返回1 ,但当调用交易函数时,返回-1 ,错误提示 “不是通过代理接口调用的”。请高手指导下问题出在哪儿了。传入的参数绝对没有问题的。
using System.Data;
using System.IO;
using System.Xml;
using yh_interface;
using yh_local;namespace YinHai
{
public class YinHai_JK
{
//业务接口函数
private static CoClass_n_yh_interface YinHai = new CoClass_n_yh_interface(); //常用的变量
public static int AppCode = 0;
public static string AppMsg = "";
//初始化接口
public static bool JK_Init()
{
YinHai.yh_interface_init(ref AppCode, ref AppMsg);
if (YinHai_JK.AppCode >= 0)
{
return true;
}
return false;
}
//交易主函数
//传入交易编号
public static bool JK_JY(string JYBH)
{
string JYSR = GetJYSR_XML(JYBH);
YinHai.yh_interface_call(JYBH, JYSR, ref astr_JYLSH, ref astr_JYYZM, ref astr_JYSC, ref AppCode, ref AppMsg);
if (AppCode >= 0)
{
return true;
}
return false;
}
是我写的程序,在项目中对 yh_interface.dll yh_local.dll 做了引用。
现在问题是,初始化时正常,返回1 ,但当调用交易函数时,返回-1 ,错误提示 “不是通过代理接口调用的”。请高手指导下问题出在哪儿了。传入的参数绝对没有问题的。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货