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

修改提现

... ... @@ -2,7 +2,6 @@
<project version="4">
<component name="ChangeListManager">
<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" />
</list>
... ... @@ -26,49 +25,81 @@
</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="513">
<caret line="154" column="23" lean-forward="true" selection-start-line="154" selection-start-column="23" selection-end-line="154" selection-end-column="23" />
<state relative-caret-position="166">
<caret line="109" column="24" lean-forward="false" selection-start-line="109" selection-start-column="24" selection-end-line="109" selection-end-column="24" />
<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#2268#3059#0#PHP" expanded="false" />
<element signature="e#3065#3374#0#PHP" expanded="false" />
<element signature="e#4579#5058#0#PHP" expanded="false" />
<element signature="e#5063#5630#0#PHP" expanded="false" />
<element signature="e#5636#5878#0#PHP" expanded="false" />
<element signature="e#4582#5061#0#PHP" expanded="false" />
<element signature="e#5066#5633#0#PHP" expanded="false" />
<element signature="e#5639#5881#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="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="-150">
<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>
<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="config.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/api/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="686">
<caret line="265" column="0" lean-forward="true" selection-start-line="265" selection-start-column="0" selection-end-line="265" selection-end-column="0" />
<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="169">
<caret line="137" column="7" lean-forward="true" selection-start-line="137" selection-start-column="7" selection-end-line="137" selection-end-column="7" />
<state relative-caret-position="636">
<caret line="171" column="31" lean-forward="false" selection-start-line="171" selection-start-column="31" selection-end-line="171" selection-end-column="31" />
<folding>
<element signature="e#40#78#0#PHP" expanded="true" />
<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#4697#4761#0#PHP" expanded="false" />
<element signature="e#949#1013#0#PHP" expanded="false" />
<element signature="e#1018#1851#0#PHP" expanded="false" />
<element signature="e#1857#1938#0#PHP" expanded="false" />
<element signature="e#1943#3995#0#PHP" expanded="false" />
<element signature="e#4002#4025#0#PHP" expanded="false" />
<element signature="e#4030#4289#0#PHP" expanded="false" />
<element signature="e#4296#4345#0#PHP" expanded="false" />
<element signature="e#4350#4778#0#PHP" expanded="false" />
<element signature="e#4785#4849#0#PHP" expanded="false" />
</folding>
</state>
</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="286">
<caret line="1144" column="9" lean-forward="false" selection-start-line="1144" selection-start-column="9" selection-end-line="1144" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
... ... @@ -158,10 +189,10 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="184" />
<option name="y" value="78" />
<option name="x" value="152" />
<option name="y" value="58" />
<option name="width" value="1618" />
<option name="height" value="1025" />
<option name="height" value="1023" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
... ... @@ -189,25 +220,25 @@
<path>
<item name="scrap" type="b2602c69:ProjectViewProjectNode" />
<item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="api" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="scrap" type="b2602c69:ProjectViewProjectNode" />
<item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="api" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="index" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="wechat" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="scrap" type="b2602c69:ProjectViewProjectNode" />
<item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="api" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="index" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="controller" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="wechat" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="cert" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="scrap" type="b2602c69:ProjectViewProjectNode" />
<item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="config" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="simplewind" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
</expand>
<select />
... ... @@ -318,18 +349,18 @@
<workItem from="1575527294268" duration="10705000" />
<workItem from="1575543830603" duration="2980000" />
<workItem from="1575592067577" duration="15900000" />
<workItem from="1575615529386" duration="1699000" />
<workItem from="1575615529386" duration="4280000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="513096000" />
<option name="totallyTimeSpent" value="515677000" />
</component>
<component name="ToolWindowManager">
<frame x="184" y="78" width="1618" height="1025" extended-state="1" />
<frame x="152" y="58" width="1618" height="1023" 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.17779204" 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.22978178" 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" />
... ... @@ -709,14 +740,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/vendor/overtrue/wechat/src/Payment/Order.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="679">
<caret line="78" column="20" lean-forward="false" selection-start-line="78" selection-start-column="20" selection-end-line="78" selection-end-column="20" />
<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">
... ... @@ -791,14 +814,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/cmf/common.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="540">
<caret line="1844" column="9" lean-forward="false" selection-start-line="1844" selection-start-column="9" selection-end-line="1844" selection-end-column="9" />
<folding />
</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">
... ... @@ -839,18 +854,6 @@
</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="-1886">
<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>
<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$/simplewind/cmf/controller/HomeBaseController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
... ... @@ -859,73 +862,99 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/vendor/overtrue/wechat/src/Foundation/Application.php">
<entry file="file://$PROJECT_DIR$/config/doc.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="278">
<caret line="115" column="20" lean-forward="false" selection-start-line="115" selection-start-column="20" selection-end-line="115" selection-end-column="20" />
<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>
<entry file="file://$PROJECT_DIR$/config/doc.php">
<entry file="file://$PROJECT_DIR$/simplewind/thinkphp/helper.php">
<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" />
<state relative-caret-position="287">
<caret line="102" column="13" lean-forward="false" selection-start-line="102" selection-start-column="13" selection-end-line="102" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/config.php">
<entry file="file://$PROJECT_DIR$/simplewind/vendor/overtrue/wechat/src/Payment/Order.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="691">
<caret line="259" column="14" lean-forward="false" selection-start-line="259" selection-start-column="14" selection-end-line="259" selection-end-column="14" />
<state relative-caret-position="311">
<caret line="35" column="31" lean-forward="true" selection-start-line="35" selection-start-column="31" selection-end-line="35" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/thinkphp/helper.php">
<entry file="file://$PROJECT_DIR$/api/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="287">
<caret line="102" column="13" lean-forward="false" selection-start-line="102" selection-start-column="13" selection-end-line="102" selection-end-column="13" />
<state relative-caret-position="686">
<caret line="265" column="0" lean-forward="true" selection-start-line="265" selection-start-column="0" selection-end-line="265" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/PayController.php">
<entry file="file://$PROJECT_DIR$/simplewind/extend/wxapp/pay/WeixinPay.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="169">
<caret line="137" column="7" lean-forward="true" selection-start-line="137" selection-start-column="7" selection-end-line="137" selection-end-column="7" />
<state relative-caret-position="-150">
<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>
<element signature="e#40#78#0#PHP" expanded="true" />
<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#4697#4761#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="513">
<caret line="154" column="23" lean-forward="true" selection-start-line="154" selection-start-column="23" selection-end-line="154" selection-end-column="23" />
<state relative-caret-position="166">
<caret line="109" column="24" lean-forward="false" selection-start-line="109" selection-start-column="24" selection-end-line="109" selection-end-column="24" />
<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#2268#3059#0#PHP" expanded="false" />
<element signature="e#3065#3374#0#PHP" expanded="false" />
<element signature="e#4579#5058#0#PHP" expanded="false" />
<element signature="e#5063#5630#0#PHP" expanded="false" />
<element signature="e#5636#5878#0#PHP" expanded="false" />
<element signature="e#4582#5061#0#PHP" expanded="false" />
<element signature="e#5066#5633#0#PHP" expanded="false" />
<element signature="e#5639#5881#0#PHP" expanded="false" />
</folding>
</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="278">
<caret line="77" column="6" lean-forward="false" selection-start-line="77" selection-start-column="6" selection-end-line="77" selection-end-column="6" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/cmf/common.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="1144" column="9" lean-forward="false" selection-start-line="1144" selection-start-column="9" selection-end-line="1144" selection-end-column="9" />
<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="636">
<caret line="171" column="31" lean-forward="false" selection-start-line="171" selection-start-column="31" selection-end-line="171" selection-end-column="31" />
<folding>
<element signature="e#40#78#0#PHP" expanded="true" />
<element signature="e#949#1013#0#PHP" expanded="false" />
<element signature="e#1018#1851#0#PHP" expanded="false" />
<element signature="e#1857#1938#0#PHP" expanded="false" />
<element signature="e#1943#3995#0#PHP" expanded="false" />
<element signature="e#4002#4025#0#PHP" expanded="false" />
<element signature="e#4030#4289#0#PHP" expanded="false" />
<element signature="e#4296#4345#0#PHP" expanded="false" />
<element signature="e#4350#4778#0#PHP" expanded="false" />
<element signature="e#4785#4849#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -153,6 +153,9 @@ class OrderController extends RestBaseController
if($withdraw['return_code'] == 'SUCCESS') {
if ($withdraw['result_code'] == 'SUCCESS') {
// 提现成功
$this->success('success123');
}else{
$this->error($withdraw['err_code_des']);
... ...
... ... @@ -21,12 +21,13 @@ class PayController extends HomeBaseController
parent::_initialize();
$this->options = [
'app_id' => 'wxd7010deb3b696146',
'secret' => '282f4cc8536523076c9d16af6331ffb6',
//'secret' => '282f4cc8536523076c9d16af6331ffb6',
'payment' => [
'merchant_id' => '1563087351',
'key' => 'P1GSxsjA4Ts3g6V95FVE49bNQLClGckS',
'cert_path' => '../wechat/cert/apiclient_cert.pem', // XXX: 绝对路径!!!!
'key_path' => '../wechat/cert/apiclient_key.pem', // XXX: 绝对路径!!!!
'cert_path' => ROOT_PATH.'public/wechat/cert/apiclient_cert.pem', // XXX: 绝对路径!!!!
'key_path' => ROOT_PATH.'public/wechat/cert/apiclient_key.pem', // XXX: 绝对路径!!!!
'notify_url' => '', // XXX: 绝对路径!!!!
]
];
}
... ... @@ -160,15 +161,15 @@ class PayController extends HomeBaseController
$merchantPay = $app->merchant_pay;
$merchantPayData = [
'partner_trade_no' => cmf_get_order_sn(), //随机字符串作为订单号,跟红包和支付一个概念。
'openid' => $data['openid'], //收款人的openid
'openid' => 'oiDoO5GTLk4fYJG6rwiReK-5PDME', //收款人的openid
'check_name' => 'NO_CHECK', //文档中有三种校验实名的方法 NO_CHECK OPTION_CHECK FORCE_CHECK
're_user_name'=>'', //OPTION_CHECK FORCE_CHECK 校验实名的时候必须提交
'amount' => (1-0.006)*$data['total']*100, //单位为分
'amount' => 0.5*100, //单位为分
'desc' => '提现到零钱',
'spbill_create_ip' => '192.168.0.1', //发起交易的IP地址
];
$result = $merchantPay->send($merchantPayData);
var_dump($result);exit;
return $result;
}
}
\ No newline at end of file
... ...