simple-admin-pay-api

command module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 9 Imported by: 0

README

支付接入

项目介绍

本项目是一个支付接入项目,目前支持微信支付和支付宝支付,后续会支持更多的支付渠道。

1. 第一步,配置支付渠道

  1. pay-rpc的etc/pay.yaml(./internal/logic/app)中配置支付

images1

  • 支付结果的回调地址:这里因为我们在本地演示,所以使用了 127.0.0.1 IP 地址,如果你部署到服务器上,要设置服务器可调用到的 IP 地址。
  • 本项目使用 asynq pub/sub,asynq推荐使用 Simple Admin Job添加消息者,有可以参照fork pay-job分支示例
  • 如果回调地址是本地最好配置内网穿透,否则微信无法访问到回调地址,可以使用贝锐花生壳进行内网穿透,具体的可以参考花生壳官方文档

微信支付测试

支付宝支付测试

@Kevin

License

MIT © Kevin-2023

Documentation

Overview

pay

Description: pay service

Schemes: http, https
Host: localhost:9107
BasePath: /
Version: 0.0.1
SecurityDefinitions:
  Token:
    type: apiKey
    name: Authorization
    in: header
Security:
    - Token: []
Consumes:
  - application/json

Produces:
  - application/json

swagger:meta

Directories

Path Synopsis
internal
handler
Code generated by goctl.
Code generated by goctl.
svc
types
Code generated by goctl.
Code generated by goctl.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL