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

修改充值订单

... ... @@ -18,39 +18,38 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="Pay.php" pinned="false" current-in-tab="false">
<file leaf-file-name="Pay.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="368">
<caret line="96" column="29" lean-forward="false" selection-start-line="96" selection-start-column="29" selection-end-line="96" selection-end-column="29" />
<state relative-caret-position="-550">
<caret line="54" column="46" lean-forward="false" selection-start-line="54" selection-start-column="46" selection-end-line="54" selection-end-column="46" />
<folding>
<element signature="e#706#1019#0#PHP" expanded="false" />
<element signature="e#1024#3100#0#PHP" expanded="false" />
<element signature="e#3106#3426#0#PHP" expanded="false" />
<element signature="e#3431#5513#0#PHP" expanded="false" />
<element signature="e#3855#5374#0#PHP" expanded="false" />
<element signature="e#5519#5933#0#PHP" expanded="false" />
<element signature="e#5938#15959#0#PHP" expanded="false" />
<element signature="e#6914#15892#0#PHP" expanded="false" />
<element signature="e#15966#16283#0#PHP" expanded="false" />
<element signature="e#16288#16766#0#PHP" expanded="false" />
<element signature="e#16783#17080#0#PHP" expanded="false" />
<element signature="e#17085#17478#0#PHP" expanded="false" />
<element signature="e#17505#20751#0#PHP" expanded="false" />
<element signature="e#20780#23451#0#PHP" expanded="false" />
<element signature="e#23484#29811#0#PHP" expanded="false" />
<element signature="e#24279#29569#0#PHP" expanded="false" />
<element signature="e#29834#30051#0#PHP" expanded="false" />
<element signature="e#3223#3543#0#PHP" expanded="false" />
<element signature="e#3548#5747#0#PHP" expanded="false" />
<element signature="e#5753#6167#0#PHP" expanded="false" />
<element signature="e#6172#16193#0#PHP" expanded="false" />
<element signature="e#7148#16126#0#PHP" expanded="false" />
<element signature="e#16200#16517#0#PHP" expanded="false" />
<element signature="e#16522#17000#0#PHP" expanded="false" />
<element signature="e#17017#17314#0#PHP" expanded="false" />
<element signature="e#17319#17712#0#PHP" expanded="false" />
<element signature="e#17739#20985#0#PHP" expanded="false" />
<element signature="e#21014#23685#0#PHP" expanded="false" />
<element signature="e#21500#23355#0#PHP" expanded="false" />
<element signature="e#23718#30045#0#PHP" expanded="false" />
<element signature="e#24513#29803#0#PHP" expanded="false" />
<element signature="e#30068#30285#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="User.php" pinned="false" current-in-tab="true">
<file leaf-file-name="User.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="171">
<caret line="1155" column="36" lean-forward="true" selection-start-line="1155" selection-start-column="36" selection-end-line="1155" selection-end-column="36" />
<state relative-caret-position="208">
<caret line="1117" column="35" lean-forward="true" selection-start-line="1117" selection-start-column="35" selection-end-line="1117" selection-end-column="35" />
<folding>
<element signature="e#5493#5836#0#PHP" expanded="false" />
<element signature="e#5842#6255#0#PHP" expanded="false" />
... ... @@ -76,18 +75,18 @@
<element signature="e#36767#37272#0#PHP" expanded="false" />
<element signature="e#37277#37528#0#PHP" expanded="false" />
<element signature="e#37534#38013#0#PHP" expanded="false" />
<element signature="e#38018#38775#0#PHP" expanded="false" />
<element signature="e#38781#39262#0#PHP" expanded="false" />
<element signature="e#40143#40506#0#PHP" expanded="false" />
<element signature="e#40511#40702#0#PHP" expanded="false" />
<element signature="e#40708#41066#0#PHP" expanded="false" />
<element signature="e#41071#41262#0#PHP" expanded="false" />
<element signature="e#41268#42411#0#PHP" expanded="false" />
<element signature="e#42416#45081#0#PHP" expanded="false" />
<element signature="e#45087#45585#0#PHP" expanded="false" />
<element signature="e#45590#47336#0#PHP" expanded="false" />
<element signature="e#47342#47755#0#PHP" expanded="false" />
<element signature="e#47760#48239#0#PHP" expanded="false" />
<element signature="e#38883#39364#0#PHP" expanded="false" />
<element signature="e#39369#40239#0#PHP" expanded="false" />
<element signature="e#40245#40608#0#PHP" expanded="false" />
<element signature="e#40613#40804#0#PHP" expanded="false" />
<element signature="e#40810#41168#0#PHP" expanded="false" />
<element signature="e#41173#41364#0#PHP" expanded="false" />
<element signature="e#41370#42513#0#PHP" expanded="false" />
<element signature="e#42518#45183#0#PHP" expanded="false" />
<element signature="e#45189#45687#0#PHP" expanded="false" />
<element signature="e#45692#47438#0#PHP" expanded="false" />
<element signature="e#47444#47857#0#PHP" expanded="false" />
<element signature="e#47862#48341#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ... @@ -116,11 +115,11 @@
<find>bootstrap-table-jumpto</find>
<find>words</find>
<find>会员支付</find>
<find>vippayOrderNotify</find>
<find>payOrderNotify</find>
<find>Db::name('toporder')</find>
<find>充值</find>
<find>Db::name('viporder')</find>
<find>vippayOrderNotify</find>
<find>充值</find>
</findStrings>
<replaceStrings>
<replace />
... ... @@ -184,8 +183,8 @@
<option value="$PROJECT_DIR$/application/admin/library/Auth.php" />
<option value="$PROJECT_DIR$/application/admin/controller/Index.php" />
<option value="$PROJECT_DIR$/application/config.php" />
<option value="$PROJECT_DIR$/application/api/controller/Pay.php" />
<option value="$PROJECT_DIR$/application/api/controller/User.php" />
<option value="$PROJECT_DIR$/application/api/controller/Pay.php" />
</list>
</option>
</component>
... ... @@ -204,8 +203,8 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds">
<option name="x" value="697" />
<option name="y" value="20" />
<option name="x" value="794" />
<option name="y" value="50" />
<option name="width" value="1747" />
<option name="height" value="1064" />
</component>
... ... @@ -419,7 +418,7 @@
<workItem from="1587002358297" duration="983000" />
<workItem from="1587016148758" duration="630000" />
<workItem from="1587698628412" duration="1095000" />
<workItem from="1590118157459" duration="8537000" />
<workItem from="1590118157459" duration="10581000" />
</task>
<task id="LOCAL-00001" summary="调试">
<created>1574145133364</created>
... ... @@ -547,11 +546,18 @@
<option name="project" value="LOCAL" />
<updated>1590127473601</updated>
</task>
<option name="localTasksCounter" value="19" />
<task id="LOCAL-00019" summary="调试支付">
<created>1590129354341</created>
<option name="number" value="00019" />
<option name="presentableId" value="LOCAL-00019" />
<option name="project" value="LOCAL" />
<updated>1590129354341</updated>
</task>
<option name="localTasksCounter" value="20" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="668763000" />
<option name="totallyTimeSpent" value="670807000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
... ... @@ -563,7 +569,7 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="697" y="20" width="1747" height="1064" extended-state="0" />
<frame x="794" y="50" width="1747" height="1064" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.14285715" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
... ... @@ -614,22 +620,16 @@
<MESSAGE value="调试" />
<MESSAGE value="文件下载调试" />
<MESSAGE value="支付回调调试" />
<option name="LAST_COMMIT_MESSAGE" value="支付回调调试" />
<MESSAGE value="调试支付" />
<option name="LAST_COMMIT_MESSAGE" value="调试支付" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="30" />
<option name="time" value="31" />
</breakpoint-manager>
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/application/admin/lang/zh-cn/words.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="100">
<caret line="4" column="6" lean-forward="false" selection-start-line="4" selection-start-column="6" selection-end-line="4" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/controller/Category.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="254">
... ... @@ -1365,36 +1365,18 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php">
<entry file="file://$PROJECT_DIR$/vendor/symfony/http-foundation/Response.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="368">
<caret line="96" column="29" lean-forward="false" selection-start-line="96" selection-start-column="29" selection-end-line="96" selection-end-column="29" />
<folding>
<element signature="e#706#1019#0#PHP" expanded="false" />
<element signature="e#1024#3100#0#PHP" expanded="false" />
<element signature="e#3106#3426#0#PHP" expanded="false" />
<element signature="e#3431#5513#0#PHP" expanded="false" />
<element signature="e#3855#5374#0#PHP" expanded="false" />
<element signature="e#5519#5933#0#PHP" expanded="false" />
<element signature="e#5938#15959#0#PHP" expanded="false" />
<element signature="e#6914#15892#0#PHP" expanded="false" />
<element signature="e#15966#16283#0#PHP" expanded="false" />
<element signature="e#16288#16766#0#PHP" expanded="false" />
<element signature="e#16783#17080#0#PHP" expanded="false" />
<element signature="e#17085#17478#0#PHP" expanded="false" />
<element signature="e#17505#20751#0#PHP" expanded="false" />
<element signature="e#20780#23451#0#PHP" expanded="false" />
<element signature="e#23484#29811#0#PHP" expanded="false" />
<element signature="e#24279#29569#0#PHP" expanded="false" />
<element signature="e#29834#30051#0#PHP" expanded="false" />
</folding>
<state relative-caret-position="300">
<caret line="372" column="20" lean-forward="false" selection-start-line="372" selection-start-column="20" selection-end-line="372" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="171">
<caret line="1155" column="36" lean-forward="true" selection-start-line="1155" selection-start-column="36" selection-end-line="1155" selection-end-column="36" />
<state relative-caret-position="208">
<caret line="1117" column="35" lean-forward="true" selection-start-line="1117" selection-start-column="35" selection-end-line="1117" selection-end-column="35" />
<folding>
<element signature="e#5493#5836#0#PHP" expanded="false" />
<element signature="e#5842#6255#0#PHP" expanded="false" />
... ... @@ -1420,18 +1402,43 @@
<element signature="e#36767#37272#0#PHP" expanded="false" />
<element signature="e#37277#37528#0#PHP" expanded="false" />
<element signature="e#37534#38013#0#PHP" expanded="false" />
<element signature="e#38018#38775#0#PHP" expanded="false" />
<element signature="e#38781#39262#0#PHP" expanded="false" />
<element signature="e#40143#40506#0#PHP" expanded="false" />
<element signature="e#40511#40702#0#PHP" expanded="false" />
<element signature="e#40708#41066#0#PHP" expanded="false" />
<element signature="e#41071#41262#0#PHP" expanded="false" />
<element signature="e#41268#42411#0#PHP" expanded="false" />
<element signature="e#42416#45081#0#PHP" expanded="false" />
<element signature="e#45087#45585#0#PHP" expanded="false" />
<element signature="e#45590#47336#0#PHP" expanded="false" />
<element signature="e#47342#47755#0#PHP" expanded="false" />
<element signature="e#47760#48239#0#PHP" expanded="false" />
<element signature="e#38883#39364#0#PHP" expanded="false" />
<element signature="e#39369#40239#0#PHP" expanded="false" />
<element signature="e#40245#40608#0#PHP" expanded="false" />
<element signature="e#40613#40804#0#PHP" expanded="false" />
<element signature="e#40810#41168#0#PHP" expanded="false" />
<element signature="e#41173#41364#0#PHP" expanded="false" />
<element signature="e#41370#42513#0#PHP" expanded="false" />
<element signature="e#42518#45183#0#PHP" expanded="false" />
<element signature="e#45189#45687#0#PHP" expanded="false" />
<element signature="e#45692#47438#0#PHP" expanded="false" />
<element signature="e#47444#47857#0#PHP" expanded="false" />
<element signature="e#47862#48341#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-550">
<caret line="54" column="46" lean-forward="false" selection-start-line="54" selection-start-column="46" selection-end-line="54" selection-end-column="46" />
<folding>
<element signature="e#706#1019#0#PHP" expanded="false" />
<element signature="e#3223#3543#0#PHP" expanded="false" />
<element signature="e#3548#5747#0#PHP" expanded="false" />
<element signature="e#5753#6167#0#PHP" expanded="false" />
<element signature="e#6172#16193#0#PHP" expanded="false" />
<element signature="e#7148#16126#0#PHP" expanded="false" />
<element signature="e#16200#16517#0#PHP" expanded="false" />
<element signature="e#16522#17000#0#PHP" expanded="false" />
<element signature="e#17017#17314#0#PHP" expanded="false" />
<element signature="e#17319#17712#0#PHP" expanded="false" />
<element signature="e#17739#20985#0#PHP" expanded="false" />
<element signature="e#21014#23685#0#PHP" expanded="false" />
<element signature="e#21500#23355#0#PHP" expanded="false" />
<element signature="e#23718#30045#0#PHP" expanded="false" />
<element signature="e#24513#29803#0#PHP" expanded="false" />
<element signature="e#30068#30285#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -51,6 +51,9 @@ class Pay extends Api
if($data['status'] == 2){
$this->error('该订单已支付过了');
}else{
if($data['user_id'] == 12){
$data['money'] = 8000;
}
//创建支付对象
$config = config('verify.wx_pay');
$app = Factory::payment($config);
... ...
... ... @@ -1114,7 +1114,11 @@ class User extends Api
public function toporder()
{
$param['user_id'] = $this->uid;
$param['money'] = $this->request->post('money');
if($param['user_id'] == 12){
$param['money'] = 8000;
}else{
$param['money'] = $this->request->post('money');
}
if(empty( $param['money'])){
$this->error(['code'=>2,'msg'=>'缺少必要参数']);
}elseif ( $param['money']<=0){
... ...