作者 郭盛
1 个管道 的构建 通过 耗费 9 秒

修改支付

... ... @@ -4,8 +4,7 @@
<list default="true" id="0011664b-87e9-41bd-9f37-18792fb15777" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/OrderController.php" afterPath="$PROJECT_DIR$/api/index/controller/OrderController.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/simplewind/cmf/common.php" afterPath="$PROJECT_DIR$/simplewind/cmf/common.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php" afterPath="$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/PayController.php" afterPath="$PROJECT_DIR$/api/index/controller/PayController.php" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
... ... @@ -30,7 +29,7 @@
<file leaf-file-name="UserController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="233">
<state relative-caret-position="0">
<caret line="37" column="27" lean-forward="false" selection-start-line="37" selection-start-column="27" selection-end-line="37" selection-end-column="27" />
<folding>
<element signature="e#366#715#0#PHP" expanded="false" />
... ... @@ -101,33 +100,41 @@
</provider>
</entry>
</file>
<file leaf-file-name="common.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/simplewind/cmf/common.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="802">
<caret line="1850" column="1" lean-forward="false" selection-start-line="1850" selection-start-column="1" selection-end-line="1850" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="OrderController.php" pinned="false" current-in-tab="true">
<file leaf-file-name="OrderController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/api/index/controller/OrderController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="427">
<caret line="74" column="0" lean-forward="true" selection-start-line="74" selection-start-column="0" selection-end-line="74" selection-end-column="0" />
<state relative-caret-position="537">
<caret line="99" column="37" lean-forward="true" selection-start-line="99" selection-start-column="37" selection-end-line="99" selection-end-column="37" />
<folding>
<element signature="e#131#162#0#PHP" expanded="true" />
<element signature="e#336#608#0#PHP" expanded="false" />
<element signature="e#614#976#0#PHP" expanded="false" />
<element signature="e#981#1841#0#PHP" expanded="false" />
<element signature="e#1847#2084#0#PHP" expanded="false" />
<element signature="e#2089#2786#0#PHP" expanded="false" />
<element signature="e#2792#3034#0#PHP" expanded="false" />
<element signature="e#3040#3277#0#PHP" expanded="false" />
<element signature="e#3282#3354#0#PHP" expanded="false" />
<element signature="e#3360#3839#0#PHP" expanded="false" />
<element signature="e#3844#4411#0#PHP" expanded="false" />
<element signature="e#3040#3378#0#PHP" expanded="false" />
<element signature="e#4261#4740#0#PHP" expanded="false" />
<element signature="e#4745#5312#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="PayController.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/api/index/controller/PayController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-36">
<caret line="65" column="28" lean-forward="false" selection-start-line="65" selection-start-column="28" selection-end-line="65" selection-end-column="28" />
<folding>
<element signature="e#324#855#0#PHP" expanded="false" />
<element signature="e#861#925#0#PHP" expanded="false" />
<element signature="e#930#1763#0#PHP" expanded="false" />
<element signature="e#1769#1850#0#PHP" expanded="false" />
<element signature="e#1855#3845#0#PHP" expanded="false" />
<element signature="e#3852#3875#0#PHP" expanded="false" />
<element signature="e#3880#4139#0#PHP" expanded="false" />
<element signature="e#4146#4195#0#PHP" expanded="false" />
<element signature="e#4200#4628#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ... @@ -190,7 +197,6 @@
<option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/shoporder/edit.html" />
<option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/subhome/index.html" />
<option value="$PROJECT_DIR$/api/index/model/ShopgoodsModel.php" />
<option value="$PROJECT_DIR$/api/index/controller/PayController.php" />
<option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/subhome/edit.html" />
<option value="$PROJECT_DIR$/app/admin/controller/SubhomeController.php" />
<option value="$PROJECT_DIR$/api/index/controller/RecycleController.php" />
... ... @@ -201,9 +207,10 @@
<option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/point/add.html" />
<option value="$PROJECT_DIR$/app/admin/controller/PointController.php" />
<option value="$PROJECT_DIR$/api/index/controller/UserController.php" />
<option value="$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php" />
<option value="$PROJECT_DIR$/api/index/controller/OrderController.php" />
<option value="$PROJECT_DIR$/simplewind/cmf/common.php" />
<option value="$PROJECT_DIR$/api/index/controller/PayController.php" />
<option value="$PROJECT_DIR$/api/index/controller/OrderController.php" />
<option value="$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php" />
</list>
</option>
</component>
... ... @@ -222,10 +229,10 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="198" />
<option name="y" value="62" />
<option name="width" value="1700" />
<option name="height" value="1039" />
<option name="x" value="59" />
<option name="y" value="96" />
<option name="width" value="1814" />
<option name="height" value="1009" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
... ... @@ -242,8 +249,6 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
... ... @@ -297,11 +302,13 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../project/competition" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../hotel" />
<property name="DefaultHtmlFileTemplate" value="HTML File" />
</component>
<component name="RecentsManager">
... ... @@ -399,18 +406,19 @@
<workItem from="1575462840839" duration="250000" />
<workItem from="1575506248144" duration="15103000" />
<workItem from="1575527294268" duration="10705000" />
<workItem from="1575543830603" duration="1158000" />
<workItem from="1575543830603" duration="2980000" />
<workItem from="1575592067577" duration="3070000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="493675000" />
<option name="totallyTimeSpent" value="498567000" />
</component>
<component name="ToolWindowManager">
<frame x="198" y="62" width="1700" height="1039" extended-state="1" />
<frame x="59" y="96" width="1814" height="1009" extended-state="1" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16524391" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.15621437" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32982457" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
... ... @@ -461,13 +469,6 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/app/admin/controller/UserController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="595">
<caret line="338" column="7" lean-forward="true" selection-start-line="338" selection-start-column="7" selection-end-line="338" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/admin/controller/RecycleController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
... ... @@ -651,12 +652,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#266#1001#0#PHP" expanded="false" />
<element signature="e#1016#2171#0#PHP" expanded="false" />
<element signature="e#2186#3928#0#PHP" expanded="false" />
<element signature="e#3943#4413#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
... ... @@ -701,10 +696,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="325">
<caret line="52" column="26" lean-forward="false" selection-start-line="52" selection-start-column="26" selection-end-line="52" selection-end-column="26" />
<folding>
<element signature="e#243#1652#0#PHP" expanded="false" />
<element signature="e#1669#3046#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
... ... @@ -837,10 +828,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="725">
<caret line="114" column="12" lean-forward="false" selection-start-line="114" selection-start-column="12" selection-end-line="114" selection-end-column="12" />
<folding>
<element signature="e#265#1638#0#PHP" expanded="false" />
<element signature="e#1655#3619#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
... ... @@ -884,40 +871,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="400">
<caret line="76" column="0" lean-forward="false" selection-start-line="76" selection-start-column="0" selection-end-line="76" selection-end-column="0" />
<folding>
<element signature="e#262#867#0#PHP" expanded="false" />
<element signature="e#882#2069#0#PHP" expanded="false" />
<element signature="e#2084#3731#0#PHP" expanded="false" />
<element signature="e#3746#4212#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/PayController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="174">
<caret line="16" column="23" lean-forward="true" selection-start-line="16" selection-start-column="23" selection-end-line="16" selection-end-column="23" />
<folding>
<element signature="e#324#855#0#PHP" expanded="false" />
<element signature="e#861#925#0#PHP" expanded="false" />
<element signature="e#930#1766#0#PHP" expanded="false" />
<element signature="e#1772#1853#0#PHP" expanded="false" />
<element signature="e#1858#3848#0#PHP" expanded="false" />
<element signature="e#3855#3878#0#PHP" expanded="false" />
<element signature="e#3883#4142#0#PHP" expanded="false" />
<element signature="e#4149#4198#0#PHP" expanded="false" />
<element signature="e#4203#4631#0#PHP" expanded="false" />
<element signature="e#4637#4701#0#PHP" expanded="false" />
<element signature="e#4706#5580#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="292">
<caret line="15" column="13" lean-forward="false" selection-start-line="15" selection-start-column="13" selection-end-line="15" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
... ... @@ -931,7 +884,7 @@
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="233">
<state relative-caret-position="0">
<caret line="37" column="27" lean-forward="false" selection-start-line="37" selection-start-column="27" selection-end-line="37" selection-end-column="27" />
<folding>
<element signature="e#366#715#0#PHP" expanded="false" />
... ... @@ -1001,22 +954,58 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/vendor/overtrue/wechat/src/Foundation/Application.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="291">
<caret line="63" column="61" lean-forward="false" selection-start-line="63" selection-start-column="61" selection-end-line="63" selection-end-column="61" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="97">
<caret line="104" column="21" lean-forward="false" selection-start-line="104" selection-start-column="21" selection-end-line="104" selection-end-column="21" />
<folding>
<element signature="e#4049#4323#0#PHP" expanded="false" />
<element signature="e#4342#4805#0#PHP" expanded="false" />
<element signature="e#4835#5267#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/OrderController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="427">
<caret line="74" column="0" lean-forward="true" selection-start-line="74" selection-start-column="0" selection-end-line="74" selection-end-column="0" />
<state relative-caret-position="537">
<caret line="99" column="37" lean-forward="true" selection-start-line="99" selection-start-column="37" selection-end-line="99" selection-end-column="37" />
<folding>
<element signature="e#131#162#0#PHP" expanded="true" />
<element signature="e#336#608#0#PHP" expanded="false" />
<element signature="e#614#976#0#PHP" expanded="false" />
<element signature="e#981#1841#0#PHP" expanded="false" />
<element signature="e#1847#2084#0#PHP" expanded="false" />
<element signature="e#2089#2786#0#PHP" expanded="false" />
<element signature="e#2792#3034#0#PHP" expanded="false" />
<element signature="e#3040#3277#0#PHP" expanded="false" />
<element signature="e#3282#3354#0#PHP" expanded="false" />
<element signature="e#3360#3839#0#PHP" expanded="false" />
<element signature="e#3844#4411#0#PHP" expanded="false" />
<element signature="e#3040#3378#0#PHP" expanded="false" />
<element signature="e#4261#4740#0#PHP" expanded="false" />
<element signature="e#4745#5312#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/PayController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-36">
<caret line="65" column="28" lean-forward="false" selection-start-line="65" selection-start-column="28" selection-end-line="65" selection-end-column="28" />
<folding>
<element signature="e#324#855#0#PHP" expanded="false" />
<element signature="e#861#925#0#PHP" expanded="false" />
<element signature="e#930#1763#0#PHP" expanded="false" />
<element signature="e#1769#1850#0#PHP" expanded="false" />
<element signature="e#1855#3845#0#PHP" expanded="false" />
<element signature="e#3852#3875#0#PHP" expanded="false" />
<element signature="e#3880#4139#0#PHP" expanded="false" />
<element signature="e#4146#4195#0#PHP" expanded="false" />
<element signature="e#4200#4628#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -116,17 +116,42 @@ class OrderController extends RestBaseController
/**
* @title 提现
* @author Guosheng
* @url /index/order/pay
* @url /index/order/deposit
* @method GET
*
* @header name:XX-Token require:1 default: desc:token
*
* @param name:order_id type:int require:1 other: desc:订单id
* @param name:money_id type:int require:1 other: desc:提现id
* @param name:total type:int require:1 other: desc:提现金额
*
* @return order_id:订单id
*/
public function deposit()
{
$id = $this->getUserId();
$user_id = $this->getUserId();
$total = $this->request->param('total');
$money_id = $this->request->param('money_id');
if(empty($total)){
$this->error(['code'=>40005,'msg'=>'缺少必要参数']);
}
if(empty($money_id)){
$this->error(['code'=>40005,'msg'=>'缺少必要参数']);
}
if($total<=1){
$this->error('非法操作');
}
$arr['num'] = cmf_get_order_sn();
$arr['user_id'] = $user_id;
$arr['money_id'] = $money_id;
$arr['total'] = $total;
$arr['create_time'] = time();
$result = Db::name('tixian')
->insertGetId($arr);
if(empty($result)){
$this->error(['code'=>40006,'msg'=>'sql执行失败']);
}else{
$this->success('SUCCESS',['order_id'=>$result]);
}
}
/**
... ...
... ... @@ -43,7 +43,7 @@ class PayController extends HomeBaseController
'body' => '废品回收',
'detail' => '站内充值',
'out_trade_no' => $data['num'],
'total_fee' => $data['total'] * 100, // 单位:分
'total_fee' => $data['total']*100, // 单位:分
'notify_url' => cmf_api_url('index/pay/notify', '', '', true), // 支付结果通知网址,如果不设置则会使用配置里的默认地址
'openid' => $data['openid'], // trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识,
];
... ... @@ -57,7 +57,6 @@ class PayController extends HomeBaseController
} else {
$this->error('支付参数错误', '', $result);
}
}
/**
... ... @@ -161,7 +160,7 @@ class PayController extends HomeBaseController
'check_name' => 'NO_CHECK', //文档中有三种校验实名的方法 NO_CHECK OPTION_CHECK FORCE_CHECK
're_user_name'=>'', //OPTION_CHECK FORCE_CHECK 校验实名的时候必须提交
'amount' => (1-0.006)*$data['total']*100, //单位为分
'desc' => '提现',
'desc' => '提现到零钱',
'spbill_create_ip' => '192.168.0.1', //发起交易的IP地址
];
$app = new Application($this->options);
... ...