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

修改订单总金额

... ... @@ -89,8 +89,8 @@
<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="269">
<caret line="690" column="24" lean-forward="false" selection-start-line="690" selection-start-column="24" selection-end-line="690" selection-end-column="24" />
<state relative-caret-position="569">
<caret line="729" column="46" lean-forward="true" selection-start-line="729" selection-start-column="46" selection-end-line="729" selection-end-column="46" />
<folding>
<element signature="e#574#693#0#PHP" expanded="false" />
<element signature="e#699#1012#0#PHP" expanded="false" />
... ... @@ -114,27 +114,16 @@
<element signature="e#26803#27196#0#PHP" expanded="false" />
<element signature="e#27223#30701#0#PHP" expanded="false" />
<element signature="e#30730#33635#0#PHP" expanded="false" />
<element signature="e#35997#39718#0#PHP" expanded="false" />
<element signature="e#40896#48068#0#PHP" expanded="false" />
<element signature="e#43162#46883#0#PHP" expanded="false" />
<element signature="e#46939#47049#0#PHP" expanded="false" />
<element signature="e#47325#47394#0#PHP" expanded="false" />
<element signature="e#48091#48308#0#PHP" expanded="false" />
<element signature="e#40897#48069#0#PHP" expanded="false" />
<element signature="e#43163#46884#0#PHP" expanded="false" />
<element signature="e#46940#47050#0#PHP" expanded="false" />
<element signature="e#47326#47395#0#PHP" expanded="false" />
<element signature="e#48092#48309#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="07.log" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/runtime/log/201912/07.log">
<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 />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
... ... @@ -222,9 +211,9 @@
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds" extendedState="7">
<option name="x" value="-60" />
<option name="y" value="56" />
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="105" />
<option name="y" value="49" />
<option name="width" value="1871" />
<option name="height" value="1007" />
</component>
... ... @@ -354,7 +343,7 @@
<workItem from="1575541798312" duration="2359000" />
<workItem from="1575592025964" duration="640000" />
<workItem from="1575599624364" duration="95000" />
<workItem from="1575680867057" duration="21613000" />
<workItem from="1575680867057" duration="22248000" />
</task>
<task id="LOCAL-00001" summary="调试">
<created>1574145133364</created>
... ... @@ -367,7 +356,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="331512000" />
<option name="totallyTimeSpent" value="332147000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
... ... @@ -379,10 +368,10 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="7" />
<frame x="105" y="49" width="1871" height="1007" 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.1705757" sideWeight="0.5" order="1" 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.17669795" sideWeight="0.5" order="1" 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.32912987" sideWeight="0.5" order="9" 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="0" 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.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
... ... @@ -880,8 +869,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="269">
<caret line="690" column="24" lean-forward="false" selection-start-line="690" selection-start-column="24" selection-end-line="690" selection-end-column="24" />
<state relative-caret-position="569">
<caret line="729" column="46" lean-forward="true" selection-start-line="729" selection-start-column="46" selection-end-line="729" selection-end-column="46" />
<folding>
<element signature="e#574#693#0#PHP" expanded="false" />
<element signature="e#699#1012#0#PHP" expanded="false" />
... ... @@ -905,12 +894,11 @@
<element signature="e#26803#27196#0#PHP" expanded="false" />
<element signature="e#27223#30701#0#PHP" expanded="false" />
<element signature="e#30730#33635#0#PHP" expanded="false" />
<element signature="e#35997#39718#0#PHP" expanded="false" />
<element signature="e#40896#48068#0#PHP" expanded="false" />
<element signature="e#43162#46883#0#PHP" expanded="false" />
<element signature="e#46939#47049#0#PHP" expanded="false" />
<element signature="e#47325#47394#0#PHP" expanded="false" />
<element signature="e#48091#48308#0#PHP" expanded="false" />
<element signature="e#40897#48069#0#PHP" expanded="false" />
<element signature="e#43163#46884#0#PHP" expanded="false" />
<element signature="e#46940#47050#0#PHP" expanded="false" />
<element signature="e#47326#47395#0#PHP" expanded="false" />
<element signature="e#48092#48309#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -688,14 +688,12 @@ class Pay extends Api
//图片支付订单结果通知(无需调用)
public function picOrderNotify(){
Log::info('景龙');
$config = config('verify.wx_pay');
$app = Factory::payment($config);
$response = $app->handlePaidNotify(function($message, $fail){
//return_code 表示通信状态
if ($message['return_code'] === 'SUCCESS') {
if ($message['result_code'] === 'SUCCESS') {
Log::info($message);
//找到该订单信息
$data = Db::name('order')->where('id',$message['out_trade_no'])->find();
$pic_id = explode(',',$data['pic_id']);
... ... @@ -713,7 +711,8 @@ class Pay extends Api
//非会员
if($user['is_vip'] == 0){
$pic = Db::name('pic')->field('id,price,buy_num,money')->where('id',$v)->find();
Db::name('pic')->where('id',$pic['id'])->update(['buy_num'=>$pic['buy_num']+1,'money'=>$pic['money']+$pic['price']]);
$total_money = $pic['money'] + $pic['price'];
Db::name('pic')->where('id',$pic['id'])->update(['buy_num'=>$pic['buy_num']+1,'money'=>$total_money]);
}else{
//是会员
$pic = Db::name('pic')->field('id,price,buy_num,money')->where('id',$v)->find();
... ...