当前位置:网站首页>Alipay open platform
Alipay open platform
2022-06-13 03:40:00 【Footsteps 6978】
Open platform :https://openhome.alipay.com
Create an :

Create an :

Add capability : Batch signing , Go to the merchant center - Account Center -APPID binding - Add binding APPID;

APP payment :

Message service :

1, Key tool : Generate the application private key - Application of public key ;2, Fill in the public key character - Generate the corresponding Alipay public key

Interface signature mode : Set up

Interface signature mode : see -> Countersigned change
go online :
=> You can test ........................
------------------------------------------------------------------
Sign in - Alipay :https://mrchportalweb.alipay.com/user/home Business Center
https://business.alipay.com/user/home

Buy now - place order - payment :POST /api/order/add
Param:
'user_id' = '56aa4b85bf5c25c58b07d8e96c04d5cb'
'product_sn' = '0c441e84213eb6fd7c3d7c4265b79b04'
'attr_value_id' = '15139'
'address_id' = 'f70a8c18e2691b1d865a4ab932fb57b7'
'buy_num' = '1'
'pay_type' = '1'
'token' => '7a3cd895751dbdf4a095bc6c091c285a'
1, Create order , Business processing
2, docking alipay_sdk
NotifyUrl:
http://host/api/notify/orderalipay
Bizcontent:
{
"body":" Distribution Centre ",
"subject": " Distribution Centre ",
"out_trade_no": "202111209cnm55",
"timeout_express": "30m",
"total_amount": "0.1",
"product_code":"QUICK_MSECURITY_PAY"
}
Return:
{
"error_code": 0,
"reason": "202111209cnm55",
"result": "alipay_sdk=alipay-sdk-php-20161101&app_id=2021002146696679&biz_content=***out_trade_no*****total_amount%22%3A+%220.10%22%2C%22product_code%22%3A%22QUICK_MSECURITY_PAY%22%7D&charset=UTF-8&format=json&method=alipay.trade.app.pay¬ify_url=http%3A%2F%2Fhost%2Fapi%2Fnotify%2Forderalipay&sign_type=RSA2×tamp=2021-11-20+15%3A49%3A30&version=1.0&sign=QtLNMAMQgh4Dt6PqpdayYauQgK8MW304WXP%2F4kVjtjpykGirG4dh1ZTXs2nM1kNCNVa3FD7%2F%2BKOwAeLkeQKjZhpIks96sR7%2FGMdwpdUsH3PWGX%2Fq9vw8uzF2sCVo2c8ndQP6OlQ0vE2jAz3UBwGCDNaasch1C%2F2YTVSpstup2tSFmjhWTYJbehI3bnIXok9efN%2F68yWOgjtkoKnALQVDOELZPB%2F2oKg%2Fr7GYRGB6DP00lCsLDCtPhQ1ZPqVvoWVHwUdc8Z41wVGkBedEPWkThBGII%2FcvQkztMWo5KK%2FAhHUPJEdboXXYFdrg0Si8JSF1YsS8uB%2B3ioUGHwzxHXMQog%3D%3D"
}【 Pay later 】:POST /api/order/alipay
Param:
"shopname"=" Distribution Centre "
"union_sn"="202111209cnm55"
"payprice"="0.10"
"token"="7a3cd895751dbdf4a095bc6c091c285a"
{
"error_code": 0,
"reason": "202111209cnm55",
"result": "alipay_sdk=alipay-sdk-php-20161101&app_id=2021002146696679&biz_content=***out_trade_no*****total_amount%22%3A+%220.10%22%2C%22product_code%22%3A%22QUICK_MSECURITY_PAY%22%7D&charset=UTF-8&format=json&method=alipay.trade.app.pay¬ify_url=http%3A%2F%2Fhost%2Fapi%2Fnotify%2Forderalipay&sign_type=RSA2×tamp=2021-11-20+15%3A49%3A30&version=1.0&sign=QtLNMAMQgh4Dt6PqpdayYauQgK8MW304WXP%2F4kVjtjpykGirG4dh1ZTXs2nM1kNCNVa3FD7%2F%2BKOwAeLkeQKjZhpIks96sR7%2FGMdwpdUsH3PWGX%2Fq9vw8uzF2sCVo2c8ndQP6OlQ0vE2jAz3UBwGCDNaasch1C%2F2YTVSpstup2tSFmjhWTYJbehI3bnIXok9efN%2F68yWOgjtkoKnALQVDOELZPB%2F2oKg%2Fr7GYRGB6DP00lCsLDCtPhQ1ZPqVvoWVHwUdc8Z41wVGkBedEPWkThBGII%2FcvQkztMWo5KK%2FAhHUPJEdboXXYFdrg0Si8JSF1YsS8uB%2B3ioUGHwzxHXMQog%3D%3D"
}AliPay Callback :POST /api/notify/orderalipay
'gmt_create' => '2021-11-20 15:11:33',
'charset' => 'UTF-8',
'seller_email' => '[email protected]',
'subject' => ' Distribution Centre ',
'sign' => 'KDWeGo5yMrjtj/xfBgi9JMensm5oEFgidxEQlEEEMUdqWsIyi/hXI6pE/pV9WCPRFWXPnHd/PewkTRTA6RVKAoQIfTIGThBKPL8woxKrODk7C1ioY02fgyMvwh+cANR1WjfWESK27JX/lnQMOo1cTLOs+IJazLbAhPH0IJZYeFSc4egZk/wwkVX2q9l7Kh9JnlvPpFkwzc1vG7WwbfW4zMivLJXqqBctdU/ypORivaq/mcXx63D6LcMcxN27u0+Yk00tnD4Z+6npOg66vlH3I6v5nDteHCWpKObnKISez85/zZgaPn/jvhoNpAhiPGxzsccFhhhEXzcyk1Btokcogw==',
'body' => ' Distribution Centre ',
'buyer_id' => '2088212636652212',
'invoice_amount' => '0.10',
'notify_id' => '2021112000222141134052211407352722',
'fund_bill_list' => '[{"amount":"0.10","fundChannel":"PCREDIT"}]',
'notify_type' => 'trade_status_sync',
'trade_status' => 'TRADE_SUCCESS',
'receipt_amount' => '0.10',
'app_id' => '2021002146696978',
'buyer_pay_amount' => '0.10',
'sign_type' => 'RSA2',
'seller_id' => '2088141101549482',
'gmt_payment' => '2021-11-20 15:11:33',
'notify_time' => '2021-11-20 15:11:34',
'version' => '1.0',
'out_trade_no' => '202111209cnm55',
'total_amount' => '0.10',
'trade_no' => '2021112022001452211426590331',
'auth_app_id' => '2021002146696679',
'buyer_logon_id' => '188****6978',
'point_amount' => '0.00',
$flag = $aop->rsaCheckV1($_POST, NULL, $signType);
// Business processing
return 'success';refund :POST /api/order/refund
Param:
'order_sn' => '20211120173931'
'token' => '7a3cd895751dbdf4a095bc6c091c285a'
{
"alipay_trade_refund_response":{
"code":"10000",
"msg":"Success",
"buyer_logon_id":"188******78",
"buyer_user_id":"2088212636652212",
"fund_change":"Y",
"gmt_refund_pay":"2021-11-20 15:26:02",
"out_trade_no":"20211120IAxz22",
"refund_fee":"0.10",
"send_back_fee":"0.00",
"trade_no":"2021112022001452211426590331"
},
"sign":"Acjge41g89fcoIxSoay9zaTj9gFKoXXEMOGBfJfy6OcroGxDXr59y2eNuMTyJZkdmpUSQa4LWofItgM04DKJXEcnY3m\/d3sHM4+s4T93nSEOJzaL6M0Yv+y4uipUeslIxiZarXleLbihoxsw4cvTyCDDx06CFNJkpGlBKiCgQvmHnKYZmMT0HZgtfwKEAcBozzjAEhhyORVIJGTHXIZeK\/MDzgBNWIR0LIxyWQtrkG9VY2jJ0CVGKmzycKy7rewd9HAr+bAEoj3fFA28eBT5bD3Jf09aPzpNeMRmEltsuDOInGGGvTq61h4T+BQpX9P43Ybzi503AMREtvXm\/9T3Gw=="
}
// Business processing AliPay Callback :POST /api/notify/orderalipay
'gmt_create' => '2021-11-20 16:11:33',
'charset' => 'UTF-8',
'seller_email' => '[email protected]',
'subject' => ' Distribution Centre ',
'sign' => 'S8roOC2yl0QpUkIFrB0btWnOGCMsYiQ4IXvvHzLLrjwPnGGyENoxhSiazmaPvorvyYZ8c2wRqUk3d8vyixRYxABdRday/OleoqXXLLSCW2YtP71QLKXc3N5qcnqAEV1ZwgvU/r4SBajVppPHvvy5OMTNAiJLvMSpoz/OuzLwy+WVO++TjX+ZFXH0TJJ1dD9ck/W33P4AFSa9V1eEvNu5zVXOz9Zi6oy25WVxjsvZlVb7Dne3czRqnetQh3EbUawkhaM3/t6cfedRhJV65Ql4x4OGA/KreMeawMfjh7YFCB+tvPw6fxAxFRgerwhM+qWi3zw9jG9sIQlMSvB4KP80oQ==',
'body' => ' Distribution Centre ',
'buyer_id' => '2088212636652212',
'notify_id' => '2021112000222142603052211407305666',
'notify_type' => 'trade_status_sync',
'trade_status' => 'TRADE_CLOSED',
'app_id' => '2021002146696978',
'sign_type' => 'RSA2',
'seller_id' => '2088141101549482',
'gmt_payment' => '2021-11-20 16:11:33',
'notify_time' => '2021-11-20 16:26:03',
'gmt_refund' => '2021-11-20 16:26:02.637',
'out_biz_no' => '202111209cnm55',
'version' => '1.0',
'out_trade_no' => '202111209cnm55',
'total_amount' => '0.10',
'refund_fee' => '0.10',
'trade_no' => '2021112022001452211426590331',
'auth_app_id' => '2021002146696978',
'gmt_close' => '2021-11-20 16:26:02',
'buyer_logon_id' => '188****6978',边栏推荐
- YoloV5-Face+TensorRT:基于WIN10+TensorRT8.2+VS2019得部署
- (9) Explain broadcasting mechanism in detail
- Complete set of Stata code commands: follow and verify do files, common Stata commands, code collection, panel entropy method
- LVS four - tier Load Balancing Cluster (5) LVS Overview
- Azure SQL db/dw series (14) -- using query store (3) -- common scenarios
- Display line number in MySQL query result
- Spark optimization - data skew solution
- Spark Optimization -- differences and policy selection of RDD cache (cache, persist, checkpoint)
- Doris data import broker load
- 年金险产品保险期满之后能领多少钱?
猜你喜欢

Use cypher to get the tree of the specified structure

2000-2019 enterprise registration data of provinces, cities and counties in China (including longitude and latitude, number of registrations and other multi indicator information)

LVS四层负载均衡集群(5)LVS概述

SQL injection case demonstration and preventive measures

MASA Auth - SSO与Identity设计

Cross border M & a database: SDC cross border database, Thomson database, A-share listed company M & a database and other multi index data (4w+)

Workflow of driver of spark kernel (stage division, task division, task scheduling)

Spark optimization - data skew solution

Masa auth - overall design from the user's perspective

Understand the difference between reducebykey and groupbykey in spark
随机推荐
Masa auth - overall design from the user's perspective
Onnx+tensorrt+yolov5: yolov5 deployment based on trt+onnx 1
Azure SQL db/dw series (9) -- re understanding the query store (2) -- working principle
【测试开发】文件压缩项目实战
LeetCode185. All employees with the top three highest wages in the Department (MySQL)
Solve the error in CONDA installation PyMOL
Doris data import broker load
Workflow of driver of spark kernel (stage division, task division, task scheduling)
On interests and hobbies
MySQL and PostgreSQL installation subtotal
The latest collation of the number of years of education per capita in the country and provinces -1989-2020- includes the annual original data, calculation process and result summary
ONNX+TensorRT+YoloV5:基于trt+onnx得yolov5部署1
【测试开发】博客系统——Loadrunner性能测试(发布博客功能 基准测试)
MASA Auth - SSO與Identity設計
【测试开发】测试管理工具禅道的安装
[azure data platform] ETL tool (3) - azure data factory copy from local data source to azure
SQL injection case demonstration and preventive measures
Azure SQL db/dw series (10) -- re understanding the query store (3) -- configuring the query store
Use of file class
Quickly obtain the attributes of the sub graph root node
