You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.5 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using POSV.Helper;
using POSV.Utils;
namespace POSV.WebService
{
public class WebServiceUtils
{
/// <summary>
/// 世界茶饮-虹桥高铁站接口数据上传
/// </summary>
/// <param name="endpoint">WebService访问地址</param>
/// <param name="tradeChange">交易流水数据字符串json对象数组</param>
/// <param name="valiKey">为每个调用接口的商家提供的身份验证字符串</param>
/// <returns>返回“成功”或“失败,(+错误消息)”</returns>
public static object UploadStationTradeChange(string endpoint,List<StationTradeChange> tradeChange,string valiKey)
{
try
{
if (tradeChange == null || tradeChange.Count == 0 || string.IsNullOrEmpty(valiKey)) return null;
//测试地址:http://58.213.118.119:8127/Ajax/TradeChange.asmx
//测试KEY:6EA576539AEB4E878946911DA4E0C6BD
SoapHelper oSoap = new SoapHelper(endpoint, "TradeChange");
object[] args = new object[2];
args[0] = JsonUtils.Serialize(tradeChange);
args[1] = valiKey;
object oReturn = oSoap.Invoke("Save", args);
return oReturn;
}catch(Exception ex)
{
throw ex;
}
}
}
}