GithubHelp home page GithubHelp logo

wechatpayment.sdk's Introduction

WechatPayment.SDK

C#版微信支付SDK(基于.NET Framework 4.0) ###目前已支持的API情况

  1. 统一下单API
  2. 订单查询API
  3. 申请退款API

###客户端调用SDK涉及的命名空间

  1. WechatPayment.SDK
    该命名空间下是微信支付调用的核心类:WechatPaymentConfig和WechatPaymentClient
  2. WechatPayment.SDK.Request
    该命名空间下是微信支付对应的请求类
  3. WechatPayment.SDK.Response
    该命名空间下是微信支付对应的响应类,一个Request类对应一个Response类
  4. WechatPayment.SDK.Notify
    该命名空间下是微信支付异步回调对应的通知类

###如何使用SDK

  1. 初始化化配置参数(例如ASP.NET在Global.asax的Application_Start中配置)
   
      WechatPaymentConfig.Initalize(
         secret: "Test1", //商户平台密匙
         appId: "Test1",  //公众号Id
         mchId: "Test1",  //商户Id
         certFilePath: "" //退款API需使用的证书路径
      );
   
  1. 执行请求模板
   
      //调用订单查询API
      OrderQueryRequest request = new OrderQueryRequest
      {
         TradeNum = "TEMP"
      };
      OrderQueryResponse response = WechatPaymentClient.Excute(request);
   

wechatpayment.sdk's People

Contributors

teroy avatar

Watchers

James Cloos avatar DY avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.