⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testalipay.cs

📁 将淘宝网支付系统嵌入自己系统,学习的好材料!
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using NUnit;
using NUnit.Framework;
using CommonAliPay;
using System.Collections.Specialized;
namespace TestCommonAliPay
{
    //您账户的交易安全校验码(key):7a8s6v12idv9ref2kg3i2g6f430y7zkp 
    //您账户的合作者身份ID(partnerID):2088002272589021 
    [TestFixture]
    public class TestAliPay
    {
        AliPay ap;
        [TestFixtureSetUp]
        public void SetUp()
        {
            ap = new AliPay();
 
        }

        [Test]
        public void TestBuyService()
        {
            AliPay ap = new AliPay();
            DigitalGoods bp = new DigitalGoods("create_digital_goods_trade_p","2088002272589021","7a8s6v12idv9ref2kg3i2g6f430y7zkp","MD5","卡","2",22.5m,1,null,"hao_ding2000@yahoo.com.cn");
            bp._Input_Charset = "GBK";
            //ap.BuyService("https://www.alipay.com/cooperate/gateway.do?", bp);
        }
        [Test]
        public void VerifyNotify()
        {
            AliPay ap = new AliPay();
            Verify v = new Verify("notify_verify","2088002272589021","ddd");
            //ap.VerifyNotify("https://www.alipay.com/cooperate/gateway.do", v);
        }
        [Test]
        public void TestParseNotify()
        {
            NotifyEventArgs dn = new NotifyEventArgs();
            NameValueCollection nv = new NameValueCollection();
            nv.Add("Notify_Type", "dd");
            nv.Add("Notify_Id", "cc");
            nv.Add("Total_Fee", "33.3");
            nv.Add("Price","22");
            nv.Add("Gmt_Create","2005-05-06");
            //ap.ParseNotify(nv,dn);

        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -