Giter Site home page Giter Site logo

zppeter / alipay.aopsdk.core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dotnetcore/alipay.aopsdk.core

0.0 1.0 0.0 1.34 MB

支付宝(Alipay)服务端SDK AopSdk,修改自官方最新版本:113。采用.NET Standard 2.0,支持.NET Core 2.0,与官方SDK接口完全相同。完全可以按照官方文档进行开发。不仅仅支持支付,官方SDK支持的功能本SDK全部支持用法几乎一样。

License: MIT License

C# 100.00%

alipay.aopsdk.core's Introduction

Alipay.AopSdk.Core

组件名 说明 版本号
Alipay.AopSdk.Core 服务端SDK,封装了支付宝开放平台的所有API Latest version
Alipay.AopSdk.F2FPay 当面付SDK,提供条码支付、扫码支付能力 Latest version
Alipay.AopSdk.AspnetCore 服务端SDK的ASP.NET Core组件,为了能更好配合ASP.NET Core 使用 Latest version
Alipay.AopSdk.F2FPay.AspnetCore 当面付SDK的ASP.NET Core组件,为了能更好配合ASP.NET Core 使用 Latest version

一直维护中,希望大家多多支持,多多建议

支付宝(Alipay)服务端SDK AopSdk,修改自官方最新版本:113。采用.NET Standard 2.0,支持.NET Core 2.0,与官方SDK接口完全相同。完全可以按照官方文档进行开发。不仅仅支持支付,官方SDK支持的功能本SDK全部支持,用法几乎一样。由于精力有限,所以只做了几个Demo,但是其他功能可以参照官方的Demo来使用。可以使用官方文档中的示例代码。如有问题请联系QQ501232752

ASP.NET Core

Alipay.AopSdk.AspnetCore

public void ConfigureServices(IServiceCollection services)
{
    services.AddAlipay(options =>
	        {
		        options.AlipayPublicKey = "支付宝公钥";
		        options.AppId = "应用ID";
		        options.CharSet = "密钥编码";
		        options.Gatewayurl = "支付网关";
		        options.PrivateKey = "商家私钥";
		        options.SignType = "签名方式 RSA/RSA2";
		        options.Uid = "商户ID";
	        });
}

使用:

private readonly IAlipayService  _alipayService;

public xxxController(IAlipayService alipayService)
{
	_alipayService = alipayService;

}

_alipayService.Execute();

Alipay.AopSdk.F2FPay.AspnetCore

public void ConfigureServices(IServiceCollection services)
{
    services.AddAlipay(options =>
	        {
		        options.AlipayPublicKey = "支付宝公钥";
		        options.AppId = "应用ID";
		        options.CharSet = "密钥编码";
		        options.Gatewayurl = "支付网关";
		        options.PrivateKey = "商家私钥";
		        options.SignType = "签名方式 RSA/RSA2";
		        options.Uid = "商户ID";
	        }).AddAlipayF2F();
}

使用:

private readonly IAlipayF2FService _alipayF2FService;

public xxxController(IAlipayF2FService alipayF2FService)
{
	_alipayF2FService = alipayF2FService;

}

_alipayF2FService.Execute();

具体用法可以看Demo

更新日志:

  • 2017-11-3 添加对ASP.NET Core的支持

  • 2017-10-30 修复在Linux上的BUG

官方文档:

Demo

Doc

alipay.aopsdk.core's People

Contributors

stulzq avatar xland avatar

Watchers

James Cloos 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.