• This repository has been archived on 31/Aug/2020
  • Stars
    star
    282
  • Rank 146,549 (Top 3 %)
  • Language
    HTML
  • License
    MIT License
  • Created about 7 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

支付宝PC网站支付、扫码支付 演示项目,实现支付、支付同步回调、支付异步通知、订单查询、退款、退款查询、订单关闭、扫码支付功能。采用支付宝服务端SDK:Alipay.AopSdk.Core,使用ASP.NET Core MVC 。

Jenkins

Alipay.Demo.PCPayment

支付宝PC网站支付Demo,实现支付、支付同步回调、支付异步通知、订单查询、退款、退款查询、订单关闭功能。采用支付宝服务端SDK:Alipay.AopSdk.Core,使用ASP.NET Core MVC 2.1。演示地址 https://zfbdemo.xcmaster.com

一.运行

配置的 公钥、私钥 直接填写字符串,不能带pem格式。如果支付接口没用申请下来,可以使用支付宝沙箱来测试。

打开alipay.json,按照字段说明写入信息:

"Alipay": {
    "AlipayPublicKey": "",
    "AppId": "",
    "CharSet": "UTF-8",
    "Gatewayurl": "https://openapi.alipaydev.com/gateway.do",
    "PrivateKey": "",
    "SignType": "RSA2",
    "Uid": ""
  }
  • AlipayPublicKey:支付宝公钥。由支付宝提供,可到后台获取。
  • AppId:应用ID。由支付宝提供,可到后台获取。
  • CharSet:密钥编码,一般为 UTF-8
  • Gatewayurl:支付网关url。
  • PrivateKey:商户私钥,由我们自己生成。格式为pkcs1,长度2048或者1024,推荐2048。
  • SignType:签名类型,2048长度密钥请使用RSA2,1024使用RSA
  • Uid:商户ID。由支付宝提供,可到后台获取。

配置好以后就可以直接启动了。

演示地址 https://zfbdemo.xcmaster.com

二.密钥生成

下载本项目源码,打开tool文件夹,解压keygen.zip压缩包,运行start.bat即可在keys目录下生成公钥和私钥,长度为2048。

这里生成的公钥和私钥,只需将私钥配置到alipay.json文件中,公钥需要设置到支付宝后台。然后设置SignTypeRSA2。配置文件中的公钥配置,不是我们自己生成的这个,需要到支付宝后台获取,这里需要注意一下。

1526457521967

三.使用帮助

若遇到“私钥错误”请务必仔细确认自己的配置。

四.功能演示

  • 2017-10-11新增扫码支付

  • 支付创建

  • 支付

  • 输入支付密码

  • 支付成功

  • 支付成功同步回调

  • 订单查询

  • 退款

  • 退款查询

  • 订单关闭

异步通知已经实现了的,但是由于没有公网ip和花生壳等,没有测试,以后测试了加图

More Repositories

1

azure-openai-proxy

Azure OpenAI Service Proxy. Convert OpenAI official API request to Azure OpenAI API request. Support GPT-4,Embeddings,Langchain. Adapter from OpenAI to Azure OpenAI.
Go
1,337
star
2

IdentityServer4.Samples

Samples for IdentityServer4,use .net core 2.0
JavaScript
610
star
3

RSAUtil

.NET Core RSA algorithm using the help tool.It supports data encryption, decryption, signature and verification signature.It supports three key formats, namely: xml, pkcs1, pkcs8.It also supports key conversion for these three formats.Last also support pem formatting.
C#
281
star
4

dotnet-cnblogs-tool

博客园文章快捷发布工具
C#
173
star
5

IPTools

Querying IP address information, support longitude and latitude. 快速查询IP信息,支持国内和国外IP信息查询,支持查询经纬度。
C#
168
star
6

HttpCode.Core

简单、易用、高效 一个有态度的开源.Net Http请求框架!可以用制作爬虫,api请求等等。
C#
162
star
7

RSAExtensions

.NET Core >=3.0 & .NET Standard >=2.2, RSA Enhanced Extension. Provide XML format key import and export. Unified export and import of PKCS # 1, PKCS # 8, and XML formats. Supports PKCS # 1, PKCS # 8 PEM import and export.
C#
155
star
8

SolutionRenamer

Fast rename solution,using .net core 2.0
C#
145
star
9

Hangfire.MySql.Core

Hangfire Mysql storage components, support for. NET core 1.1,. NET core 2.0,. NET standard 2.0. Based on Hangfire.MySqlStorage, some bugs were fixed and .NET standard 2.0 support was provided.
C#
85
star
10

ToolGood.Words.Core

一款高性能敏感词(非法词/脏字)检测过滤组件,附带繁体简体互换,支持全角半角互换,汉字转拼音,模糊搜索等功能。支持.net standard 2.0
C#
73
star
11

DotnetCore.RSA

.NET Core use RSA examples,implement RSA/RSA2's Encrypt,Decrypt,Sign,Verify Sign.Use OpenSsl's private/public key.
C#
71
star
12

UrlFirewall

UrlFirewall is a lightweight, fast filtering middleware for http request urls.It supports blacklist, whitelist mode.Supports persisting filter rules to any media.You can use it in webapi, gateway, etc.
C#
66
star
13

BlogDemos

C#
63
star
14

NConsul

.NET API for Consul (http://www.consul.io/)
C#
61
star
15

BlogTools

博文快速多渠道发布工具包,支持博客园、阿里云栖社区、腾讯云+社区、慕课网手记 4种渠道。
C#
38
star
16

AspNetCore.Authentication.ApiToken

A asp.net core webapi token authentication & generator open source library.
C#
32
star
17

DotnetRSA

DotnetRSA is a .NET Core Global Tool.Dotnet RSA Tool can help you generate xml pkcs1, pkcs8 three kinds of format keys, and supports three types of mutual conversion.
C#
30
star
18

dotnetcore-image

Solution of .NET Core GDI+(Image) on Linux/Docker
C#
22
star
19

QRConsole

Print QRCode to console.
C#
18
star
20

NZookeeper

A zookeeper client library based on ZookeeperEx,easily use for Zookeeper.
C#
15
star
21

ClickHouse.DapperExtensions

Make ClickHouse available to Dapper
C#
15
star
22

FreeCert

Fast and easy generation of HTTPS certificate library (Let's Encrypt ACME).
C#
13
star
23

EntityFrameworkCore2Demo

.NET Core控制台、ASP.NET Core程序使用EntityFrameworkCore 2.0示例,包括CodeFirst、DBFirst。详细文章介绍请看:http://www.cnblogs.com/stulzq/p/7717873.html
C#
13
star
24

Influxdb.BulkInsert

Influxdb asynchronous, fast and bulk insert components.Using HTTP or UDP protocol.Influxdb 异步、快速、批量插入组件,支持http和udp协议。
C#
12
star
25

CnBlogSubscribeTool

CnBlogSubscribeTool can crawl blog home page data at regular intervals.
C#
11
star
26

DynamicDns

动态DNS,支持多个云厂商。
C#
10
star
27

ChinaRegionCode

中华人民共和国县以上行政区划代码数据
C#
10
star
28

AspNetCoreHighConcurrency.Sample

AspNetCore High Concurrency Simple Code.Describes how to use distributed locking based on redis. Lock-free and queued commodity inventory operations.
C#
9
star
29

go-linecount

Fast text file line count tool.
Go
9
star
30

kong-plugin-rate-limiting-ex

Rate Limiting Ex is the rate limit plugin for kong gateway.Based on official rate-limiting plugin, I added a property that can be customized to get the request header for the ip address.
Lua
9
star
31

hexo-deploy-agent

Go
9
star
32

ClientUpdate

Update you c/s software
C#
8
star
33

EntityFramework-Core-Migrator

EntityFramework Core Migrator
C#
7
star
34

StudyRoad

7
star
35

MonitoringSystem

prometheus & grafana help doc.
6
star
36

JenkinsSharedLibraries

Jenkins Shared Libraries
Groovy
4
star
37

hexo-statistics

Go
4
star
38

DotNetActionsExample

.NET Github Action Example
C#
4
star
39

Damocles

Open source permission system.Under development now.
C#
4
star
40

MailHelper

C#
3
star
41

blog-demo-go

my blog's article demo
Go
3
star
42

WhoisClient

A simple domain whois lookup library.
C#
3
star
43

Visual-Studio-2013-Theme-Editor

Visual Studio 2013 Theme Editor
C#
2
star
44

TestJenkins

2
star
45

Zeta

A mysterious code repository.
C#
2
star
46

stulzq

2
star
47

WindowsRemoteDesktopCleanTool

Clean up windows remote desktop records
C#
2
star
48

leetcode

1
star
49

Algorithms

C#
1
star
50

vuepress-sample

JavaScript
1
star
51

add-license--header

Easily add a License header to the source code.
1
star