using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using com.hitrust.trustpay.client;
|
|
using com.hitrust.trustpay.client.market;
|
|
|
|
namespace Bwp.ABCClient2.Market
|
|
{
|
|
public class EmpowerPayClient : ClientBase
|
|
{
|
|
public EmpowerPayClientResult Submit()
|
|
{
|
|
|
|
//var year = DateTime.Now.Year.ToString();
|
|
//var month = DateTime.Now.Month + 1;
|
|
//string monthStr = month < 10 ? "0" + month : month.ToString();
|
|
//var day = DateTime.Now.Day;
|
|
//string dayStr = day < 0 ? "0" + day : day.ToString();
|
|
//var tRequestID = "RQP" + year.Substring(2, 4) + month + day + "001";
|
|
|
|
|
|
//1、取得信息
|
|
//String tRequestID = Request["RequestID"];
|
|
//String tOrderNo = Request["OrderNo"];
|
|
//String tPayAccNo = Request["AbcAccNo"];
|
|
//String tPayAccName = Request["AbcAccName"];
|
|
//String tAgentPayAccNo = Request["AgentAccNo"];
|
|
//String tAgentPayAccName = Request["AgentAccName"];
|
|
//String tAccNo = Request["AccNo"];
|
|
//String tAccName = Request["AccName"];
|
|
//Decimal tPayAmount = Decimal.Parse(Request["PayAmount"]);
|
|
//Decimal tFeeAmount = Decimal.Parse(Request["FeeAmount"]);
|
|
//String tCustomer = Request["Customer"];
|
|
//String tremarks = Request["remarks"];
|
|
//String Customer = Request["Customer"];
|
|
|
|
//2、生成请求对象
|
|
AgentPayRequest tPayRequest = new AgentPayRequest();
|
|
tPayRequest.RequestID = TRequestID;
|
|
tPayRequest.FunctionID = "0058";
|
|
tPayRequest.PayAmount = TPayAmount;
|
|
tPayRequest.FeeAmount = 0m;
|
|
tPayRequest.Message = TMessage;
|
|
tPayRequest.OrderNo = NewRequestIDByTime();
|
|
tPayRequest.AccNo = TAccNo;
|
|
tPayRequest.AccName = TAccName;
|
|
tPayRequest.PayAccNo = TPayAccNo;
|
|
tPayRequest.PayAccName = TPayAccName;
|
|
//tPayRequest.recpbankno = "104458900601";
|
|
//tPayRequest.cBnk = "01";
|
|
//tPayRequest.sUsrBnkNm = "中国银行股份有限公司诸城支行";
|
|
//tPayRequest.sPrvNm = "潍坊市";
|
|
//tPayRequest.AgentAccNo = TAgentPayAccNo;
|
|
//tPayRequest.AgentAccName = TAgentPayAccName;
|
|
|
|
//3、传送请求并取得结果
|
|
TrxResponse tResponse = tPayRequest.postRequest();
|
|
return new EmpowerPayClientResult(tResponse);
|
|
|
|
//String sReturnCode = tResponse.ReturnCode;
|
|
//String sReturnMsg = tResponse.ErrorMessage;
|
|
|
|
//return tResponse;
|
|
//4、判断结果状态,进行后续操作
|
|
//if (tResponse.isSuccess())
|
|
//{
|
|
// String sMerchantID = tResponse.MerchantID;
|
|
// String sFunctionID = tResponse.FunctionID;
|
|
// String sFunctionName = "代理付款";
|
|
|
|
//}
|
|
//else
|
|
//{
|
|
|
|
//}
|
|
//RequestID = NewRequestIDByTime();
|
|
//OrderNo = RequestID;
|
|
|
|
//var request = new OrderApplyRequest();
|
|
//request.RequestID = RequestID;
|
|
////农行接口中付款方向的定义和一般理解的相反
|
|
////BuyCustNo 收款客户
|
|
////SaleCustNo 付款客户
|
|
|
|
//request.BuyCustName = SaleCustName;
|
|
//request.BuyCustNo = SaleCustNo;
|
|
//request.SaleCustName = BuyCustName;
|
|
//request.SaleCustNo = BuyCustNo;
|
|
//request.OrderNo = OrderNo;
|
|
//request.OrderType = OrderType;
|
|
//request.PayAmount = PayAmount;
|
|
//request.OrdrMg = OrdrMg;
|
|
//request.FeeFlag = FeeFlag;
|
|
|
|
|
|
//TrxResponse tResponse = request.postRequest();
|
|
|
|
//return new OrderApplyResult(tResponse);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 请求ID
|
|
/// </summary>
|
|
public string TRequestID { get; set; }
|
|
|
|
/// <summary>
|
|
/// 交易金额
|
|
/// </summary>
|
|
public decimal TPayAmount { get; set; }
|
|
|
|
/// <summary>
|
|
/// 交易手续费
|
|
/// </summary>
|
|
public decimal TFeeAmount { get; set; }
|
|
|
|
/// <summary>
|
|
/// 备注
|
|
/// </summary>
|
|
public string TMessage { get; set; }
|
|
|
|
/// <summary>
|
|
/// 付款单号
|
|
/// </summary>
|
|
public string TOrderNo { get; set; }
|
|
|
|
/// <summary>
|
|
/// 收款方账户号
|
|
/// </summary>
|
|
public string TAccNo { get; set; }
|
|
|
|
/// <summary>
|
|
/// 收款方账户名
|
|
/// </summary>
|
|
public string TAccName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 付款方农行账户号
|
|
/// </summary>
|
|
public string TPayAccNo { get; set; }
|
|
|
|
/// <summary>
|
|
/// 付款方农行账户号
|
|
/// </summary>
|
|
public string TPayAccName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 付款方内部账户名
|
|
/// </summary>
|
|
public string TAgentPayAccNo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 付款方内部账户名
|
|
/// </summary>
|
|
public string TAgentPayAccName { get; set; }
|
|
|
|
}
|
|
}
|