Commit 5e931bc6 by 陶然

优化

parent 08a0cf69
......@@ -9,11 +9,14 @@ namespace Com.Bocom.OpenApi
internal static class Configs
{
internal static string APIGW_URL_ADDRESS = "https://open.test.bankcomm.com:9443/uat";//"https://117.184.192.242:9443";
internal static string QR_CODE_APIGW_URL_ADDRESS = "https://open.test.bankcomm.com:9443";//"https://117.184.192.242:9443";
/// <summary>
/// APP_ID:通过内管查看详情,可获取对应的组织机构、接入方式、公钥等信息;APP管理中查看
/// </summary>
internal static string APP_ID = "appozhjz202305110002";
internal static string QR_CODE_APP_ID = "apponjsc202306050001";
internal static string mer_ptc_id = "131070111007007";
/// <summary>
/// 主机构号
/// </summary>
......@@ -27,11 +30,12 @@ namespace Com.Bocom.OpenApi
/// MY_PRIVATE_KEY:RSA私钥,可以通过sdk包下面bin文件夹里面的工具生成一对公私钥
/// </summary>
internal static string MY_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDEu3hCLeQXcWmi+wXaaM0HSJkRxFb/lQl8GU69UiRmf0zI4Xh7/cPBXdm/CWS5SzzTRCQJh23/USxPuyB//wWHgkqUASj12B4mMdx+/KGFmgrAFCy4CBhE2+O4AaiKWuZ8Gpmv+NUseNhy/kyzdNrmqikffr1vM7q1emJ8Y9OihGIAB8toT6b9I/iL93yLUXNLe0ELIIJ1+mmr7j0GvAMZQKL2IrfJ4MCRqg0Ioj2Ql1ckrkmIjgMKZQ1ryzrzcllq5YeaOM8fM3gff9Ntn06N2fsbpZFnGzokNpZkBX8wsLwOHBLM25RxvMPWH9UwWBXkklNHe57PN9G7qtvMMOnPAgMBAAECggEAMeTNuhMDbwKfZOs+78Z2gStjTsM5wTYeIrAUbSVg//G3Gpc8RE32kJrpt259chTnxzjX3ubO+dqvX0U5F90onNZpbaHhrn/yHYO1xSrzF/waT96N/NpotUYDOc6J3RTysXTZl2yHO/EmC/v8neK8BZYQOeGdz48SAiaYxa1XpjZ0QAUX3rCjf9qjkTKux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pj1VbcD2js41ahj61obyktQbTC19rQPcyVJSC/+AjexaumKUJmUbOF2p9jvvH2L5v27NKyI6omwbHreyZF3tswV4HhrMMg3PBn61NLheHgPkEDW9QPd8KnQUd7xCIPWIUW9gEco7GBYoFW7ygP8PEfGR1zXi1qgrzEWBINxAoGBAIe3h6rzrzOVMVvLmbHGmt0zJXNQ5O7WuJpfIR4QJD1Pq50B+RN8j8Skwtj2Q8RCiyfoBdzX+32IwIxgsOKc8scVdiuIIVCU0Bst0KK3b3WPipf+vSlSr3H51tRNBqwvZ9bmtmyyljOX0r7GZFoz0bqZsH93jVLh4eImLneU3K1pAoGAMUCNCHIpMSd+d5ewR9VxXY1DjGHvIC98EdsjL0S7QcVrWb9mh6Br5G6zvlIJcMhIaQm3C1ETLaHG+K9XRrA+HcJo1ApeMT7MgBmIC+cG1aepZREDruNI3G8r4bDS6pHSDKk+Iu8shpEUurxZCzjBX2n5OeMJx+xDgYUq5H4Bn5I=";
/// <summary>
/// APIGW_PUBLIC_KEY:网关公钥
/// </summary>
internal static string APIGW_PUBLIC_KEY =
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxSJrF8T/5rKB4NnwMjIxUer+ELf1PQXO2GSdZ/fvuQCclOR9tBlNWL4jFOftebeL+bvMVOJ+JHm/aSes1AN8YNIDGiFUpF6aDkSCaLynDdjK/mQTWhSNa2fO0GGO+ywOBTdYUjVjVtzJ48bbyG3NSylf1EdnBWnMpFa8qpXJXR4ELpVpMkPDC+93HBAlxEgUjhcIJlP5VdKIiudsmhE2T07qtpIQSuE5hntXP6X6GKJReCk+yek2QJITvIBq3cHPw8KDsHHCs7MaR81KI3onJRWyqFtTfVYTiKsd9EcYSxv+Gx5MOF8B/P4iJCD8uzx0FrqoB3k5OYGcz4tXs+h+9wIDAQAB";
internal static string APIGW_PUBLIC_KEY ="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxSJrF8T/5rKB4NnwMjIxUer+ELf1PQXO2GSdZ/fvuQCclOR9tBlNWL4jFOftebeL+bvMVOJ+JHm/aSes1AN8YNIDGiFUpF6aDkSCaLynDdjK/mQTWhSNa2fO0GGO+ywOBTdYUjVjVtzJ48bbyG3NSylf1EdnBWnMpFa8qpXJXR4ELpVpMkPDC+93HBAlxEgUjhcIJlP5VdKIiudsmhE2T07qtpIQSuE5hntXP6X6GKJReCk+yek2QJITvIBq3cHPw8KDsHHCs7MaR81KI3onJRWyqFtTfVYTiKsd9EcYSxv+Gx5MOF8B/P4iJCD8uzx0FrqoB3k5OYGcz4tXs+h+9wIDAQAB";
internal static string QR_CODE_APIGW_PUBLIC_KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxSJrF8T/5rKB4NnwMjIxUer+ELf1PQXO2GSdZ/fvuQCclOR9tBlNWL4jFOftebeL+bvMVOJ+JHm/aSes1AN8YNIDGiFUpF6aDkSCaLynDdjK/mQTWhSNa2fO0GGO+ywOBTdYUjVjVtzJ48bbyG3NSylf1EdnBWnMpFa8qpXJXR4ELpVpMkPDC+93HBAlxEgUjhcIJlP5VdKIiudsmhE2T07qtpIQSuE5hntXP6X6GKJReCk+yek2QJITvIBq3cHPw8KDsHHCs7MaR81KI3onJRWyqFtTfVYTiKsd9EcYSxv+Gx5MOF8B/P4iJCD8uzx0FrqoB3k5OYGcz4tXs+h+9wIDAQAB";
/// <summary>
/// 1.1 账单核销结果查询
......@@ -63,5 +67,7 @@ namespace Com.Bocom.OpenApi
/// </summary>
internal static string MPNG210001RequestV1 = "/api/pmssMpng/MPNG210001/v1";
internal static string MPNG020702RequestV1 = "/api/pmssMpng/MPNG020702/v1";
}
}
......@@ -80,6 +80,7 @@
<Compile Include="Sdk\request\HmdLoanStatusListFileDownloadRequestV1.cs" />
<Compile Include="Sdk\request\IntegralExchangeCheckRequestV1.cs" />
<Compile Include="Sdk\request\IntegralExchangeCreateUrlRequestV1.cs" />
<Compile Include="Sdk\request\MPNG020702RequestV1.cs" />
<Compile Include="Sdk\request\MPNG210001RequestV1.cs" />
<Compile Include="Sdk\request\QueryContractOrderRequestV2.cs" />
<Compile Include="Sdk\request\ScfCreateUrlRequestV1.cs" />
......@@ -93,6 +94,7 @@
<Compile Include="Sdk\response\IntegralExchangeCheckResponseV1.cs" />
<Compile Include="Sdk\response\IntegralExchangeCreateUrlResponseV1.cs" />
<Compile Include="Sdk\response\IntegralExchangeNotifyResponseV1.cs" />
<Compile Include="Sdk\response\MPNG020702ResponseV1.cs" />
<Compile Include="Sdk\response\MPNG210001ResponseV1.cs" />
<Compile Include="Sdk\response\QueryContractOrderResponseV2.cs" />
<Compile Include="Sdk\response\ScfCreateUrlResponseV1.cs" />
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace Com.Bocom.OpenApi
{
public class MPNG020702RequestV1 : BocomRequest<MPNG020702ResponseV1>
{
public override Type GetResponseClass()
{
return typeof(MPNG020702ResponseV1);
}
public override bool IsNeedEncrypt()
{
return false;
}
public override string GetMethod()
{
return "POST";
}
public override Type GetBizContentClass()
{
return typeof(MPNG020702RequestV1Biz);
}
[DataContract]
public class MPNG020702RequestV1Biz : BizContent
{
[DataMember]
public ReqHead req_head { get; set; }
[DataMember]
public ReqBody req_body { get; set; }
public class ReqHead
{
/// <summary>
/// 交易时间 yyyymmddhhmmss </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("trans_time") private String transTime;
//internal string transTime;
public string trans_time { get; set; }
/// <summary>
/// 版本信息 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("version") private String version;
public string version { get; set; }
}
public class ReqBody
{
/// <summary>
/// 原交易商户侧交易日期 yyyyMMdd </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("mer_trade_date") private String merTradeDate;
//internal string merTradeDate;
public string mer_trade_date { get; set; }
/// <summary>
/// 服务商编号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("partner_id") private String partnerId;
//internal string partnerId;
public string partner_id { get; set; }
/// <summary>
/// 商户交易编号,商户自定义的订单号,当日不可重复 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_mer_tran_no") private String payMerTranNo;
//internal string payMerTranNo;
public string pay_mer_tran_no { get; set; }
/// <summary>
/// 交易场景,支付交易上送的交易场景,如B2C-API-DISPLAYCODE等 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("tran_scene") private String tranScene;
//internal string tranScene;
public string tran_scene { get; set; }
/// <summary>
/// "目前支持的字段包括银行端交易流水号bank_tran_no、第三方渠道third_party、第三方渠道交易流水号third_party_tran_no、微信支付宝详细付款信息payment_info、微信支付宝详细付款信息refund_info" </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("require_fields") private java.util.List<RequireFields> requireFields;
//internal IList<RequireFields> requireFields;
public List<RequireFields> require_fields { get; set; }
//* 商户编号
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("mer_ptc_id") private String merPtcId;
//internal string merPtcId;
public string mer_ptc_id { get; set; }
/// <summary>
/// 交行系统订单号,订单号和商户交易编号二选一,若送了优先使用系统订单号查询 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("sys_order_no") private String sysOrderNo;
//internal string sysOrderNo;
public string sys_order_no { get; set; }
public class RequireFields
{
/// <summary>
/// 额外返回的属性 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("require_field") private String requireField;
//internal string requireField;
public string require_field { get; set; }
}
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Com.Bocom.OpenApi
{
public class MPNG020702ResponseV1 : BocomResponse
{
/// <summary>
/// "" </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("rsp_body") private RspBody rspBody;
//private RspBody rspBody;
public RspBody rsp_body { get; set; }
//* ""
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("rsp_head") private RspHead rspHead;
//private RspHead rspHead;
public RspHead rsp_head { get; set; }
public class RspHead
{
/// <summary>
/// 交易码 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("trans_code") private String transCode;
//internal string transCode;
public string trans_code { get; set; }
/// <summary>
/// 响应码 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("response_code") private String responseCode;
//internal string responseCode;
public string response_code { get; set; }
/// <summary>
/// 交易状态 P-处理中 F-失败 S-成功 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("response_status") private String responseStatus;
public string response_status { get; set; }
/// <summary>
/// 响应时间 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("response_time") private String responseTime;
public string response_time { get; set; }
/// <summary>
/// 返回码描述 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("response_msg") private String responseMsg;
public string response_msg { get; set; }
}
public class RspBody
{
/// <summary>
/// 支付账户类型 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("account_type") private String accountType;
internal string accountType;
public string account_type { get; set; }
/// <summary>
/// "" </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("goods_info") private GoodsInfo goodsInfo;
//internal GoodsInfo goodsInfo;
public GoodsInfo goods_info { get; set; }
public class GoodsInfo
{
/// <summary>
/// 商品名称 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("goods_name") private String goodsName;
//internal string goodsName;
public string goods_name { get; set; }
/// <summary>
/// 商品简称 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("goods_txt") private String goodsTxt;
//internal string goodsTxt;
public string goods_txt { get; set; }
/// <summary>
/// 商品详情 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("goods_desc") private String goodsDesc;
//internal string goodsDesc;
public string goods_desc { get; set; }
}
//* ""
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("memo_info") private MemoInfo memoInfo;
//internal MemoInfo memoInfo;
public MemoInfo memo_info { get; set; }
public class MemoInfo
{
/// <summary>
/// 平台商备注 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("plat_memo") private String platMemo;
//internal string platMemo;
public string plat_memo { get; set; }
/// <summary>
/// 卖家备注 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("seller_memo") private String sellerMemo;
//internal string sellerMemo;
public string seller_memo { get; set; }
/// <summary>
/// 付款备注 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_memo") private String payMemo;
//internal string payMemo;
public string pay_memo { get; set; }
/// <summary>
/// 买家备注 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("buyer_memo") private String buyerMemo;
//internal string buyerMemo;
public string buyer_memo { get; set; }
/// <summary>
/// B2B授权超时时间 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("accr_time_out") private String accrTimeOut;
//internal string accrTimeOut;
public string accr_time_out { get; set; }
}
//* 交易使用积分
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("points") private String points;
//internal string points;
public string points { get; set; }
/// <summary>
/// INITIAL:初始化 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("order_status") private String orderStatus;
//internal string orderStatus;
public string order_status { get; set; }
/// <summary>
/// 商户内部备注 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("mer_memo") private String merMemo;
//internal string merMemo;
public string mer_memo { get; set; }
/// <summary>
/// "" </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("user_info") private UserInfo userInfo;
//internal UserInfo userInfo;
public UserInfo user_info { get; set; }
public class UserInfo
{
/// <summary>
/// 卖家昵称 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("seller_name") private String sellerName;
//internal string sellerName;
public string seller_name { get; set; }
/// <summary>
/// 买家昵称 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("buyer_name") private String buyerName;
//internal string buyerName;
public string buyer_name { get; set; }
/// <summary>
/// 买家会员编号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("buyer_id") private String buyerId;
//internal string buyerId;
public string buyer_id { get; set; }
/// <summary>
/// 卖家id </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("seller_id") private String sellerId;
//internal string sellerId;
public string seller_id { get; set; }
}
//* 第三方活动优惠金额
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("trd_dsct_amount") private String trdDsctAmount;
//internal string trdDsctAmount;
public string trd_dsct_amount { get; set; }
/// <summary>
/// "" </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("require_values") private RequireValues requireValues;
//internal RequireValues requireValues;
public RequireValues require_values { get; set; }
public class RequireValues
{
/// <summary>
/// 无描述 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("bank_tran_no") private String bankTranNo;
//internal string bankTranNo;
public string bank_tran_no { get; set; }
/// <summary>
/// 无描述 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("third_party") private String thirdParty;
//internal string thirdParty;
public string third_party { get; set; }
}
//* ""
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("mer_info") private MerInfo merInfo;
//internal MerInfo merInfo;
public MerInfo mer_info { get; set; }
public class MerInfo
{
/// <summary>
/// 商户编号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("mer_ptc_id") private String merPtcId;
//internal string merPtcId;
public string mer_ptc_id { get; set; }
/// <summary>
/// 商户简称 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("mer_name_cn") private String merNameCn;
//internal string merNameCn;
public string mer_name_cn { get; set; }
/// <summary>
/// 商户所属分行 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("mer_open_branch") private String merOpenBranch;
//internal string merOpenBranch;
public string mer_open_branch { get; set; }
}
//* PROCESS:处理中
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("tran_state") private String tranState;
//internal string tranState;
public string tran_state { get; set; }
/// <summary>
/// 币种目前只支持CNY </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("currency") private String currency;
//internal string currency;
public string currency { get; set; }
/// <summary>
/// 买家实付金额 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("buyer_pay_amount") private String buyerPayAmount;
//internal string buyerPayAmount;
public string buyer_pay_amount { get; set; }
/// <summary>
/// 订单号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("sys_order_no") private String sysOrderNo;
//internal string sysOrderNo;
public string sys_order_no { get; set; }
/// <summary>
/// 交易状态码 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("tran_state_code") private String tranStateCode;
//internal string tranStateCode;
public string tran_state_code { get; set; }
/// <summary>
/// 交易状态提示 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("tran_state_msg") private String tranStateMsg;
//internal string tranStateMsg;
public string tran_state_msg { get; set; }
/// <summary>
/// "" </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_detail_info") private java.util.List<PayDetailInfo> payDetailInfo;
//internal IList<PayDetailInfo> payDetailInfo;
public List<PayDetailInfo> pay_detail_info { get; set; }
public class PayDetailInfo
{
/// <summary>
/// 付款日期 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_date") private String payDate;
//internal string payDate;
public string pay_date { get; set; }
/// <summary>
/// 流水状态 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_state") private String payState;
//internal string payState;
public string pay_state { get; set; }
/// <summary>
/// 流水金额 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_amt") private String payAmt;
//internal string payAmt;
public string pay_amt { get; set; }
/// <summary>
/// 银行流水备注 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_bank_memo") private String payBankMemo;
//internal string payBankMemo;
public string pay_bank_memo { get; set; }
/// <summary>
/// 所属银行名称 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_bank_name") private String payBankName;
//internal string payBankName;
public string pay_bank_name { get; set; }
/// <summary>
/// 银行交易流水号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_no") private String payNo;
//internal string payNo;
public string pay_no { get; set; }
/// <summary>
/// 商户流水备注 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_memo") private String payMemo;
//internal string payMemo;
public string pay_memo { get; set; }
/// <summary>
/// 流水类型 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_type") private String payType;
//internal string payType;
public string pay_type { get; set; }
/// <summary>
/// 支付类型 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("channel_type") private String channelType;
//internal string channelType;
public string channel_type { get; set; }
/// <summary>
/// 商户流水号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("mer_tran_serial_no") private String merTranSerialNo;
//internal string merTranSerialNo;
public string mer_tran_serial_no { get; set; }
}
//* 商户交易编号
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_mer_tran_no") private String payMerTranNo;
//internal string payMerTranNo;
public string pay_mer_tran_no { get; set; }
/// <summary>
/// 商户订单总金额 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("total_amount") private String totalAmount;
//internal string totalAmount;
public string total_amount { get; set; }
/// <summary>
/// 商户已退款金额 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("refunded_amt") private String refundedAmt;
//internal string refundedAmt;
public string refunded_amt { get; set; }
/// <summary>
/// 交易内容 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("tran_content") private String tranContent;
//internal string tranContent;
public string tran_content { get; set; }
/// <summary>
/// 支付优惠金额 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_dsct_amount") private String payDsctAmount;
//internal string payDsctAmount;
public string pay_dsct_amount { get; set; }
}
}
}
......@@ -213,26 +213,31 @@ namespace Njzj.Bocoms.Openapis.Transforms
public class MPNG210001ResponseV1Test : RestfulExecution<MPNG210001ResponseV1>
{
public string BizId { get; set; }
public string TotalAmount { get; set; }
public override object OnExecution(IRequest req, IResponse res)
{
DefaultBocomClient client = new DefaultBocomClient(Configs.APP_ID, Configs.MY_PRIVATE_KEY, Configs.APIGW_PUBLIC_KEY, BocomConstants.ENCRYPT_TYPE_RSA_AND_AES);
DefaultBocomClient client = new DefaultBocomClient(Configs.QR_CODE_APP_ID, Configs.QR_CODE_MY_PRIVATE_KEY, Configs.QR_CODE_APIGW_PUBLIC_KEY, BocomConstants.ENCRYPT_TYPE_RSA_AND_AES);
/**
* 测试环境可以忽略SSL证书告警,生产环境不可忽略
*/
client.IgnoreSslHostnameVerifier();
var request = new MPNG210001RequestV1();
request.SetServiceUrl(Configs.APIGW_URL_ADDRESS + Configs.MPNG210001RequestV1);
request.SetServiceUrl(Configs.QR_CODE_APIGW_URL_ADDRESS + Configs.MPNG210001RequestV1);
var bizContent = new MPNG210001RequestV1.MPNG210001RequestV1Biz();
bizContent.req_head = new MPNG210001RequestV1.MPNG210001RequestV1Biz.ReqHead();
bizContent.req_head.trans_time = DateTime.Now.ToString("yyyyMMddHHmmss");
bizContent.req_head.version = "V-1.0";
bizContent.req_body = new MPNG210001RequestV1.MPNG210001RequestV1Biz.ReqBody();
bizContent.req_body.tran_scene = "B2C-API-DISPLAYCODE";
bizContent.req_body.mer_ptc_id = "301310063009501";//商户号,需要配置信息到位
bizContent.req_body.mer_ptc_id = Configs.mer_ptc_id;//"301310063009501";//商户号,需要配置信息到位
bizContent.req_body.mer_trade_time = DateTime.Now.ToString("HHmmss");
bizContent.req_body.mer_trade_date = DateTime.Now.ToString("yyyyMMdd");
bizContent.req_body.pay_mer_tran_no = "121809690390929234836";
//bizContent.req_body.pay_mer_tran_no = "121809690390929234836";
bizContent.req_body.pay_mer_tran_no = BizId;// Guid.NewGuid().ToString();
bizContent.req_body.total_amount = TotalAmount;
bizContent.req_body.location = "ONLINE";
bizContent.req_body.currency = "CNY";
request.SetBizContent(bizContent);
......@@ -252,4 +257,45 @@ namespace Njzj.Bocoms.Openapis.Transforms
return rtns;
}
}
public class MPNG020702ResponseV1Test : RestfulExecution<MPNG020702ResponseV1>
{
public string BizId { get; set; }
public override object OnExecution(IRequest req, IResponse res)
{
DefaultBocomClient client = new DefaultBocomClient(Configs.QR_CODE_APP_ID, Configs.QR_CODE_MY_PRIVATE_KEY, Configs.QR_CODE_APIGW_PUBLIC_KEY, BocomConstants.ENCRYPT_TYPE_RSA_AND_AES);
/**
* 测试环境可以忽略SSL证书告警,生产环境不可忽略
*/
client.IgnoreSslHostnameVerifier();
var request = new MPNG020702RequestV1();
request.SetServiceUrl(Configs.QR_CODE_APIGW_URL_ADDRESS + Configs.MPNG020702RequestV1);
var bizContent = new MPNG020702RequestV1.MPNG020702RequestV1Biz();
bizContent.req_head = new MPNG020702RequestV1.MPNG020702RequestV1Biz.ReqHead();
bizContent.req_head.trans_time = DateTime.Now.ToString("yyyyMMddHHmmss");
bizContent.req_head.version = "1.0";
bizContent.req_body = new MPNG020702RequestV1.MPNG020702RequestV1Biz.ReqBody();
bizContent.req_body.tran_scene = "B2C-API-DISPLAYCODE";
bizContent.req_body.mer_ptc_id = Configs.mer_ptc_id;//"301310063009501";//商户号,需要配置信息到位
bizContent.req_body.mer_trade_date = DateTime.Now.ToString("yyyyMMdd");
bizContent.req_body.pay_mer_tran_no = BizId;// Guid.NewGuid().ToString();
request.SetBizContent(bizContent);
var response = client.Execute(request, Guid.NewGuid().ToString().Replace("-", ""));
var rtns = new RestfulExecutionResponse<MPNG020702ResponseV1>();
rtns.Results = new List<MPNG020702ResponseV1>();
if (response.IsSuccess())
{
var resp = response as MPNG020702ResponseV1;
rtns.Results.Add(resp);
}
else
{
throw new Exception($"ReturnCode:{response.GetRspCode()}{Environment.NewLine}ReturnMsg:{response.GetRspMsg()}");
}
return rtns;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment