🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 官网DEMO地址 打开蚂蚁金服开放平台 https://openhome.alipay.com ,下载步骤 ![mark](http://qiniu.newthink.cc/blog/20170917-102042009.jpg) ## 官方DEMO的`config.php`配置 配置方法来源图(支付宝RSA2配置,请右键另存为图片放大查看) RSA私钥下载地址:https://doc.open.alipay.com/doc2/detail?treeId=58&articleId=103242&docType=1 ![mark](http://qiniu.newthink.cc/blog/20170917-014422942.jpg) ## 运行官方DEMO 我们将之架设在Linux系统上, 运行 `http://www.sxqibo.com/demo/alipay.trade.page.pay-PHP-UTF-8/` 得到如下界面 ![mark](http://qiniu.newthink.cc/blog/20170917-005700135.png) 点击“付款”,出现如下界面 ![mark](http://qiniu.newthink.cc/blog/20170917-010031448.png) 支付完成后如图所示: ![mark](http://qiniu.newthink.cc/blog/20170917-013736090.png) ## URL地址分析 ``` http://www.sxqibo.com/demo/alipay.trade.page.pay-PHP-UTF-8/return_url.php?total_amount=0.01&timestamp=2017-09-17+01%3A02%3A17&sign=PaeFCtXlLOdY10U04EI6ycwg3meRbCDW8HzmQtpnWsquskJWgGCxwl31zvpM%2Bpy3n9BW8LvSP5LhLDoe0XBkC9t7JRzAKgfnLPf48GLMFQHK3M%2BV%2BLnjZvgZ7%2B5B%2B9zH%2Btophns%2BatpL8WdueOR12Nb62jkA6XnRbUJhCoGUODZ1Ow9fWN8u8sgU5mjueL2SxHjvbsr2oL11G6gcyYUpPeIK0ahyBpUS3HKE2A62FkxTsoCjsGsV%2BqMSRM50iOZbKs7OImVEeEvHTVg5orI2%2FwQlPqlBk9nRBqcAEnjsgKBCFdvu8j%2ByIjQ64pmlVOPZgSJ%2Fr0rNx1Pry2SUiIP85A%3D%3D&trade_no=2017091721001004920264034436&sign_type=RSA2&auth_app_id=2017091408724714&charset=UTF-8&seller_id=2088821002087646&method=alipay.trade.page.pay.return&app_id=2017091408724714&out_trade_no=201791705949167&version=1.0 ``` 经过整理后的URL ``` http://www.sxqibo.com/demo/alipay.trade.page.pay-PHP-UTF-8/return_url.php? total_amount=0.01& timestamp=2017-09-17+01%3A02%3A17& sign=PaeFCtXlLOdY10U04EI6ycwg3meRbCDW8HzmQtpnWsquskJWgGCxwl31zvpM%2Bpy3n9BW8LvSP5LhLDoe0XBkC9t7JRzAKgfnLPf48GLMFQHK3M%2BV%2BLnjZvgZ7%2B5B%2B9zH%2Btophns%2BatpL8WdueOR12Nb62jkA6XnRbUJhCoGUODZ1Ow9fWN8u8sgU5mjueL2SxHjvbsr2oL11G6gcyYUpPeIK0ahyBpUS3HKE2A62FkxTsoCjsGsV%2BqMSRM50iOZbKs7OImVEeEvHTVg5orI2%2FwQlPqlBk9nRBqcAEnjsgKBCFdvu8j%2ByIjQ64pmlVOPZgSJ%2Fr0rNx1Pry2SUiIP85A%3D%3D& trade_no=2017091721001004920264034436& sign_type=RSA2& auth_app_id=2017091408724714& charset=UTF-8& seller_id=2088821002087646& method=alipay.trade.page.pay.return& app_id=2017091408724714& out_trade_no=201791705949167& version=1.0 ``` ## 官方DEMO目录结构 ![mark](http://qiniu.newthink.cc/blog/20170918-010529787.png)