Beispiel #1
0
        /// <summary>
        /// 构造请求URL
        /// </summary>
        /// <returns>请求url</returns>
        public string Create_url()
        {
            string arg    = AlipayFunction.Create_linkstring(sPara);    //把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
            string strUrl = arg + "sign=" + mysign + "&sign_type=" + _sign_type;

            return(strUrl);
        }
Beispiel #2
0
        private Dictionary <string, string> sPara = new Dictionary <string, string>(); //要签名的字符串

        /// <summary>
        /// 构造函数
        /// 从配置文件及入口文件中初始化变量
        /// </summary>
        /// <param name="partner">合作身份者ID</param>
        /// <param name="trade_no">支付宝交易号。它是登陆支付宝网站在交易管理中查询得到,一般以8位日期开头的纯数字(如:20100419XXXXXXXXXX) </param>
        /// <param name="logistics_name">物流公司名称</param>
        /// <param name="invoice_no">物流发货单号</param>
        /// <param name="transport_type">物流发货时的运输类型,三个值可选:POST(平邮)、EXPRESS(快递)、EMS(EMS)</param>
        /// <param name="seller_ip">卖家本地电脑IP地址</param>
        /// <param name="key">安全检验码</param>
        /// <param name="input_charset">字符编码格式 目前支持 gbk 或 utf-8</param>
        /// <param name="sign_type">加密方式 不需修改</param>
        public AlipayService(string partner,
                             string trade_no,
                             string logistics_name,
                             string invoice_no,
                             string transport_type,
                             string seller_ip,
                             string key,
                             string input_charset,
                             string sign_type)
        {
            gateway        = "https://www.alipay.com/cooperate/gateway.do?";
            _key           = key.Trim();
            _input_charset = input_charset.ToLower();
            _sign_type     = sign_type.ToUpper();
            SortedDictionary <string, string> sParaTemp = new SortedDictionary <string, string>();

            //构造签名参数数组
            sParaTemp.Add("service", "send_goods_confirm_by_platform");
            sParaTemp.Add("partner", partner);
            sParaTemp.Add("trade_no", trade_no);
            sParaTemp.Add("logistics_name", logistics_name);
            sParaTemp.Add("invoice_no", invoice_no);
            sParaTemp.Add("transport_type", transport_type);
            sParaTemp.Add("seller_ip", seller_ip);
            sParaTemp.Add("_input_charset", _input_charset);

            sPara = AlipayFunction.Para_filter(sParaTemp);
            //获得签名结果
            mysign = AlipayFunction.Build_mysign(sPara, _key, _sign_type, _input_charset);
        }
Beispiel #3
0
        /// <summary>
        /// 构造函数
        /// 从配置文件中初始化变量
        /// </summary>
        /// <param name="inputPara">通知返回来的参数数组</param>
        /// <param name="notify_id">验证通知ID</param>
        /// <param name="partner">合作身份者ID</param>
        /// <param name="key">安全校验码</param>
        /// <param name="input_charset">编码格式</param>
        /// <param name="sign_type">签名类型</param>
        /// <param name="transport">访问模式</param>
        public AlipayNotify(SortedDictionary <string, string> inputPara, string notify_id, string partner, string key, string input_charset, string sign_type, string transport)
        {
            _transport = transport;
            if (_transport == "https")
            {
                gateway = "https://www.alipay.com/cooperate/gateway.do?";
            }
            else
            {
                gateway = "http://notify.alipay.com/trade/notify_query.do?";
            }

            _partner       = partner.Trim();
            _key           = key.Trim();
            _input_charset = input_charset;
            _sign_type     = sign_type.ToUpper();

            sPara      = AlipayFunction.Para_filter(inputPara);   //过滤空值、sign与sign_type参数
            preSignStr = AlipayFunction.Create_linkstring(sPara); //获取待签名字符串(调试用)
            //获得签名结果
            mysign = AlipayFunction.Build_mysign(sPara, _key, _sign_type, _input_charset);

            //获取远程服务器ATN结果,验证是否是支付宝服务器发来的请求
            responseTxt = Verify(notify_id);
        }
Beispiel #4
0
        /// <summary>
        /// 构造函数
        /// 从配置文件中初始化变量
        /// </summary>
        /// <param name="inputPara">通知返回来的参数数组</param>
        /// <param name="notify_id">验证通知ID</param>
        /// <param name="partner">合作身份者ID</param>
        /// <param name="key">安全校验码</param>
        /// <param name="input_charset">编码格式</param>
        /// <param name="sign_type">加密类型</param>
        /// <param name="transport">访问模式</param>
        public AlipayNotify(ArrayList inputPara, string notify_id, string partner, string key, string input_charset, string sign_type, string transport)
        {
            _transport = transport;
            if (_transport == "https")
            {
                gateway = "https://www.alipay.com/cooperate/gateway.do?";
            }
            else
            {
                gateway = "http://notify.alipay.com/trade/notify_query.do?";
            }

            _partner       = partner.Trim();
            _key           = key.Trim();
            _input_charset = input_charset;
            _sign_type     = sign_type.ToUpper();

            sPara = AlipayFunction.Para_filter(inputPara);  //过滤空值、sign与sign_type参数
            sPara.Sort();                                   //得到从字母a到z排序后的加密参数数组
            //获得签名结果
            mysign = AlipayFunction.Build_mysign(sPara, _key, _sign_type, _input_charset);

            //获取远程服务器ATN结果,验证是否是支付宝服务器发来的请求
            responseTxt = Verify(notify_id);
        }
Beispiel #5
0
        private Dictionary <string, string> sPara = new Dictionary <string, string>(); //要签名的字符串

        /// <summary>
        /// 构造函数
        /// 从配置文件及入口文件中初始化变量
        /// </summary>
        /// <param name="partner">合作身份者ID</param>
        /// <param name="seller_email">签约支付宝账号或卖家支付宝帐户</param>
        /// <param name="notify_url">交易过程中服务器通知的页面 要用 以http开格式的完整路径,不允许加?id=123这类自定义参数</param>
        /// <param name="refund_date">退款当天日期,获取当天日期,格式:年[4位]-月[2位]-日[2位] 小时[2位 24小时制]:分[2位]:秒[2位],如:2007-10-01 13:13:13</param>
        /// <param name="batch_no">商家网站里的批次号,保证其唯一性,格式:当天日期[8位]+序列号[3至24位],如:201008010000001</param>
        /// <param name="batch_num">退款笔数,即参数detail_data的值中,“#”字符出现的数量加1,最大支持1000笔(即“#”字符出现的数量999个)</param>
        /// <param name="detail_data">退款详细数据</param>
        /// <param name="key">安全检验码</param>
        /// <param name="input_charset">字符编码格式 目前支持 gbk 或 utf-8</param>
        /// <param name="sign_type">加密方式 不需修改</param>
        public AlipayRefundService(string partner,
                                   string seller_email,
                                   string notify_url,
                                   string refund_date,
                                   string batch_no,
                                   string batch_num,
                                   string detail_data,
                                   string key,
                                   string input_charset,
                                   string sign_type)
        {
            gateway        = "https://www.alipay.com/cooperate/gateway.do?";
            _key           = key.Trim();
            _input_charset = input_charset.ToLower();
            _sign_type     = sign_type.ToUpper();
            SortedDictionary <string, string> sParaTemp = new SortedDictionary <string, string>();

            //构造加密参数数组,以下顺序请不要更改(由a到z排序)
            sParaTemp.Add("_input_charset", _input_charset);
            sParaTemp.Add("batch_no", batch_no);
            sParaTemp.Add("batch_num", batch_num);
            sParaTemp.Add("detail_data", detail_data);
            sParaTemp.Add("notify_url", notify_url);
            sParaTemp.Add("partner", partner);
            sParaTemp.Add("refund_date", refund_date);
            sParaTemp.Add("seller_email", seller_email);
            sParaTemp.Add("service", "refund_fastpay_by_platform_pwd");
            //构造加密参数数组,以上顺序请不要更改(由a到z排序)

            sPara = AlipayFunction.Para_filter(sParaTemp);
            //获得签名结果
            mysign = AlipayFunction.Build_mysign(sPara, _key, _sign_type, _input_charset);
        }
Beispiel #6
0
        /// <summary>
        /// 构造请求URL(GET方式请求)
        /// </summary>
        /// <returns>请求url</returns>
        private string Create_url()
        {
            string strUrl = gateway;
            string arg    = AlipayFunction.Create_linkstring_urlencode(sPara);  //把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串

            strUrl = strUrl + arg + "sign=" + mysign + "&sign_type=" + _sign_type;
            return(strUrl);
        }
Beispiel #7
0
        private ArrayList sPara       = new ArrayList(); //需要加密的已经过滤后的参数数组

        /// <summary>
        /// 构造函数
        /// 从配置文件及入口文件中初始化变量
        /// </summary>
        /// <param name="partner">合作身份者ID</param>
        /// <param name="seller_email">签约支付宝账号或卖家支付宝帐户</param>
        /// <param name="return_url">付完款后跳转的页面 要用 以http开头格式的完整路径,不允许加?id=123这类自定义参数</param>
        /// <param name="notify_url">交易过程中服务器通知的页面 要用 以http开格式的完整路径,不允许加?id=123这类自定义参数</param>
        /// <param name="show_url">网站商品的展示地址,不允许加?id=123这类自定义参数</param>
        /// <param name="out_trade_no">请与贵网站订单系统中的唯一订单号匹配</param>
        /// <param name="subject">订单名称,显示在支付宝收银台里的“商品名称”里,显示在支付宝的交易管理的“商品名称”的列表里。</param>
        /// <param name="body">订单描述、订单详细、订单备注,显示在支付宝收银台里的“商品描述”里</param>
        /// <param name="total_fee">订单总金额,显示在支付宝收银台里的“应付总额”里</param>
        /// <param name="paymethod">默认支付方式,四个值可选:bankPay(网银); cartoon(卡通); directPay(余额); CASH(网点支付)</param>
        /// <param name="defaultbank">默认网银代号,代号列表见club.alipay.com/read.php?tid=8681379</param>
        /// <param name="encrypt_key">防钓鱼时间戳</param>
        /// <param name="exter_invoke_ip">买家本地电脑的IP地址</param>
        /// <param name="extra_common_param">自定义参数,可存放任何内容(除等特殊字符外),不会显示在页面上</param>
        /// <param name="buyer_email">默认买家支付宝账号</param>
        /// <param name="royalty_type">提成类型,该值为固定值:10,不需要修改</param>
        /// <param name="royalty_parameters">提成信息集,与需要结合商户网站自身情况动态获取每笔交易的各分润收款账号、各分润金额、各分润说明。最多只能设置10条</param>
        /// <param name="it_b_pay">超时时间,不填默认是15天。八个值可选:1h(1小时),2h(2小时),3h(3小时),1d(1天),3d(3天),7d(7天),15d(15天),1c(当天)</param>
        /// <param name="key">安全检验码</param>
        /// <param name="input_charset">字符编码格式 目前支持 gb2312 或 utf-8</param>
        /// <param name="sign_type">加密方式 不需修改</param>
        public AlipayService(string partner,
                             string seller_email,
                             string return_url,
                             string notify_url,
                             string show_url,
                             string out_trade_no,
                             string subject,
                             string body,
                             string total_fee,
                             string paymethod,
                             string defaultbank,
                             string encrypt_key,
                             string exter_invoke_ip,
                             string extra_common_param,
                             string buyer_email,
                             string royalty_type,
                             string royalty_parameters,
                             string it_b_pay,
                             string key,
                             string input_charset,
                             string sign_type)
        {
            gateway        = "https://www.alipay.com/cooperate/gateway.do?";
            _key           = key.Trim();
            _input_charset = input_charset.ToLower();
            _sign_type     = sign_type.ToUpper();

            //构造加密参数数组
            sPara.Add("service=create_direct_pay_by_user");
            sPara.Add("payment_type=1");
            sPara.Add("partner=" + partner);
            sPara.Add("seller_email=" + seller_email);
            sPara.Add("return_url=" + return_url);
            sPara.Add("notify_url=" + notify_url);
            sPara.Add("_input_charset=" + _input_charset);
            sPara.Add("show_url=" + show_url);
            sPara.Add("out_trade_no=" + out_trade_no);
            sPara.Add("subject=" + subject);
            sPara.Add("body=" + body);
            sPara.Add("total_fee=" + total_fee);
            sPara.Add("paymethod=" + paymethod);
            sPara.Add("defaultbank=" + defaultbank);
            sPara.Add("anti_phishing_key=" + encrypt_key);
            sPara.Add("exter_invoke_ip=" + exter_invoke_ip);
            sPara.Add("extra_common_param=" + extra_common_param);
            sPara.Add("buyer_email=" + buyer_email);
            sPara.Add("royalty_type=" + royalty_type);
            sPara.Add("royalty_parameters=" + royalty_parameters);
            sPara.Add("it_b_pay=" + it_b_pay);

            sPara = AlipayFunction.Para_filter(sPara);
            sPara.Sort();   //得到从字母a到z排序后的加密参数数组
            //获得签名结果
            mysign = AlipayFunction.Build_mysign(sPara, _key, _sign_type, _input_charset);
        }
Beispiel #8
0
        private Dictionary <string, string> sPara = new Dictionary <string, string>(); //要加密的字符串

        /// <summary>
        /// 构造函数
        /// 从配置文件及入口文件中初始化变量
        /// </summary>
        /// <param name="partner">合作身份者ID</param>
        /// <param name="seller_email">签约支付宝账号或卖家支付宝帐户</param>
        /// <param name="return_url">付完款后跳转的页面 要用 以http开头格式的完整路径,不允许加?id=123这类自定义参数</param>
        /// <param name="notify_url">交易过程中服务器通知的页面 要用 以http开格式的完整路径,不允许加?id=123这类自定义参数</param>
        /// <param name="show_url">网站商品的展示地址,不允许加?id=123这类自定义参数</param>
        /// <param name="out_trade_no">请与贵网站订单系统中的唯一订单号匹配</param>
        /// <param name="subject">订单名称,显示在支付宝收银台里的“商品名称”里,显示在支付宝的交易管理的“商品名称”的列表里。</param>
        /// <param name="body">订单描述、订单详细、订单备注,显示在支付宝收银台里的“商品描述”里</param>
        /// <param name="total_fee">订单总金额,显示在支付宝收银台里的“应付总额”里</param>
        /// <param name="paymethod">默认支付方式,四个值可选:bankPay(网银); cartoon(卡通); directPay(余额); CASH(网点支付)</param>
        /// <param name="defaultbank">默认网银代号,代号列表见club.alipay.com/read.php?tid=8681379</param>
        /// <param name="encrypt_key">防钓鱼时间戳</param>
        /// <param name="exter_invoke_ip">买家本地电脑的IP地址</param>
        /// <param name="extra_common_param">自定义参数,可存放任何内容(除等特殊字符外),不会显示在页面上</param>
        /// <param name="buyer_email">默认买家支付宝账号</param>
        /// <param name="royalty_type">提成类型,该值为固定值:10,不需要修改</param>
        /// <param name="royalty_parameters">提成信息集,与需要结合商户网站自身情况动态获取每笔交易的各分润收款账号、各分润金额、各分润说明。最多只能设置10条</param>
        /// <param name="it_b_pay">超时时间,不填默认是15天。八个值可选:1h(1小时),2h(2小时),3h(3小时),1d(1天),3d(3天),7d(7天),15d(15天),1c(当天)</param>
        /// <param name="key">安全检验码</param>
        /// <param name="input_charset">字符编码格式 目前支持 gb2312 或 utf-8</param>
        /// <param name="sign_type">加密方式 不需修改</param>
        public AlipayService(string partner,
                             string seller_email,
                             string return_url,
                             string notify_url,
                             string show_url,
                             string out_trade_no,
                             string subject,
                             string body,
                             string total_fee,
                             string paymethod,
                             string defaultbank,
                             string encrypt_key,
                             string exter_invoke_ip,
                             string extra_common_param,
                             string buyer_email,
                             string royalty_type,
                             string royalty_parameters,
                             string it_b_pay,
                             string key,
                             string input_charset,
                             string sign_type)
        {
            gateway        = "https://mapi.alipay.com/gateway.do?";
            _key           = key.Trim();
            _input_charset = input_charset.ToLower();
            _sign_type     = sign_type.ToUpper();
            SortedDictionary <string, string> sParaTemp = new SortedDictionary <string, string>();

            //构造加密参数数组
            sParaTemp.Add("service", "create_direct_pay_by_user");
            sParaTemp.Add("payment_type", "1");
            sParaTemp.Add("partner", partner);
            sParaTemp.Add("seller_email", seller_email);
            sParaTemp.Add("return_url", return_url);
            sParaTemp.Add("notify_url", notify_url);
            sParaTemp.Add("_input_charset", _input_charset);
            sParaTemp.Add("show_url", show_url);
            sParaTemp.Add("out_trade_no", out_trade_no);
            sParaTemp.Add("subject", subject);
            sParaTemp.Add("body", body);
            sParaTemp.Add("total_fee", total_fee);
            sParaTemp.Add("paymethod", paymethod);
            sParaTemp.Add("defaultbank", defaultbank);
            sParaTemp.Add("anti_phishing_key", encrypt_key);
            sParaTemp.Add("exter_invoke_ip", exter_invoke_ip);
            sParaTemp.Add("extra_common_param", extra_common_param);
            sParaTemp.Add("buyer_email", buyer_email);
            sParaTemp.Add("royalty_type", royalty_type);
            sParaTemp.Add("royalty_parameters", royalty_parameters);
            sParaTemp.Add("it_b_pay", it_b_pay);

            sPara = AlipayFunction.Para_filter(sParaTemp);
            //获得签名结果
            mysign = AlipayFunction.Build_mysign(sPara, _key, _sign_type, _input_charset);
        }
Beispiel #9
0
        private Dictionary <string, string> sPara = new Dictionary <string, string>(); //要加密的字符串

        public QianYue(string partner, string signType, string key, string input_charset)
        {
            gateway        = "https://www.alipay.com/cooperate/gateway.do?";
            _key           = key.Trim();
            _input_charset = input_charset.ToLower();
            _sign_type     = signType.ToUpper();
            SortedDictionary <string, string> sParaTemp = new SortedDictionary <string, string>();

            //构造加密参数数组
            sParaTemp.Add("service", "sign_protocol_with_partner");
            sParaTemp.Add("partner", partner);
            sParaTemp.Add("_input_charset", _input_charset);

            sPara = AlipayFunction.Para_filter(sParaTemp);
            //获得签名结果
            mysign = AlipayFunction.Build_mysign(sPara, _key, _sign_type, _input_charset);
        }
Beispiel #10
0
        private Dictionary <string, string> sPara = new Dictionary <string, string>(); //要加密的字符串

        public Distribute_royalty(string partner, string key, string signType, string input_charset, string out_trade_no, string out_bill_no,
                                  string royalty_type, string royalty_parameters)
        {
            gateway        = "https://www.alipay.com/cooperate/gateway.do?";
            _key           = key.Trim();
            _input_charset = input_charset.ToLower();
            _sign_type     = signType.ToUpper();
            SortedDictionary <string, string> sParaTemp = new SortedDictionary <string, string>();

            //构造加密参数数组
            sParaTemp.Add("service", "distribute_royalty");
            sParaTemp.Add("partner", partner);
            sParaTemp.Add("_input_charset", _input_charset);
            sParaTemp.Add("out_trade_no", out_trade_no);
            sParaTemp.Add("out_bill_no", out_bill_no);
            sParaTemp.Add("royalty_type", royalty_type);
            sParaTemp.Add("royalty_parameters", royalty_parameters);


            sPara = AlipayFunction.Para_filter(sParaTemp);
            //获得签名结果
            mysign = AlipayFunction.Build_mysign(sPara, _key, _sign_type, _input_charset);
        }
Beispiel #11
0
        private Dictionary <string, string> sPara = new Dictionary <string, string>(); //要签名的参数组

        /// <summary>
        /// 构造函数
        /// 从配置文件及入口文件中初始化变量
        /// </summary>
        /// <param name="partner">合作身份者ID</param>
        /// <param name="return_url">付完款后跳转的页面 要用 以http开头格式的完整路径,不允许加?id=123这类自定义参数</param>
        /// <param name="email">会员通用登录时,会员的支付宝账号</param>
        /// <param name="key">安全检验码</param>
        /// <param name="input_charset">字符编码格式 目前支持 gbk 或 utf-8</param>
        /// <param name="sign_type">签名方式 不需修改</param>
        public AlipayUserService(string partner,
                                 string return_url,
                                 string email,
                                 string key,
                                 string input_charset,
                                 string sign_type)
        {
            gateway        = "https://www.alipay.com/cooperate/gateway.do?";
            _key           = key.Trim();
            _input_charset = input_charset.ToLower();
            _sign_type     = sign_type.ToUpper();
            SortedDictionary <string, string> sParaTemp = new SortedDictionary <string, string>();

            //构造签名参数数组
            sParaTemp.Add("service", "user_authentication");
            sParaTemp.Add("partner", partner);
            sParaTemp.Add("return_url", return_url);
            sParaTemp.Add("email", email);
            sParaTemp.Add("_input_charset", _input_charset);

            sPara = AlipayFunction.Para_filter(sParaTemp);
            //获得签名结果
            mysign = AlipayFunction.Build_mysign(sPara, _key, _sign_type, _input_charset);
        }
Beispiel #12
0
        private Dictionary <string, string> sPara = new Dictionary <string, string>(); //要签名的字符串

        /// <summary>
        /// 构造函数
        /// 从配置文件及入口文件中初始化变量
        /// </summary>
        /// <param name="partner">合作身份者ID</param>
        /// <param name="seller_email">签约支付宝账号或卖家支付宝帐户</param>
        /// <param name="return_url">付完款后跳转的页面 要用 以http开头格式的完整路径,不允许加?id=123这类自定义参数</param>
        /// <param name="notify_url">交易过程中服务器通知的页面 要用 以http开格式的完整路径,不允许加?id=123这类自定义参数</param>
        /// <param name="show_url">网站商品的展示地址,不允许加?id=123这类自定义参数</param>
        /// <param name="out_trade_no">请与贵网站订单系统中的唯一订单号匹配</param>
        /// <param name="subject">订单名称,显示在支付宝收银台里的“商品名称”里,显示在支付宝的交易管理的“商品名称”的列表里。</param>
        /// <param name="body">订单描述、订单详细、订单备注,显示在支付宝收银台里的“商品描述”里</param>
        /// <param name="price">订单总金额,显示在支付宝收银台里的“商品单价”里</param>
        /// <param name="logistics_fee">物流费用,即运费。</param>
        /// <param name="logistics_type">物流类型,三个值可选:EXPRESS(快递)、POST(平邮)、EMS(EMS)</param>
        /// <param name="logistics_payment">物流支付方式,三个值可选:SELLER_PAY(卖家承担运费)、BUYER_PAY(买家承担运费)</param>
        /// <param name="quantity">商品数量,建议默认为1,不改变值,把一次交易看成是一次下订单而非购买一件商品。</param>
        /// <param name="receive_name">收货人姓名,如:张三</param>
        /// <param name="receive_address">收货人地址,如:XX省XXX市XXX区XXX路XXX小区XXX栋XXX单元XXX号</param>
        /// <param name="receive_zip">收货人邮编,如:123456</param>
        /// <param name="receive_phone">收货人电话号码,如:0571-81234567</param>
        /// <param name="receive_mobile">收货人手机号码,如:13312341234</param>
        /// <param name="logistics_fee_1">第二组物流费用,即运费。</param>
        /// <param name="logistics_type_1">第二组物流类型,三个值可选:EXPRESS(快递)、POST(平邮)、EMS(EMS)</param>
        /// <param name="logistics_payment_1">第二组物流支付方式,三个值可选:SELLER_PAY(卖家承担运费)、BUYER_PAY(买家承担运费)</param>
        /// <param name="logistics_fee_2">第三组物流费用,即运费。</param>
        /// <param name="logistics_type_2">第三组物流类型,三个值可选:EXPRESS(快递)、POST(平邮)、EMS(EMS)</param>
        /// <param name="logistics_payment_2">第三组物流支付方式,三个值可选:SELLER_PAY(卖家承担运费)、BUYER_PAY(买家承担运费)</param>
        /// <param name="buyer_email">默认买家支付宝账号</param>
        /// <param name="discount">折扣,是具体的金额,而不是百分比。若要使用打折,请使用负数,并保证小数点最多两位数</param>
        /// <param name="key">安全检验码</param>
        /// <param name="input_charset">字符编码格式 目前支持 gbk 或 utf-8</param>
        /// <param name="sign_type">加密方式 不需修改</param>
        public AlipayService(string partner,
                             string seller_email,
                             string return_url,
                             string notify_url,
                             string show_url,
                             string out_trade_no,
                             string subject,
                             string body,
                             string price,
                             string logistics_fee,
                             string logistics_type,
                             string logistics_payment,
                             string quantity,
                             string receive_name,
                             string receive_address,
                             string receive_zip,
                             string receive_phone,
                             string receive_mobile,
                             string logistics_fee_1,
                             string logistics_type_1,
                             string logistics_payment_1,
                             string logistics_fee_2,
                             string logistics_type_2,
                             string logistics_payment_2,
                             string buyer_email,
                             string discount,
                             string key,
                             string input_charset,
                             string sign_type)
        {
            gateway        = "https://www.alipay.com/cooperate/gateway.do?";
            _key           = key.Trim();
            _input_charset = input_charset.ToLower();
            _sign_type     = sign_type.ToUpper();
            SortedDictionary <string, string> sParaTemp = new SortedDictionary <string, string>();

            //构造加密参数数组,以下顺序请不要更改(由a到z排序)
            sParaTemp.Add("_input_charset", _input_charset);
            sParaTemp.Add("body", body);
            sParaTemp.Add("buyer_email", buyer_email);
            sParaTemp.Add("discount", discount);
            sParaTemp.Add("logistics_fee", logistics_fee);
            sParaTemp.Add("logistics_fee_1", logistics_fee_1);
            sParaTemp.Add("logistics_fee_2", logistics_fee_2);
            sParaTemp.Add("logistics_payment", logistics_payment);
            sParaTemp.Add("logistics_payment_1", logistics_payment_1);
            sParaTemp.Add("logistics_payment_2", logistics_payment_2);
            sParaTemp.Add("logistics_type", logistics_type);
            sParaTemp.Add("logistics_type_1", logistics_type_1);
            sParaTemp.Add("logistics_type_2", logistics_type_2);
            sParaTemp.Add("notify_url", notify_url);
            sParaTemp.Add("out_trade_no", out_trade_no);
            sParaTemp.Add("partner", partner);
            sParaTemp.Add("payment_type", "1");
            sParaTemp.Add("price", price);
            sParaTemp.Add("quantity", quantity);
            sParaTemp.Add("receive_address", receive_address);
            sParaTemp.Add("receive_mobile", receive_mobile);
            sParaTemp.Add("receive_name", receive_name);
            sParaTemp.Add("receive_phone", receive_phone);
            sParaTemp.Add("receive_zip", receive_zip);
            sParaTemp.Add("return_url", return_url);
            sParaTemp.Add("seller_email", seller_email);
            sParaTemp.Add("service", "create_partner_trade_by_buyer");
            sParaTemp.Add("show_url", show_url);
            sParaTemp.Add("subject", subject);
            //构造加密参数数组,以上顺序请不要更改(由a到z排序)

            sPara = AlipayFunction.Para_filter(sParaTemp);
            //获得签名结果
            mysign = AlipayFunction.Build_mysign(sPara, _key, _sign_type, _input_charset);
        }