Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pay
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
pay
Commits
5cba5d0c
Commit
5cba5d0c
authored
Sep 26, 2021
by
wanjilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: pay_v2 to pay
parent
0d759b99
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
66 deletions
+67
-66
CallbackLog.php
application/models/order/mysql/CallbackLog.php
+1
-1
PayOrder.php
application/models/order/mysql/PayOrder.php
+1
-1
PayOrderClearing.php
application/models/order/mysql/PayOrderClearing.php
+1
-1
PayOrderClearingItem.php
application/models/order/mysql/PayOrderClearingItem.php
+1
-1
PayOrderItem.php
application/models/order/mysql/PayOrderItem.php
+1
-1
RefundOrder.php
application/models/order/mysql/RefundOrder.php
+1
-1
PayService.php
application/services/pay/PayService.php
+61
-60
No files found.
application/models/order/mysql/CallbackLog.php
View file @
5cba5d0c
...
@@ -6,5 +6,5 @@ use Api\PhpUtils\Mysql\MysqlBase;
...
@@ -6,5 +6,5 @@ use Api\PhpUtils\Mysql\MysqlBase;
class
CallbackLog
extends
MysqlBase
class
CallbackLog
extends
MysqlBase
{
{
const
TABLE_NAME
=
'callback_log'
;
const
TABLE_NAME
=
'callback_log'
;
const
CONFIG_INDEX
=
'pay
_v2
'
;
const
CONFIG_INDEX
=
'pay'
;
}
}
application/models/order/mysql/PayOrder.php
View file @
5cba5d0c
...
@@ -7,7 +7,7 @@ use App\Exception\custom\PayException;
...
@@ -7,7 +7,7 @@ use App\Exception\custom\PayException;
class
PayOrder
extends
MysqlBase
class
PayOrder
extends
MysqlBase
{
{
const
TABLE_NAME
=
'pay_order'
;
const
TABLE_NAME
=
'pay_order'
;
const
CONFIG_INDEX
=
'pay
_v2
'
;
const
CONFIG_INDEX
=
'pay'
;
/**
/**
* @param $order_id
* @param $order_id
...
...
application/models/order/mysql/PayOrderClearing.php
View file @
5cba5d0c
...
@@ -6,5 +6,5 @@ use Api\PhpUtils\Mysql\MysqlBase;
...
@@ -6,5 +6,5 @@ use Api\PhpUtils\Mysql\MysqlBase;
class
PayOrderClearing
extends
MysqlBase
class
PayOrderClearing
extends
MysqlBase
{
{
const
TABLE_NAME
=
'pay_order_clearing'
;
const
TABLE_NAME
=
'pay_order_clearing'
;
const
CONFIG_INDEX
=
'pay
_v2
'
;
const
CONFIG_INDEX
=
'pay'
;
}
}
application/models/order/mysql/PayOrderClearingItem.php
View file @
5cba5d0c
...
@@ -7,7 +7,7 @@ use App\Exception\BaseException;
...
@@ -7,7 +7,7 @@ use App\Exception\BaseException;
class
PayOrderClearingItem
extends
MysqlBase
class
PayOrderClearingItem
extends
MysqlBase
{
{
const
TABLE_NAME
=
'pay_order_clearing_item'
;
const
TABLE_NAME
=
'pay_order_clearing_item'
;
const
CONFIG_INDEX
=
'pay
_v2
'
;
const
CONFIG_INDEX
=
'pay'
;
public
static
function
marketSaleCount
(
$accountId
)
{
public
static
function
marketSaleCount
(
$accountId
)
{
...
...
application/models/order/mysql/PayOrderItem.php
View file @
5cba5d0c
...
@@ -6,5 +6,5 @@ use Api\PhpUtils\Mysql\MysqlBase;
...
@@ -6,5 +6,5 @@ use Api\PhpUtils\Mysql\MysqlBase;
class
PayOrderItem
extends
MysqlBase
class
PayOrderItem
extends
MysqlBase
{
{
const
TABLE_NAME
=
'pay_order_item'
;
const
TABLE_NAME
=
'pay_order_item'
;
const
CONFIG_INDEX
=
'pay
_v2
'
;
const
CONFIG_INDEX
=
'pay'
;
}
}
application/models/order/mysql/RefundOrder.php
View file @
5cba5d0c
...
@@ -6,5 +6,5 @@ use Api\PhpUtils\Mysql\MysqlBase;
...
@@ -6,5 +6,5 @@ use Api\PhpUtils\Mysql\MysqlBase;
class
RefundOrder
extends
MysqlBase
class
RefundOrder
extends
MysqlBase
{
{
const
TABLE_NAME
=
'refund_order'
;
const
TABLE_NAME
=
'refund_order'
;
const
CONFIG_INDEX
=
'pay
_v2
'
;
const
CONFIG_INDEX
=
'pay'
;
}
}
application/services/pay/PayService.php
View file @
5cba5d0c
...
@@ -1014,92 +1014,93 @@ class PayService
...
@@ -1014,92 +1014,93 @@ class PayService
//商家资金需要显示商品名称
//商家资金需要显示商品名称
$remark
=
$r
[
'goods_name'
]
??
''
;
$remark
=
$r
[
'goods_name'
]
??
''
;
if
(
mb_strlen
(
$remark
)
>
100
)
{
if
(
mb_strlen
(
$remark
)
>
100
)
{
$remark
=
mb_substr
(
$remark
,
0
,
100
)
.
'...'
;
$remark
=
mb_substr
(
$remark
,
0
,
100
)
.
'...'
;
}
}
if
(
!
empty
(
$r
[
'clear_price'
]))
{
if
(
!
empty
(
$r
[
'clear_price'
]))
{
$clear_payment
=
$r
[
'goods_num'
]
*
$r
[
'clear_price'
];
$clear_payment
=
$r
[
'goods_num'
]
*
$r
[
'clear_price'
];
$platform_amount
=
$current_tip
-
$clear_payment
;
$platform_amount
=
$current_tip
-
$clear_payment
;
if
(
!
empty
(
$r
[
'clear_price'
]))
{
if
(
!
empty
(
$r
[
'clear_price'
]))
{
$clear_payment
=
$r
[
'goods_num'
]
*
$r
[
'clear_price'
];
$clear_payment
=
$r
[
'goods_num'
]
*
$r
[
'clear_price'
];
}
else
{
}
else
{
$clear_payment
=
$current_tip
;
$clear_payment
=
$current_tip
;
$platform_amount
=
0
;
$platform_amount
=
0
;
}
}
if
(
$platform_amount
<
0
)
{
if
(
$platform_amount
<
0
)
{
throw
new
PayException
([
'cus'
=>
12
]);
//结算价不能大于商家分成部分
throw
new
PayException
([
'cus'
=>
12
]);
//结算价不能大于商家分成部分
}
}
if
(
$platform_amount
>
0
)
{
//结算价剩余部分返回平台
$platform
[
'amount'
]
+=
$platform_amount
;
$this
->
clear_items_list
[]
=
[
'pay_order_clearing_item_id'
=>
array_shift
(
$this
->
gen_ids
),
'pay_order_clearing_id'
=>
$p_clearing_id
,
'pay_order_id'
=>
$this
->
pay_order
[
'pay_order_id'
],
'order_id'
=>
$this
->
pay_order
[
'order_id'
],
'order_item_id'
=>
$r
[
'order_item_id'
],
'account_id'
=>
$platform
[
'account_id'
],
'account_type'
=>
$platform
[
'account_type'
],
'pay_amount'
=>
$platform_amount
,
'clear_payment'
=>
0
,
//商品结算价格
'pay_type'
=>
$platform
[
'pay_type'
],
'pay_sub_type'
=>
$platform
[
'pay_sub_type'
],
'remark'
=>
''
,
];
}
else
{
}
if
(
$platform_amount
>
0
)
{
//结算价剩余部分返回平台
$platform
[
'amount'
]
+=
$platform_amount
;
$this
->
clear_items_list
[]
=
[
$this
->
clear_items_list
[]
=
[
'pay_order_clearing_item_id'
=>
array_shift
(
$this
->
gen_ids
),
'pay_order_clearing_item_id'
=>
array_shift
(
$this
->
gen_ids
),
'pay_order_clearing_id'
=>
$
p
_clearing_id
,
'pay_order_clearing_id'
=>
$
m
_clearing_id
,
'pay_order_id'
=>
$this
->
pay_order
[
'pay_order_id'
],
'pay_order_id'
=>
$this
->
pay_order
[
'pay_order_id'
],
'order_id'
=>
$this
->
pay_order
[
'order_id'
],
'order_id'
=>
$this
->
pay_order
[
'order_id'
],
'order_item_id'
=>
$r
[
'order_item_id'
],
'order_item_id'
=>
$r
[
'order_item_id'
],
'account_id'
=>
$
platform
[
'account_id'
],
'account_id'
=>
$
merchant
[
'account_id'
],
'account_type'
=>
$
platform
[
'account_type'
],
'account_type'
=>
$
merchant
[
'account_type'
],
'pay_amount'
=>
$
platform_amount
,
'pay_amount'
=>
$
clear_payment
,
//商品结算价格
'clear_payment'
=>
0
,
//商品结算价格
'clear_payment'
=>
0
,
'pay_type'
=>
$
platform
[
'pay_type'
],
'pay_type'
=>
$
merchant
[
'pay_type'
],
'pay_sub_type'
=>
$
platform
[
'pay_sub_type'
],
'pay_sub_type'
=>
$
merchant
[
'pay_sub_type'
],
'remark'
=>
''
,
'remark'
=>
$remark
,
];
];
$merchant
[
'amount'
]
+=
$clear_payment
;
}
else
{}
//收集金额用于分拆计算
$cleared_amount
+=
$r
[
'payment'
];
$cleared_tip
+=
$current_tip
;
}
$this
->
clear_items_list
[]
=
[
//商户收益
'pay_order_clearing_item_id'
=>
array_shift
(
$this
->
gen_ids
),
$this
->
clear_list
[]
=
[
'pay_order_clearing_id'
=>
$m_clearing_id
,
'pay_order_clearing_id'
=>
$m_clearing_id
,
'pay_order_id'
=>
$this
->
pay_order
[
'pay_order_id'
],
'pay_order_id'
=>
$this
->
pay_order
[
'pay_order_id'
],
'order_id'
=>
$this
->
pay_order
[
'order_id'
],
'order_id'
=>
$this
->
pay_order
[
'order_id'
],
'order_item_id'
=>
$r
[
'order_item_id'
],
'account_id'
=>
$merchant
[
'account_id'
],
'account_id'
=>
$merchant
[
'account_id'
],
'account_type'
=>
$merchant
[
'account_type'
],
'account_type'
=>
$merchant
[
'account_type'
],
'pay_amount'
=>
$clear_payment
,
//商品结算价格
'pay_amount'
=>
$merchant
[
'amount'
],
'clear_payment'
=>
0
,
'pay_type'
=>
$merchant
[
'pay_type'
],
'pay_type'
=>
$merchant
[
'pay_type'
],
'pay_sub_type'
=>
$merchant
[
'pay_sub_type'
],
'pay_sub_type'
=>
$merchant
[
'pay_sub_type'
],
'remark'
=>
$remark
,
];
];
$merchant
[
'amount'
]
+=
$clear_payment
;
//收集金额用于分拆计算
//结算价格收益返回平台
$cleared_amount
+=
$r
[
'payment'
];
if
(
$platform
[
'amount'
]
>
0
)
{
$cleared_tip
+=
$current_tip
;
$this
->
clear_list
[]
=
[
}
'pay_order_clearing_id'
=>
$p_clearing_id
,
'pay_order_id'
=>
$this
->
pay_order
[
'pay_order_id'
],
//商户收益
'order_id'
=>
$this
->
pay_order
[
'order_id'
],
$this
->
clear_list
[]
=
[
'account_id'
=>
$platform
[
'account_id'
],
'pay_order_clearing_id'
=>
$m_clearing_id
,
'account_type'
=>
$platform
[
'account_type'
],
'pay_order_id'
=>
$this
->
pay_order
[
'pay_order_id'
],
'pay_amount'
=>
$platform
[
'amount'
],
'order_id'
=>
$this
->
pay_order
[
'order_id'
],
'pay_type'
=>
$platform
[
'pay_type'
],
'account_id'
=>
$merchant
[
'account_id'
],
'pay_sub_type'
=>
$platform
[
'pay_sub_type'
],
'account_type'
=>
$merchant
[
'account_type'
],
];
'pay_amount'
=>
$merchant
[
'amount'
],
}
'pay_type'
=>
$merchant
[
'pay_type'
],
'pay_sub_type'
=>
$merchant
[
'pay_sub_type'
],
];
//结算价格收益返回平台
if
(
$platform
[
'amount'
]
>
0
)
{
$this
->
clear_list
[]
=
[
'pay_order_clearing_id'
=>
$p_clearing_id
,
'pay_order_id'
=>
$this
->
pay_order
[
'pay_order_id'
],
'order_id'
=>
$this
->
pay_order
[
'order_id'
],
'account_id'
=>
$platform
[
'account_id'
],
'account_type'
=>
$platform
[
'account_type'
],
'pay_amount'
=>
$platform
[
'amount'
],
'pay_type'
=>
$platform
[
'pay_type'
],
'pay_sub_type'
=>
$platform
[
'pay_sub_type'
],
];
}
}
return
$merchant_cash
;
return
$merchant_cash
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment