当前位置:网站首页>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: deployment based on win10+tensorrt8.2+vs2019
- Azure SQL db/dw series (12) -- using query store (1) -- report Introduction (1)
- Economic panel topic 1: panel data of all districts and counties in China - more than 70 indicators such as population, pollution and agriculture (2000-2019)
- Use of file class
- Application framework / capability blueprint
- Doris data import broker load
- Azure SQL db/dw series (14) -- using query store (3) -- common scenarios
- MySQL auto sort function deny_ rank() over()、rank() over()、row_ Num() over() usage and differences
- Cross border M & a database: SDC cross border database, Thomson database, A-share listed company M & a database and other multi index data (4w+)
- YoloV5-Face+TensorRT:基于WIN10+TensorRT8.2+VS2019得部署
猜你喜欢
Domestic zynq standalone pl-ps interrupt commissioning
Masa Auth - SSO and Identity Design
Brief introduction: distributed cap theory and base theory
MASA Auth - 从用户的角度看整体设计
2000-2019 enterprise registration data of all provinces, cities and counties in China (including longitude and latitude, registration number and other multi indicator information)
UDP connection map collection
look on? What is the case between neo4j and ongdb?
[azure data platform] ETL tool (7) - detailed explanation of ADF copy data
Simulink code generation: simple state machine and its code
[azure data platform] ETL tool (5) -- use azure data factory data stream to convert data
随机推荐
Simulink代码生成: 查表模块及其代码
19 MySQL database optimization methods
The most complete ongdb and neo4j resource portal in history
【测试开发】用例篇
MySQL auto sort function deny_ rank() over()、rank() over()、row_ Num() over() usage and differences
(9) Explain broadcasting mechanism in detail
swap()
An error is reported in the JDBC connection database: connection to 139.9.130.37:15400 referred
MySQL learning summary 12: system variables, user variables, definition conditions and handlers
SQL injection case demonstration and preventive measures
LeetCode 178. Score ranking (MySQL)
Complex network analysis capability based on graph database
look on? What is the case between neo4j and ongdb?
China Civil Aviation Statistical Yearbook (1996-2020)
Simulink代码生成: 简单状态机及其代码
MySQL 8.0 enables remote root user access and solves the problem of you are not allowed to create a user with Grant
MySQL group commit
Mobile communication exercises
Azure SQL db/dw series (11) -- re understanding the query store (4) -- Query store maintenance
C语言程序设计——从键盘任意输入一个字符串,计算其实际字符个数并打印输出,要求不能使用字符串处理函数strlen(),使用自定义子函数Mystrlen()实现计算字符个数的功能。