Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
00b7e427
ShopXO
项目概览
jcy2004x
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
00b7e427
编写于
7月 17, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
baidu
上级
afa9a5ce
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
196 addition
and
11 deletion
+196
-11
extend/payment/Biadu.php
extend/payment/Biadu.php
+193
-0
public/appmini/old/baidu/app.js
public/appmini/old/baidu/app.js
+1
-1
public/appmini/old/baidu/pages/goods-detail/goods-detail.js
public/appmini/old/baidu/pages/goods-detail/goods-detail.js
+0
-3
public/appmini/old/baidu/pages/index/index.js
public/appmini/old/baidu/pages/index/index.js
+0
-2
public/appmini/old/baidu/pages/user-order/user-order.swan
public/appmini/old/baidu/pages/user-order/user-order.swan
+1
-1
public/appmini/old/baidu/pages/user/user.js
public/appmini/old/baidu/pages/user/user.js
+0
-3
public/appmini/old/baidu/project.swan.json
public/appmini/old/baidu/project.swan.json
+1
-1
未找到文件。
extend/payment/Biadu.php
0 → 100644
浏览文件 @
00b7e427
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace
payment
;
/**
* 百度支付 - 新版本接口
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-19
* @desc description
*/
class
Alipay
{
// 插件配置参数
private
$config
;
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-17
* @desc description
* @param [array] $params [输入参数(支付配置参数)]
*/
public
function
__construct
(
$params
=
[])
{
$this
->
config
=
$params
;
}
/**
* 配置信息
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-19
* @desc description
*/
public
function
Config
()
{
// 基础信息
$base
=
[
'name'
=>
'百度'
,
// 插件名称
'version'
=>
'0.0.1'
,
// 插件版本
'apply_version'
=>
'不限'
,
// 适用系统版本描述
'apply_terminal'
=>
[
'pc'
,
'h5'
],
// 适用终端 默认全部 ['pc', 'h5', 'app', 'alipay', 'weixin', 'baidu']
'desc'
=>
'2.0版本,适用PC+H5,即时到帐支付方式,买家的交易资金直接打入卖家百度账户,快速回笼交易资金。 <a href="http://www.baidu.com/" target="_blank">立即申请</a>'
,
// 插件描述(支持html)
'author'
=>
'Devil'
,
// 开发者
'author_url'
=>
'http://shopxo.net/'
,
// 开发者主页
];
// 配置信息
$element
=
[
[
'element'
=>
'input'
,
'type'
=>
'text'
,
'default'
=>
''
,
'name'
=>
'appid'
,
'placeholder'
=>
'应用ID'
,
'title'
=>
'应用ID'
,
'is_required'
=>
0
,
'message'
=>
'请填写应用ID'
,
],
[
'element'
=>
'textarea'
,
'name'
=>
'rsa_public'
,
'placeholder'
=>
'应用公钥'
,
'title'
=>
'应用公钥'
,
'is_required'
=>
0
,
'rows'
=>
6
,
'message'
=>
'请填写应用公钥'
,
],
[
'element'
=>
'textarea'
,
'name'
=>
'rsa_private'
,
'placeholder'
=>
'应用私钥'
,
'title'
=>
'应用私钥'
,
'is_required'
=>
0
,
'rows'
=>
6
,
'message'
=>
'请填写应用私钥'
,
],
[
'element'
=>
'textarea'
,
'name'
=>
'out_rsa_public'
,
'placeholder'
=>
'百度公钥'
,
'title'
=>
'百度公钥'
,
'is_required'
=>
0
,
'rows'
=>
6
,
'message'
=>
'请填写百度公钥'
,
],
];
return
[
'base'
=>
$base
,
'element'
=>
$element
,
];
}
/**
* 支付入口
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-19
* @desc description
* @param [array] $params [输入参数]
*/
public
function
Pay
(
$params
=
[])
{
// 参数
if
(
empty
(
$params
))
{
return
DataReturn
(
'参数不能为空'
,
-
1
);
}
// 配置信息
if
(
empty
(
$this
->
config
))
{
return
DataReturn
(
'支付缺少配置'
,
-
1
);
}
return
DataReturn
(
'test'
,
-
1
);
}
/**
* 支付回调处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-19
* @desc description
* @param [array] $params [输入参数]
*/
public
function
Respond
(
$params
=
[])
{
$data
=
empty
(
$_POST
)
?
$_GET
:
array_merge
(
$_GET
,
$_POST
);
ksort
(
$data
);
// 参数字符串
$prestr
=
''
;
foreach
(
$data
AS
$key
=>
$val
)
{
if
(
$key
!=
'sign'
&&
$key
!=
'sign_type'
&&
$key
!=
'code'
)
{
$prestr
.
=
"
$key
=
$val
&"
;
}
}
$prestr
=
substr
(
$prestr
,
0
,
-
1
);
// 签名
if
(
!
$this
->
OutRsaVerify
(
$prestr
,
$data
[
'sign'
]))
{
return
DataReturn
(
'签名校验失败'
,
-
1
);
}
// 支付状态
if
(
!
empty
(
$data
[
'trade_no'
])
||
(
isset
(
$data
[
'trade_status'
])
&&
in_array
(
$data
[
'trade_status'
],
[
'TRADE_SUCCESS'
,
'TRADE_FINISHED'
])))
{
return
DataReturn
(
'支付成功'
,
0
,
$this
->
ReturnData
(
$data
));
}
return
DataReturn
(
'处理异常错误'
,
-
100
);
}
/**
* [ReturnData 返回数据统一格式]
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-10-06T16:54:24+0800
* @param [array] $data [返回数据]
*/
private
function
ReturnData
(
$data
)
{
// 返回数据固定基础参数
$data
[
'trade_no'
]
=
$data
[
'trade_no'
];
// 支付平台 - 订单号
$data
[
'buyer_user'
]
=
$data
[
'seller_id'
];
// 支付平台 - 用户
$data
[
'out_trade_no'
]
=
$data
[
'out_trade_no'
];
// 本系统发起支付的 - 订单号
$data
[
'subject'
]
=
isset
(
$data
[
'subject'
])
?
$data
[
'subject'
]
:
''
;
// 本系统发起支付的 - 商品名称
$data
[
'pay_price'
]
=
$data
[
'total_amount'
];
// 本系统发起支付的 - 总价
return
$data
;
}
}
?>
\ No newline at end of file
public/appmini/old/baidu/app.js
浏览文件 @
00b7e427
...
@@ -57,7 +57,7 @@ App({
...
@@ -57,7 +57,7 @@ App({
// 请求地址
// 请求地址
// request_url: "{{request_url}}",
// request_url: "{{request_url}}",
request_url
:
'
http://tp5-dev.com/
'
,
request_url
:
'
http://tp5-dev.com/
'
,
//
request_url: 'https://test.shopxo.net/',
request_url
:
'
https://test.shopxo.net/
'
,
// 基础信息
// 基础信息
application_title
:
"
{{application_title}}
"
,
application_title
:
"
{{application_title}}
"
,
...
...
public/appmini/old/baidu/pages/goods-detail/goods-detail.js
浏览文件 @
00b7e427
...
@@ -34,8 +34,6 @@ Page({
...
@@ -34,8 +34,6 @@ Page({
goods_video_is_autoplay
:
false
,
goods_video_is_autoplay
:
false
,
common_app_is_use_mobile_detail
:
1
,
common_app_is_use_mobile_detail
:
1
,
common_app_is_online_service
:
0
,
// 限时秒杀插件
// 限时秒杀插件
common_app_is_limitedtimediscount
:
0
,
common_app_is_limitedtimediscount
:
0
,
plugins_limitedtimediscount_data
:
null
,
plugins_limitedtimediscount_data
:
null
,
...
@@ -110,7 +108,6 @@ Page({
...
@@ -110,7 +108,6 @@ Page({
show_field_price_text
:
data
.
goods
.
show_field_price_text
==
'
销售价
'
?
null
:
data
.
goods
.
show_field_price_text
.
replace
(
/<
[^
>
]
+>/g
,
""
)
||
null
,
show_field_price_text
:
data
.
goods
.
show_field_price_text
==
'
销售价
'
?
null
:
data
.
goods
.
show_field_price_text
.
replace
(
/<
[^
>
]
+>/g
,
""
)
||
null
,
common_app_is_use_mobile_detail
:
data
.
common_app_is_use_mobile_detail
||
0
,
common_app_is_use_mobile_detail
:
data
.
common_app_is_use_mobile_detail
||
0
,
common_app_is_online_service
:
data
.
common_app_is_online_service
||
0
,
common_app_is_limitedtimediscount
:
data
.
common_app_is_limitedtimediscount
||
0
,
common_app_is_limitedtimediscount
:
data
.
common_app_is_limitedtimediscount
||
0
,
plugins_limitedtimediscount_data
:
data
.
plugins_limitedtimediscount_data
||
null
plugins_limitedtimediscount_data
:
data
.
plugins_limitedtimediscount_data
||
null
...
...
public/appmini/old/baidu/pages/index/index.js
浏览文件 @
00b7e427
...
@@ -11,7 +11,6 @@ Page({
...
@@ -11,7 +11,6 @@ Page({
common_app_is_enable_search
:
1
,
common_app_is_enable_search
:
1
,
common_app_is_enable_answer
:
1
,
common_app_is_enable_answer
:
1
,
common_app_is_header_nav_fixed
:
0
,
common_app_is_header_nav_fixed
:
0
,
common_app_is_online_service
:
0
,
// 限时秒杀插件
// 限时秒杀插件
common_app_is_limitedtimediscount
:
0
,
common_app_is_limitedtimediscount
:
0
,
...
@@ -55,7 +54,6 @@ Page({
...
@@ -55,7 +54,6 @@ Page({
common_app_is_enable_answer
:
data
.
common_app_is_enable_answer
,
common_app_is_enable_answer
:
data
.
common_app_is_enable_answer
,
common_app_is_header_nav_fixed
:
data
.
common_app_is_header_nav_fixed
,
common_app_is_header_nav_fixed
:
data
.
common_app_is_header_nav_fixed
,
data_list_loding_status
:
data
.
data_list
.
length
==
0
?
0
:
3
,
data_list_loding_status
:
data
.
data_list
.
length
==
0
?
0
:
3
,
common_app_is_online_service
:
data
.
common_app_is_online_service
||
0
,
common_app_is_limitedtimediscount
:
data
.
common_app_is_limitedtimediscount
||
0
,
common_app_is_limitedtimediscount
:
data
.
common_app_is_limitedtimediscount
||
0
,
plugins_limitedtimediscount_data
:
data
.
plugins_limitedtimediscount_data
||
null
plugins_limitedtimediscount_data
:
data
.
plugins_limitedtimediscount_data
||
null
});
});
...
...
public/appmini/old/baidu/pages/user-order/user-order.swan
浏览文件 @
00b7e427
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
</scroll-view>
</scroll-view>
<!-- 支付方式 popup -->
<!-- 支付方式 popup -->
<component-popup
prop-show="{{is_show_payment_popup}}" prop-
position="bottom" bindonclose="payment_popup_event_close">
<component-popup
status="{{is_show_payment_popup}}"
position="bottom" bindonclose="payment_popup_event_close">
<view s-if="payment_list.length > 0" class="payment-list oh bg-white">
<view s-if="payment_list.length > 0" class="payment-list oh bg-white">
<view class="item tc fl" s-for="item, index in payment_list" s-key="key">
<view class="item tc fl" s-for="item, index in payment_list" s-key="key">
<view class="item-content br" data-value="{{item.id}}" bindtap="popup_payment_event">
<view class="item-content br" data-value="{{item.id}}" bindtap="popup_payment_event">
...
...
public/appmini/old/baidu/pages/user/user.js
浏览文件 @
00b7e427
...
@@ -16,8 +16,6 @@ Page({
...
@@ -16,8 +16,6 @@ Page({
// 远程自定义导航
// 远程自定义导航
navigation
:
[],
navigation
:
[],
common_app_is_online_service
:
0
},
},
onShow
()
{
onShow
()
{
...
@@ -96,7 +94,6 @@ Page({
...
@@ -96,7 +94,6 @@ Page({
message_total
:
(
data
.
common_message_total
||
0
)
==
0
?
0
:
data
.
common_message_total
,
message_total
:
(
data
.
common_message_total
||
0
)
==
0
?
0
:
data
.
common_message_total
,
head_nav_list
:
temp_head_nav_list
,
head_nav_list
:
temp_head_nav_list
,
navigation
:
data
.
navigation
||
[],
navigation
:
data
.
navigation
||
[],
common_app_is_online_service
:
data
.
common_app_is_online_service
||
0
});
});
}
else
{
}
else
{
app
.
showToast
(
res
.
data
.
msg
);
app
.
showToast
(
res
.
data
.
msg
);
...
...
public/appmini/old/baidu/project.swan.json
浏览文件 @
00b7e427
{
"appid"
:
"16634987"
,
"cloudTesting"
:{
"forcePreview"
:
false
},
"editor"
:{
"curPath"
:
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/app.js"
,
"expands"
:[
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/popup"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/icon-nav"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/slider"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/index"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/lib"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/lib/online-service"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/user"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/badge"
],
"paths"
:[
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/app.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/slider/slider.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/slider/slider.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/index/index.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/index/index.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/app.json"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail/goods-detail.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail/goods-detail.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/popup/popup.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/popup/popup.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-search/goods-search.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-search/goods-search.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail/goods-detail.css"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/icon-nav/icon-nav.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/icon-nav/icon-nav.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/user/user.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/badge/badge.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/badge/badge.swan"
]},
"host"
:
"baiduboxapp"
,
"preview"
:{
"packageId"
:
252255
},
"setting"
:{
"urlCheck"
:
false
},
"swan"
:{
"baiduboxapp"
:{
"swanJsVersion"
:
"3.30.43"
,
"extensionJsVersion"
:
""
}}}
{
"appid"
:
"16634987"
,
"cloudTesting"
:{
"forcePreview"
:
false
},
"editor"
:{
"curPath"
:
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/app.js"
,
"expands"
:[
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/popup"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/icon-nav"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/slider"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/index"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/lib"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/lib/online-service"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/user"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/badge"
],
"paths"
:[
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/app.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/slider/slider.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/slider/slider.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/index/index.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/index/index.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/app.json"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail/goods-detail.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail/goods-detail.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/popup/popup.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/popup/popup.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-search/goods-search.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-search/goods-search.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/goods-detail/goods-detail.css"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/icon-nav/icon-nav.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/icon-nav/icon-nav.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/pages/user/user.swan"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/badge/badge.js"
,
"/Volumes/dev/data/www/project/shopxo/public/appmini/old/baidu/components/badge/badge.swan"
]},
"host"
:
"baiduboxapp"
,
"preview"
:{
"packageId"
:
220779
},
"setting"
:{
"urlCheck"
:
false
},
"swan"
:{
"baiduboxapp"
:{
"extensionJsVersion"
:
""
,
"swanJsVersion"
:
"3.30.43"
}}}
\ No newline at end of file
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录