第四节 支付宝支付第三方接口

亮子 2022-12-26 12:42:27 10557 0 0 0

支付宝支付:

1、获取订单号

# 获取订单号:GET方法
https://www.shenmazong.com/alipay/getOrderNo
  • 返回值:
{
	"success": true,
	"code": 0,
	"message": "操作成功",
	"data": "202210071138050001"
}

2、下单接口

# 下单接口:POST方法
https://www.shenmazong.com/alipay/postOrderObj
  • 请求参数
{
    "outTradeNo" : "202210062223100001",
    "description" : "产品描述",
    "amount" : 1,
    "attach" : "附加数据"
}
  • 返回值
{
	"success": true,
	"code": 0,
	"message": "操作成功",
	"data": "https://qr.alipay.com/bax03195p4vbuoxwvsiv0085"
}

3、订单查询

# 订单查询:GET方法
https://www.shenmazong.com/alipay/getOrderInfo?orderNo=202210062223100001
  • 返回值
{
	"success": true,
	"code": 0,
	"message": "操作成功",
	"data": {
		"orderId": "1578229054623961088",
		"orderNo": "202210071138050001",
		"userId": "0",
		"userName": "",
		"orderAmount": "1",
		"orderStatus": 1,
		"description": "产品描述",
		"attach": "附加数据",
		"delFlag": 0,
		"updateTime": "2022-10-07 03:41:43",
		"createTime": "2022-10-07 03:41:43"
	}
}
  • orderStatus 订单状态,0未支付1已支付2已取消
  • orderAmount 订单金额,单位为分