当前位置:网站首页>Service charge and time setting code sharing involved in crmeb withdrawal process

Service charge and time setting code sharing involved in crmeb withdrawal process

2022-06-25 12:28:00 Procedure 15528175269

Some businesses use CRMEB In the process of operating e-commerce platform , It involves the payment of commission reward and cash withdrawal , When the membership is large and the number of commissions is large , If it is a manual payment , So much work , When it comes to human capital , If the platform looks for the bank to make payment in batches , The bank will also charge a handling fee , Some e-commerce merchants find banks to pay in batches , After a fixed EXCEL Submit the template to the bank , Some banks may charge a service fee of several yuan per transaction , Every day if there are hundreds of orders in time , Then the transfer cost of this piece is very high

crmeb Code sharing illustration of withdrawal fee setting and withdrawal time period setting

Moreover, some users have no cash withdrawal threshold ,1 Yuan or 10 Yuan will initiate cash withdrawal to members , Then the cost is on the high side , The following content is the shared content and partial code of user withdrawal function for developing e-commerce system

How to deal with this problem ?
Yes CRMEB Develop a small function , Set the function of withdrawal service fee
1. The way 1: Set a handling charge of a few percent of each withdrawal .

2. The way 2: It can also be set to deduct a service charge of several yuan for each withdrawal platform

In addition, the e-commerce platform sometimes also wants to set the Commission withdrawal time , at present CRMEB There's nothing in the , Then it is required to set the withdrawal time period ,

For example, set the days of the week that can be raised ? What time is the withdrawal time of that day ? On the one hand, these designs can enable the financial department to centralize the disposal , It is also convenient to manage the withdrawal time uniformly , Centralized audit

In addition, if the system development has set up automatic cash withdrawal to account , Think about it based on platform technology , Cash withdrawal during working hours on weekdays is the best , In case the system presents bug Or other account disclosure problems , Cash withdrawals have been funded , The platform can't audit and trace .

therefore CRMEB It is required to set the function of withdrawal time
1. Withdrawal can be set on the days of each week , For example, week 1, Zhou 3 And so on.

2. The withdrawal period can be set , For example, in the morning 10:00 In the afternoon 5:00

When the user initiates withdrawal , There will be another problem , Some users initiate multiple withdrawals a day , This will also increase the workload of cash withdrawal
How to deal with the problem that the same user initiates multiple withdrawals every day ?
Be able to handle : Develop the function of limiting the number of withdrawals per day , This limits the number of users per day

Here are some crmeb Commission fee for withdrawal , The program code of withdrawal time and withdrawal frequency

$hour = date(‘H’);
if($cashTime)
{
if(!in_array($hour, explode(‘,’, $cashTime)))
{
return app(‘json’)->fail($cashMsg ? $cashMsg: ‘ Not within the time allowed for withdrawal ’);
}
}

if( UserExtract::where(‘uid’, $user[‘uid’])->where(‘add_time’, ‘>=’, strtotime(date(‘Y-m-d’)))->count() >= $cashCount ){
return app(‘json’)->fail(‘ Only cash withdrawal is allowed every day ’ . $cashCount . ‘ Time !’);
}
// Service Charge 
$store_fee = bcdiv(bcmul($data[‘money’],$store_fee_rate,2),100,2);

// Actual amount received 
$realMoney = bcsub($data[‘money’], $store_fee, 2);
$time = time();

 

原网站

版权声明
本文为[Procedure 15528175269]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200532044432.html