• 大小: 7.36MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-27
  • 语言: C#
  • 标签: 支付宝  接口  

资源简介

支付包接口源码+详细文档(易懂),充分利用支付接口进行支付

资源截图

代码片段和文件信息

using System.Web;
using System.Text;
using System.Security.Cryptography;
using System.IO;
using System.Net;
using System;
using System.Collections.Generic;
using System.xml;

namespace Com.Alipay
{
    /// 
    /// 类名:Core
    /// 功能:支付宝接口公用函数类
    /// 详细:该类是请求、通知返回两个文件所调用的公用函数核心处理文件,不需要修改
    /// 版本:3.4
    /// 修改日期:2015-06-05
    /// 说明:
    /// 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写并非一定要使用该代码。
    /// 该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
    /// 

    public class Core
    {

        public Core()
        {
        }

        /// 
        /// 除去数组中的空值和签名参数并以字母a到z的顺序排序
        /// 

        /// 过滤前的参数组
        /// 过滤后的参数组
        public static Dictionary FilterPara(SortedDictionary dicArrayPre)
        {
            Dictionary dicArray = new Dictionary();
            foreach (KeyValuePair temp in dicArrayPre)
            {
                if (temp.Key.ToLower() != “sign“ && temp.Key.ToLower()!=“sign_type“  && temp.Value != ““ && temp.Value != null)
                {
                    dicArray.Add(temp.Key temp.Value);
                }
            }

            return dicArray;
        }

        /// 
        /// 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
        /// 

        /// 需要拼接的数组
        /// 拼接完成以后的字符串
        public static string CreatelinkString(Dictionary dicArray)
        {
            StringBuilder prestr = new StringBuilder();
            foreach (KeyValuePair temp in dicArray)
            {
                prestr.Append(temp.Key + “=“ + temp.Value + “&“);
            }

            //去掉最後一個&字符
            int nLen = prestr.Length;
            prestr.Remove(nLen-11);

            return prestr.ToString();
        }

        /// 
        /// 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串,并对参数值做urlencode
        /// 

        /// 需要拼接的数组
        /// 字符编码
        /// 拼接完成以后的字符串
        //public static string CreatelinkStringUrlencode(Dictionary dicArray Encoding code)
        //{
        //    StringBuilder prestr = new StringBuilder();
        //    foreach (KeyValuePair temp in dicArray)
        //    {
        //        prestr.Append(temp.Key + “=“ + HttpUtility.UrlEncode(temp.Value code) + “&“);
        //    }

        //    //去掉最後一個&字符
        //    int nLen = prestr.Length;
        //    prestr.Remove(nLen - 1 1);

        //    return prestr.ToString();
        //}

        /// 
        /// 获取文件的md5摘要
        /// 

        /// 文件流
        /// MD5摘要结果
        public static string GetAbstractToMD5(Stream sFile)
        {
            MD5 md5 = new MD5CryptoServiceProvider();
            byte[] 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     491520  2016-10-11 00:10  Demo\Projects\Alipay-demo-project\.vs\WebSite3\v14\.suo

     文件    2045952  2017-12-16 09:10  Demo\Projects\Alipay-demo-project\F2FPayDll\bin\Debug\AopSdk.dll

     文件    4808192  2017-12-16 09:10  Demo\Projects\Alipay-demo-project\F2FPayDll\bin\Debug\AopSdk.pdb

     文件      26112  2017-12-18 15:20  Demo\Projects\Alipay-demo-project\F2FPayDll\bin\Debug\F2FPayDll.dll

     文件     105984  2017-12-18 15:20  Demo\Projects\Alipay-demo-project\F2FPayDll\bin\Debug\F2FPayDll.pdb

     文件    6205440  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\bin\Debug\ThoughtWorks.QRCode.dll

     文件       4542  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\AlipayCore.cs

     文件       1030  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\AlipayF2FMonitorResult.cs

     文件       1013  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\AlipayF2FPayResult.cs

     文件       1184  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\AlipayF2FPrepayResult.cs

     文件       1313  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\AlipayF2FQueryResult.cs

     文件       1173  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\AlipayF2FRefundResult.cs

     文件       1453  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\AlipayMonitorImpl.cs

     文件       7515  2016-12-14 17:08  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\Alipaynotify.cs

     文件      13960  2016-12-14 17:15  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\AlipayTradeImpl.cs

     文件        890  2016-12-12 16:25  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\F2FBiz.cs

     文件        917  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\F2FMonitor.cs

     文件        345  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\F2FResult.cs

     文件        425  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\IAlipayMonitor.cs

     文件       1000  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Business\IAlipayTradeService.cs

     文件       1129  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Domain\AlipayMonitorContentBuilder.cs

     文件       1557  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Domain\AlipayTradePayContentBuilder.cs

     文件       1310  2017-03-27 18:03  Demo\Projects\Alipay-demo-project\F2FPayDll\Domain\AlipayTradePrecreateContentBuilder.cs

     文件        630  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Domain\AlipayTradeQueryCententBuilder.cs

     文件        789  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Domain\AlipayTradeRefundContentBuilder.cs

     文件        768  2017-03-27 17:34  Demo\Projects\Alipay-demo-project\F2FPayDll\Domain\JsonBuilder.cs

     文件       4282  2017-12-18 15:20  Demo\Projects\Alipay-demo-project\F2FPayDll\F2FPayDll.csproj

     文件        454  2016-12-12 17:58  Demo\Projects\Alipay-demo-project\F2FPayDll\Model\ExtendParams.cs

     文件        691  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Model\GoodsInfo.cs

     文件        592  2016-03-22 17:46  Demo\Projects\Alipay-demo-project\F2FPayDll\Model\PayResultModel.cs

............此处省略1998个文件信息

评论

共有 条评论