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

修改微信支付

... ... @@ -4,7 +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$/api/index/controller/PayController.php" afterPath="$PROJECT_DIR$/api/index/controller/PayController.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php" afterPath="$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
... ... @@ -26,22 +26,22 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<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="650">
<caret line="110" column="40" lean-forward="true" selection-start-line="110" selection-start-column="40" selection-end-line="110" selection-end-column="40" />
<state relative-caret-position="451">
<caret line="102" column="62" lean-forward="true" selection-start-line="102" selection-start-column="62" selection-end-line="102" selection-end-column="62" />
<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#2020#0#PHP" expanded="false" />
<element signature="e#2026#2263#0#PHP" expanded="false" />
<element signature="e#3069#3407#0#PHP" expanded="false" />
<element signature="e#3412#4284#0#PHP" expanded="false" />
<element signature="e#4290#4769#0#PHP" expanded="false" />
<element signature="e#4774#5341#0#PHP" expanded="false" />
<element signature="e#5347#5589#0#PHP" expanded="false" />
<element signature="e#3065#3403#0#PHP" expanded="false" />
<element signature="e#3408#4280#0#PHP" expanded="false" />
<element signature="e#4286#4765#0#PHP" expanded="false" />
<element signature="e#4770#5337#0#PHP" expanded="false" />
<element signature="e#5343#5585#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ... @@ -50,26 +50,28 @@
<file leaf-file-name="WeixinPay.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1770">
<caret line="28" column="37" lean-forward="true" selection-start-line="28" selection-start-column="37" selection-end-line="28" selection-end-column="37" />
<state relative-caret-position="701">
<caret line="40" column="47" lean-forward="false" selection-start-line="40" selection-start-column="47" selection-end-line="40" selection-end-column="47" />
<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" />
<element signature="e#4053#4327#0#PHP" expanded="false" />
<element signature="e#4346#4809#0#PHP" expanded="false" />
<element signature="e#4839#5271#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="PayController.php" pinned="false" current-in-tab="false">
<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="-200">
<caret line="4" column="4" lean-forward="false" selection-start-line="4" selection-start-column="4" selection-end-line="4" selection-end-column="4" />
<state relative-caret-position="150">
<caret line="6" column="29" lean-forward="true" selection-start-line="6" selection-start-column="29" selection-end-line="6" selection-end-column="29" />
<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#3907#0#PHP" expanded="false" />
<element signature="e#3914#3937#0#PHP" expanded="false" />
<element signature="e#3942#4201#0#PHP" expanded="false" />
<element signature="e#4208#4257#0#PHP" expanded="false" />
... ... @@ -148,9 +150,9 @@
<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$/simplewind/cmf/common.php" />
<option value="$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php" />
<option value="$PROJECT_DIR$/api/index/controller/UserController.php" />
<option value="$PROJECT_DIR$/api/index/controller/PayController.php" />
<option value="$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php" />
<option value="$PROJECT_DIR$/api/index/controller/OrderController.php" />
</list>
</option>
... ... @@ -170,10 +172,10 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="52" />
<option name="y" value="31" />
<option name="x" value="65" />
<option name="y" value="89" />
<option name="width" value="1814" />
<option name="height" value="1042" />
<option name="height" value="1031" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
... ... @@ -348,18 +350,18 @@
<workItem from="1575506248144" duration="15103000" />
<workItem from="1575527294268" duration="10705000" />
<workItem from="1575543830603" duration="2980000" />
<workItem from="1575592067577" duration="7358000" />
<workItem from="1575592067577" duration="7919000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="502855000" />
<option name="totallyTimeSpent" value="503416000" />
</component>
<component name="ToolWindowManager">
<frame x="52" y="31" width="1814" height="1042" extended-state="1" />
<frame x="65" y="89" width="1814" height="1031" 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.15621437" 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="false" 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" />
... ... @@ -817,32 +819,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/vendor/overtrue/wechat/src/Payment/API.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="293">
<caret line="124" column="20" lean-forward="false" selection-start-line="124" selection-start-column="20" selection-end-line="124" selection-end-column="20" />
<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="-200">
<caret line="4" column="4" lean-forward="false" selection-start-line="4" selection-start-column="4" selection-end-line="4" selection-end-column="4" />
<folding>
<element signature="e#324#855#0#PHP" expanded="false" />
<element signature="e#861#925#0#PHP" expanded="false" />
<element signature="e#1769#1850#0#PHP" expanded="false" />
<element signature="e#3914#3937#0#PHP" expanded="false" />
<element signature="e#3942#4201#0#PHP" expanded="false" />
<element signature="e#4208#4257#0#PHP" expanded="false" />
<element signature="e#4262#4690#0#PHP" expanded="false" />
<element signature="e#4696#4760#0#PHP" expanded="false" />
<element signature="e#4765#5642#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="500">
... ... @@ -925,33 +901,61 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/vendor/overtrue/wechat/src/Payment/API.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="124" column="20" lean-forward="false" selection-start-line="124" selection-start-column="20" selection-end-line="124" selection-end-column="20" />
<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="-1770">
<caret line="28" column="37" lean-forward="true" selection-start-line="28" selection-start-column="37" selection-end-line="28" selection-end-column="37" />
<state relative-caret-position="701">
<caret line="40" column="47" lean-forward="false" selection-start-line="40" selection-start-column="47" selection-end-line="40" selection-end-column="47" />
<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" />
<element signature="e#4053#4327#0#PHP" expanded="false" />
<element signature="e#4346#4809#0#PHP" expanded="false" />
<element signature="e#4839#5271#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="650">
<caret line="110" column="40" lean-forward="true" selection-start-line="110" selection-start-column="40" selection-end-line="110" selection-end-column="40" />
<state relative-caret-position="451">
<caret line="102" column="62" lean-forward="true" selection-start-line="102" selection-start-column="62" selection-end-line="102" selection-end-column="62" />
<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#2020#0#PHP" expanded="false" />
<element signature="e#2026#2263#0#PHP" expanded="false" />
<element signature="e#3069#3407#0#PHP" expanded="false" />
<element signature="e#3412#4284#0#PHP" expanded="false" />
<element signature="e#4290#4769#0#PHP" expanded="false" />
<element signature="e#4774#5341#0#PHP" expanded="false" />
<element signature="e#5347#5589#0#PHP" expanded="false" />
<element signature="e#3065#3403#0#PHP" expanded="false" />
<element signature="e#3408#4280#0#PHP" expanded="false" />
<element signature="e#4286#4765#0#PHP" expanded="false" />
<element signature="e#4770#5337#0#PHP" expanded="false" />
<element signature="e#5343#5585#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="150">
<caret line="6" column="29" lean-forward="true" selection-start-line="6" selection-start-column="29" selection-end-line="6" selection-end-column="29" />
<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#3907#0#PHP" expanded="false" />
<element signature="e#3914#3937#0#PHP" expanded="false" />
<element signature="e#3942#4201#0#PHP" expanded="false" />
<element signature="e#4208#4257#0#PHP" expanded="false" />
<element signature="e#4262#4690#0#PHP" expanded="false" />
<element signature="e#4696#4760#0#PHP" expanded="false" />
<element signature="e#4765#5642#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -108,7 +108,7 @@ class OrderController extends RestBaseController
//微信支付
$openid = $this->getOpenid();
$pay = new WeixinPay();
$this->success('SUCCESS',$pay->pay($openid['openid'],$data['num'],"废品回收",$data['total']*100,cmf_api_url('index/pay/notify','','',true)));
$this->success('SUCCESS',$pay->pay($openid['openid'],$data['num'],"废品回收",$data['total'],cmf_api_url('index/pay/notify','','',true)));
}
/**
... ...
... ... @@ -38,7 +38,7 @@ class WeixinPay {
'nonce_str' => $this->createNoncestr(), //随机字符串
'body' => $this->body,
'out_trade_no'=> $this->out_trade_no,
'total_fee' => $this->total_fee,
'total_fee' => $this->total_fee*100,
'spbill_create_ip' => get_client_ip(0,true),
'notify_url' => $this->notify_url,
'openid' => $this->openid, //用户id
... ...