╭───────────────────────╮
────┤ 支付宝代码示例结构说明 ├────
╰───────────────────────╯
接口名称:支付宝即时到账交易接口(create_direct_pay_by_user)
代码版本:3.4
开发语言:PHP 5.0
版 权:支付宝(中国)网络技术有限公司
制 作 者:支付宝技术部技术支持组
联系方式:https://support.open.alipay.com/alipay/support/index.htm
免责声明:DEMO仅供参考,实际开发中需要结合具体场景修改使用。
─────────────────────────────────
───────
代码文件结构
───────
create_direct_pay_by_user-php-UTF-8
│
├lib┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈类文件夹
│ │
│ ├alipay_core.function.php ┈┈┈┈┈┈支付宝接口公用函数文件
│ │
│ ├alipay_notify.class.php┈┈┈┈┈┈┈支付宝通知处理类文件
│ │
│ ├alipay_submit.class.php┈┈┈┈┈┈┈支付宝各接口请求提交类文件
│ │
│ └alipay_md5.function.php┈┈┈┈┈┈┈支付宝接口MD5函数文件
│
├log.txt┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈日志文件
│
├alipay.config.php┈┈┈┈┈┈┈┈┈┈┈┈基础配置类文件
│
├alipayapi.php┈┈┈┈┈┈┈┈┈┈┈┈┈┈支付宝接口入口文件
│
├notify_url.php ┈┈┈┈┈┈┈┈┈┈┈┈┈服务器异步通知页面文件
│
├return_url.php ┈┈┈┈┈┈┈┈┈┈┈┈┈页面跳转同步通知文件
│
├cacert.pem ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈用于CURL中校验SSL的CA证书文件
│
└readme.txt ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈使用说明文本
※注意※
1、必须开启curl服务
(1)使用Crul需要修改服务器中php.ini文件的设置,找到php_curl.dll去掉前面的";"即可
(2)文件夹中cacert.pem文件请务必放置到商户网站平台中(如:服务器上),并且保证其路径有效,提供的代码demo中的默认路径是当前文件夹下——getcwd().'\\cacert.pem'
2、需要配置的文件是:
alipay.config.php
notify_url.php
return_url.php
curl、XML解析方法需您自行编写代码。
─────────
类文件函数结构
─────────
alipay_core.function.php
function createLinkstring($para)
功能:把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
输入:Array $para 需要拼接的数组
输出:String 拼接完成以后的字符串
function createLinkstringUrlencode($para)
功能:把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串,并对参数值urlencode
输入:Array $para 需要拼接的数组
输出:String 拼接完成以后的字符串
function paraFilter($para)
功能:除去数组中的空值和签名参数
输入:Array $para 签名参数组
输出:Array 去掉空值与签名参数后的新签名参数组
function argSort($para)
功能:对数组排序
输入:Array $para 排序前的数组
输出:Array 排序后的数组
function logResult($word='')
功能:写日志,方便测试(看网站需求,也可以改成存入数据库)
输入:String $word 要写入日志里的文本内容 默认值:空值
function getHttpResponsePOST($url, $cacert_url, $para, $input_charset = '')
功能:远程获取数据,POST模式
输入:String $url 指定URL完整路径地址
String $cacert_url 指定当前工作目录绝对路径
Array $para 请求的数据
String $input_charset 编码格式。默认值:空值
输出:String 远程输出的数据
function getHttpResponseGET($url, $cacert_url)
功能:远程获取数据,GET模式
输入:String $url 指定URL完整路径地址
String $cacert_url 指定当前工作目录绝对路径
输出:String 远程输出的数据
function charsetEncode($input,$_output_charset ,$_input_charset)
功能:实现多种字符编码方式
输入:String $input 需要编码的字符串
String $_output_charset 输出的编码格式
String $_input_charset 输入的编码格式
输出:String 编码后的字符串
function charsetDecode($input,$_input_charset ,$_output_charset)
功能:实现多种字符解码方式
输入:String $input 需要解码的字符串
String $_output_charset 输出的解码格式
String $_input_charset 输入的解码格式
输出:String 解码后的字符串
┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉
function md5Sign($prestr, $key)
功能:MD5签名
输入:String $prestr 待签名数据
String $key 私钥
输出:String 签名结果
function md5Verify($prestr, $sign, $key)
功能:MD5验签
输入:String $data 待签名数据
String $sign 签名结果
String $key 私钥
输出:bool 验证结果
┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉
alipay_notify.class.php
function verifyNotify()
功能:对notify_url的认证
输出:Bool 验证结果:true/false
function verifyReturn()
功能:对return_url的认证
输出:Bool 验证结果:true/false
function getSignVeryfy($para_temp, $sign)
功能:获取返回时的签名验证结果
输入:Array $para_temp 通知返回来的参数数组
String $sign 支付宝返回的签名结果
输出:Bool 获得签名验证结果
function getResponse($notify_id)
功能:获取远程服务器ATN结果,验证返回URL
输入:String $notify_id 通知校验ID
输出:String 服务器ATN结果
┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉
alipay_submit.class.php
function buildRequestMysign($para_sort)
功能:生成要请求给支付宝的参数数组
输入:Array $para_sort 已排序要签名的数组
输出:String 签名结果
function buildRequestPara($para_temp)
功能:根据反馈回来的信息,生成签名结果
输入:Array $para_temp 请求前的参数数组
输出:String 要请求的参数数组
function buildRequestParaToString($para_temp)
功能:根据反馈回来的信息,生成签名结果
输入:Array $para_temp 请求前的参数数组
输出:String 要请求的参数数组字符串
function buildRequestForm($para_temp, $method, $button_name)
功能:建立请求,以表单HTML形式构造(默认)
输入:Array $para_temp 请求前的参数数组
String $method 提交方式。两个值可选:post、get
String $button_name 确认按钮显示文字
输出:String 提交表单HTML文本
function query_timestamp()
功能:用于防钓鱼,调用接口query_timestamp来获取时间戳的处理函数
输出:String 时间戳字符串
┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉
──────────
出现问题,求助方法
──────────
如果在集成支付宝接口时,有疑问或出现问题,可使用下面的链接,提交申请。
https://support.open.alipay.com/alipay/support/index.htm
我们会有专门的技术支持人员为您处理
没有合适的资源?快使用搜索试试~ 我知道了~
PHP实例开发源码—CMS学校建站系统(含小程序).zip
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共727个文件
png:179个
php:99个
js:80个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 4 浏览量
2022-11-22
03:55:09
上传
评论
收藏 8.44MB ZIP 举报
温馨提示
PHP实例开发源码—CMS学校建站系统(含小程序).zip
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/GIF.png)
共 727 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/ace77722cc904668be9c7ee0feb247ba_dwf1354046363.jpg!1)
![avatar-vip](https://csdnimg.cn/release/downloadcmsfe/public/img/user-vip.1c89f3c5.png)
易小侠
- 粉丝: 6508
- 资源: 9万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- anaconda安装Web-ma笔记
- 酷狗top500数据分析完整
- 天气数据爬虫以及可视化分析
- unity shadergraph 特效案例del-for-network-ids-mas开发笔记
- 用户空间操作I2C适配器从而与I2C设备通信
- 2_base.apk.1.1
- 32位alu设计实验logisim-ma开发笔记
- Tangram-ES 0.17.1 64位 Debug/Release版 基于OpenGL地图渲染引擎
- 2018 各系统CNC 数据采集方法-5718b19bb868a98271fe910ef12d2af90342a827.pdf
- 【知识付费小程序源码】可开激励广告流量主+虚拟资源变现+搭建教程.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)