zhangyang пре 6 година
родитељ
комит
0804cca605

BIN
bin/Win32/Debug/zhipuzi_pay_plugin/db/pos.db


+ 83 - 0
bin/Win32/Debug/zhipuzi_pay_plugin/log/pos.log

@@ -3337,3 +3337,86 @@
 2019-08-18 19:13:29[INFO] - sign:1474AF2BF34F66D6EF13912842DC23AD [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:132]
 2019-08-18 19:13:29[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&order_no=ofjbPdtC7iMKPqbKEeYC&shishou_value=0.01&sign=1474AF2BF34F66D6EF13912842DC23AD&timestamp=1566126809&username=zhangyang&yingshou_value=0.01&zhaoling_value=0&zhifu_code=135025576497423683&zhifu_type=7 [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:152]
 2019-08-18 19:13:31[INFO] - response:{"errcode":0,"errmsg":"ok","data":{"status":"password","trade_no":"201908189810052574681570"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:157]
+2019-08-18 19:33:13[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:33:13[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:33:13[INFO] - save params fail [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:396]
+2019-08-18 19:33:13[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:33:13[INFO] - save params fail [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:396]
+2019-08-18 19:33:13[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:33:13[INFO] - save params success [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:331]
+2019-08-18 19:33:13[INFO] - postString:nonce=123456&timestamp=1566127993&url=https://pf-api.zhipuzi.com/pos/userlogin/userlogin&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:193]
+2019-08-18 19:33:13[INFO] - sign:99004E4CAA691AEFB7DD0F67440FB9ED [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:203]
+2019-08-18 19:33:13[INFO] - postString:nonce=123456&sign=99004E4CAA691AEFB7DD0F67440FB9ED&timestamp=1566127993&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:223]
+2019-08-18 19:33:14[INFO] - response:{"errcode":0,"errmsg":"","data":{"lwm_sess_token":"dsdedv06pj9aq22l0iptcmhkv0","version_type":"1"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:228]
+2019-08-18 19:33:14[INFO] - response:{"errcode":0,"errmsg":"","data":{"lwm_sess_token":"dsdedv06pj9aq22l0iptcmhkv0","version_type":"1"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:40]
+2019-08-18 19:33:14[INFO] - login success! [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:91]
+2019-08-18 19:33:14[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:33:14[INFO] - save params success [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:392]
+2019-08-18 19:33:14[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:33:14[INFO] - save params success [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:331]
+2019-08-18 19:33:52[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&order_no=v3NYmn7VUTepvvQvFJAd&shishou_value=0.01&timestamp=1566128032&url=https://cyapi.zhipuzi.com/pos/shouyin/sendorder&username=zhangyang&yingshou_value=0.01&zhaoling_value=0&zhifu_code=134809552903664295&zhifu_type=7 [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:122]
+2019-08-18 19:33:52[INFO] - sign:7BA4D7C0E1483B8E9DDC7A961F19D5EF [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:132]
+2019-08-18 19:33:52[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&order_no=v3NYmn7VUTepvvQvFJAd&shishou_value=0.01&sign=7BA4D7C0E1483B8E9DDC7A961F19D5EF&timestamp=1566128032&username=zhangyang&yingshou_value=0.01&zhaoling_value=0&zhifu_code=134809552903664295&zhifu_type=7 [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:152]
+2019-08-18 19:33:53[INFO] - response:{"errcode":0,"errmsg":"ok","data":{"status":"password","trade_no":"201908185098102557479491"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:157]
+2019-08-18 19:52:53[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:52:53[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:52:53[INFO] - save params fail [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:396]
+2019-08-18 19:52:53[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:52:53[INFO] - save params fail [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:396]
+2019-08-18 19:52:53[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:52:53[INFO] - save params success [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:331]
+2019-08-18 19:52:53[INFO] - postString:nonce=123456&timestamp=1566129173&url=https://pf-api.zhipuzi.com/pos/userlogin/userlogin&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:193]
+2019-08-18 19:52:53[INFO] - sign:835B7621CB99EB8B7F6792ACA4ED4E2E [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:203]
+2019-08-18 19:52:53[INFO] - postString:nonce=123456&sign=835B7621CB99EB8B7F6792ACA4ED4E2E&timestamp=1566129173&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:223]
+2019-08-18 19:52:54[INFO] - response:{"errcode":0,"errmsg":"","data":{"lwm_sess_token":"p620m49a8dnnb0pfiuokdpjb42","version_type":"1"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:228]
+2019-08-18 19:52:54[INFO] - response:{"errcode":0,"errmsg":"","data":{"lwm_sess_token":"p620m49a8dnnb0pfiuokdpjb42","version_type":"1"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:40]
+2019-08-18 19:52:54[INFO] - login success! [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:91]
+2019-08-18 19:52:54[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:52:54[INFO] - save params success [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:392]
+2019-08-18 19:52:54[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 19:52:54[INFO] - save params success [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:331]
+2019-08-18 19:53:11[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&order_no=DdD5cgcoVr0XyKMKdqlh&shishou_value=0.01&timestamp=1566129191&url=https://cyapi.zhipuzi.com/pos/shouyin/sendorder&username=zhangyang&yingshou_value=0.01&zhaoling_value=0&zhifu_code=134948917715099597&zhifu_type=7 [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:122]
+2019-08-18 19:53:11[INFO] - sign:FC4DEAA108CEAF80756D3189EB487C5F [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:132]
+2019-08-18 19:53:11[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&order_no=DdD5cgcoVr0XyKMKdqlh&shishou_value=0.01&sign=FC4DEAA108CEAF80756D3189EB487C5F&timestamp=1566129191&username=zhangyang&yingshou_value=0.01&zhaoling_value=0&zhifu_code=134948917715099597&zhifu_type=7 [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:152]
+2019-08-18 19:53:12[INFO] - response:{"errcode":0,"errmsg":"ok","data":{"status":"password","trade_no":"201908185798495397162974"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:157]
+2019-08-18 19:53:12[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&timestamp=1566129192&trade_no=201908185798495397162974&url=https://cyapi.zhipuzi.com/pos/shouyin/queryorderstatus&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:122]
+2019-08-18 19:53:12[INFO] - sign:327FA0B27B26C295179925DB47CE3CAB [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:132]
+2019-08-18 19:53:12[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&sign=327FA0B27B26C295179925DB47CE3CAB&timestamp=1566129192&trade_no=201908185798495397162974&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:152]
+2019-08-18 19:53:13[INFO] - response:{"errcode":0,"errmsg":"ok","data":{"status":"fail"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:157]
+2019-08-18 19:53:25[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&timestamp=1566129205&trade_no=201908185798495397162974&url=https://cyapi.zhipuzi.com/pos/shouyin/queryorderstatus&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:122]
+2019-08-18 19:53:25[INFO] - sign:423D1D21398E62066349D6E657F2E84C [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:132]
+2019-08-18 19:53:25[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&sign=423D1D21398E62066349D6E657F2E84C&timestamp=1566129205&trade_no=201908185798495397162974&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:152]
+2019-08-18 19:53:25[INFO] - response:{"errcode":0,"errmsg":"ok","data":{"status":"fail"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:157]
+2019-08-18 19:53:26[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&timestamp=1566129206&trade_no=201908185798495397162974&url=https://cyapi.zhipuzi.com/pos/shouyin/queryorderstatus&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:122]
+2019-08-18 19:53:26[INFO] - sign:2A85A24434538E3C4BF413B2878D9A32 [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:132]
+2019-08-18 19:53:26[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&sign=2A85A24434538E3C4BF413B2878D9A32&timestamp=1566129206&trade_no=201908185798495397162974&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:152]
+2019-08-18 19:53:27[INFO] - response:{"errcode":0,"errmsg":"ok","data":{"status":"fail"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:157]
+2019-08-18 19:53:28[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&timestamp=1566129208&trade_no=201908185798495397162974&url=https://cyapi.zhipuzi.com/pos/shouyin/queryorderstatus&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:122]
+2019-08-18 19:53:28[INFO] - sign:F04A4956DD9F6B03FDFAE8AB68F57D0E [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:132]
+2019-08-18 19:53:28[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&sign=F04A4956DD9F6B03FDFAE8AB68F57D0E&timestamp=1566129208&trade_no=201908185798495397162974&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:152]
+2019-08-18 19:53:28[INFO] - response:{"errcode":0,"errmsg":"ok","data":{"status":"fail"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:157]
+2019-08-18 19:53:29[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&timestamp=1566129209&trade_no=201908185798495397162974&url=https://cyapi.zhipuzi.com/pos/shouyin/queryorderstatus&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:122]
+2019-08-18 19:53:29[INFO] - sign:AEC6CED0BBECC244605D5D04FD0AEFFC [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:132]
+2019-08-18 19:53:29[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&sign=AEC6CED0BBECC244605D5D04FD0AEFFC&timestamp=1566129209&trade_no=201908185798495397162974&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:152]
+2019-08-18 19:53:29[INFO] - response:{"errcode":0,"errmsg":"ok","data":{"status":"fail"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:157]
+2019-08-18 19:53:35[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&timestamp=1566129215&trade_no=201908185798495397162974&url=https://cyapi.zhipuzi.com/pos/shouyin/queryorderstatus&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:122]
+2019-08-18 19:53:35[INFO] - sign:31AE803FF33264A5059763A817F468D3 [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:132]
+2019-08-18 19:53:35[INFO] - postString:machinecode=d31a20c2567006c5&nonce=123456&sign=31AE803FF33264A5059763A817F468D3&timestamp=1566129215&trade_no=201908185798495397162974&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:152]
+2019-08-18 19:53:35[INFO] - response:{"errcode":0,"errmsg":"ok","data":{"status":"success"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:157]
+2019-08-18 20:08:18[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 20:08:18[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 20:08:18[INFO] - save params fail [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:396]
+2019-08-18 20:08:18[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 20:08:18[INFO] - save params fail [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:396]
+2019-08-18 20:08:18[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 20:08:18[INFO] - save params success [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:331]
+2019-08-18 20:08:18[INFO] - postString:nonce=123456&timestamp=1566130098&url=https://pf-api.zhipuzi.com/pos/userlogin/userlogin&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:193]
+2019-08-18 20:08:18[INFO] - sign:EF5053E77B48F47E58306C27B650C07B [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:203]
+2019-08-18 20:08:18[INFO] - postString:nonce=123456&sign=EF5053E77B48F47E58306C27B650C07B&timestamp=1566130098&username=zhangyang [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:223]
+2019-08-18 20:08:19[INFO] - response:{"errcode":0,"errmsg":"","data":{"lwm_sess_token":"rjc12po3hi645kps016uje9he0","version_type":"1"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:228]
+2019-08-18 20:08:19[INFO] - response:{"errcode":0,"errmsg":"","data":{"lwm_sess_token":"rjc12po3hi645kps016uje9he0","version_type":"1"}} [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:40]
+2019-08-18 20:08:19[INFO] - login success! [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\network\czhipuzihttpclient.cpp:91]
+2019-08-18 20:08:19[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 20:08:19[INFO] - save params success [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:392]
+2019-08-18 20:08:19[INFO] - Opened database successfully [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:35]
+2019-08-18 20:08:19[INFO] - save params success [d:\work\zhipuzi_pay_plugin\zhipuzi_pay_plugin\tool\csqlite3.cpp:331]

+ 27 - 2
bin/Win32/Debug/zhipuzi_pay_plugin/skin/shoukuan_wnd.xml

@@ -3,6 +3,7 @@
 	<Font id="0" name="微软雅黑" size="24" />
 	<Font id="1" name="微软雅黑" size="42" />
 	<Font id="2" name="微软雅黑" size="18" />
+	<Font id="3" name="微软雅黑" size="36" />
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout height="44" bkcolor="0xFF3CCA50">
 			<Label name="shoukuan_version" text="收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="0"/>
@@ -31,15 +32,39 @@
 				<Control></Control>
 			</HorizontalLayout>	
 
-			<HorizontalLayout height="50">
+			<HorizontalLayout height="50" padding="0,20,0,0">
 				<Control></Control>
 				<Label name="shoukuanresult" font="2" width="400" height="50" multiline="true" text="" visible="false" textcolor="#FF0000" align="center" />
 				<Control></Control>
 			</HorizontalLayout>			
 		</VerticalLayout>
 		
-		<VerticalLayout name="shoukuan_paying_layout">
+		<VerticalLayout name="shoukuan_paying_layout" visible="false">
+			<HorizontalLayout name="paying_loading" height="24" padding="0, 20, 0, 20">
+				<Control></Control>
+				<VerticalLayout width="24">
+					<Control></Control>
+					<HorizontalLayout height="24">
+						<GifAnim bkimage="loading.gif" autosize="true"></GifAnim>
+					</HorizontalLayout>
+					<Control></Control>
+				</VerticalLayout>
+				<Control></Control>
+			</HorizontalLayout>
+			
+			<Label height="40" padding="0,10,0,10" name="shoukuan_paying_money" text="付款金额:" font="3" textcolor="0xFFFF6347" align="center"></Label>
+			
+			<Label height="32" padding="0,10,0,10" name="shoukuan_paying_status" text="请求支付中..." font="2" textcolor="0xFFFF6347" align="center"></Label>
+			
+			<Label height="60" padding="20,30,20,0" name="shouyin_paying_attention" text="如果用户没有支付成功,则请确认客户不再进行支付时再关闭此窗口" font="2" textcolor="0xFF808080" multiline="true" align="cener" />
+		</VerticalLayout>
+		
+		<VerticalLayout name="shoukuan_pay_success_layout" visible="false">
+			
+			
+			<Label height="40" padding="0,10,0,10" name="shoukuan_paying_money" text="成功收款:" font="3" textcolor="0xFFFF6347" align="center"></Label>
 			
+			<Label height="60" padding="20,30,20,0" name="shouyin_paying_attention" text="如果用户没有支付成功,则请确认客户不再进行支付时再关闭此窗口" font="2" textcolor="0xFF808080" multiline="true" align="cener" />
 		</VerticalLayout>
     </VerticalLayout>
 </Window>

BIN
bin/Win32/Debug/zhipuzi_pay_plugin/zhipuzi_pay_plugin.exe


+ 4 - 0
zhipuzi_pay_plugin/helper/define.h

@@ -17,6 +17,10 @@
 
 #define WM_SHOUKUAN_UPDATE_FOCUS 10011
 
+#define WM_SHOUKUAN_STATUS_NEEDPASSWORD 10012
+#define WM_SHOUKUAN_STATUS_SUCCESS 10013
+#define WM_SHOUKUAN_STATUS_FAIL 10014
+
 #define WM_HOOK_MESSAGE 12222
 #define WM_WATCH_WND_UPDATE 12223
 

+ 150 - 17
zhipuzi_pay_plugin/wnd/CShoukuanWnd.cpp

@@ -1,4 +1,4 @@
-#include "../pch/pch.h"
+#include "../pch/pch.h"
 #include "CShoukuanWnd.h"
 
 #include "CValueWnd.h"
@@ -32,7 +32,7 @@ LRESULT CShoukuanWnd::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
 	styleValue &= ~WS_CAPTION;
 	::SetWindowLong(*this, GWL_STYLE, styleValue | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
 
-	// 把自己的窗口句柄与窗口绘制管理器挂接在一起
+	// 把自己的窗口句柄与窗口绘制管理器挂接在一起
 	m_pm.Init(m_hWnd);
 
 	m_pm.AddPreMessageFilter(this);
@@ -42,10 +42,10 @@ LRESULT CShoukuanWnd::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
 	CControlUI* pRoot = builder.Create(_T("shoukuan_wnd.xml"), (UINT)0, NULL, &m_pm);
 	ASSERT(pRoot && "Failed to parse XML");
 
-	// 把这些控件绘制到本窗口上
+	// 鎶婅繖浜涙帶浠剁粯鍒跺埌鏈�獥鍙d笂
 	m_pm.AttachDialog(pRoot);
 
-	// 把自己加入到CPaintManagerUI的m_aNotifiers数组中,用于处理Notify函数
+	// 鎶婅嚜宸卞姞鍏ュ埌CPaintManagerUI鐨刴_aNotifiers鏁扮粍涓�紝鐢ㄤ簬澶勭悊Notify鍑芥暟
 	m_pm.AddNotifier(this);
 
 	Init();
@@ -60,7 +60,7 @@ LRESULT CShoukuanWnd::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHa
 }
 
 /*
- *这个是窗口被销毁的时候调用的
+ *杩欎釜鏄�獥鍙h�閿€姣佺殑鏃跺€欒皟鐢ㄧ殑
  **/
 LRESULT CShoukuanWnd::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 {
@@ -174,6 +174,15 @@ LRESULT CShoukuanWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
 	case WM_SHOUKUAN_UPDATE_FOCUS:
 		lRes = OnShoukuanUpdateFocus(uMsg, wParam, lParam, bHandled);
 		break;
+	case WM_SHOUKUAN_STATUS_NEEDPASSWORD:
+		lRes = OnShoukuanNeedPassword(uMsg, wParam, lParam, bHandled);
+		break;
+	case WM_SHOUKUAN_STATUS_SUCCESS:
+		lRes = OnShoukuanSuccess(uMsg, wParam, lParam, bHandled);
+		break;
+	case WM_SHOUKUAN_STATUS_FAIL:
+		lRes = OnShoukuanFail(uMsg, wParam, lParam, bHandled);
+		break;
 	default:
 		bHandled = FALSE;
 	}
@@ -248,7 +257,7 @@ void CShoukuanWnd::UpdateFocus()
 {
 	if (m_is_money_init == false)
 	{
-		//如果没初始化,这个时候有2个编辑框,不能抢焦点
+		//濡傛灉娌″垵濮嬪寲锛岃繖涓�椂鍊欐湁2涓�紪杈戞�锛屼笉鑳芥姠鐒︾偣
 		CEditUI* pMoneyEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("money_edit")));
 
 		pMoneyEdit->SetFocus();
@@ -261,11 +270,37 @@ void CShoukuanWnd::UpdateFocus()
 	}
 }
 
+LRESULT CShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+	CLabelUI* pFukuanEdit = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_paying_status")));
+	pFukuanEdit->SetText(L"用户支付中,需要输入密码");
+
+	//需要用户输入密码,开始查询状态
+	std::thread(&CShoukuanWnd::HandleShoukuanPassword, this).detach();
+
+	bHandled = true;
+	return 0;
+}
+
+LRESULT CShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
+	paying_layout->SetVisible(false);
+
+	bHandled = true;
+	return 0;
+}
+
+LRESULT CShoukuanWnd::OnShoukuanFail(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+	return 0;
+}
+
 void CShoukuanWnd::StartShoukuan()
 {
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 
-	//检查收款金额
+	//检查收款金额
 	if (m_is_money_init == false)
 	{
 		CEditUI* pMoneyEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("money_edit")));
@@ -273,7 +308,7 @@ void CShoukuanWnd::StartShoukuan()
 
 		if (m_money == L"")
 		{
-			pLabel->SetText(L"收款金额不能为空,请重新输入!");
+			pLabel->SetText(L"收款金额不能为空,请重新输入!");
 			pLabel->SetVisible(true);
 
 			return;
@@ -281,14 +316,14 @@ void CShoukuanWnd::StartShoukuan()
 
 		if (m_money == L"0.00")
 		{
-			pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
+			pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
 			pLabel->SetVisible(true);
 
 			return;
 		}
 	}
 
-	//先判断收款码的格式是否正确
+	//先判断收款码的格式是否正确
 	CEditUI* pFukuanmaEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("fukuanma_edit")));
 	std::wstring ws_Fukuanma = pFukuanmaEdit->GetText();
 	std::string s_Fukuanma = CLewaimaiString::UnicodeToUTF8(ws_Fukuanma);
@@ -296,7 +331,7 @@ void CShoukuanWnd::StartShoukuan()
 	int length = s_Fukuanma.size();
 	if (length != 18)
 	{
-		pLabel->SetText(L"收款码格式不对,请检查后重新输入!");
+		pLabel->SetText(L"收款码格式不对,请检查后重新输入!");
 		pLabel->SetVisible(true);
 
 		return;
@@ -307,8 +342,8 @@ void CShoukuanWnd::StartShoukuan()
 		char c = *(s_Fukuanma.c_str() + i);
 		if (isdigit(c) == 0)
 		{
-			//不是数字
-			pLabel->SetText(L"收款码格式不对,请检查后重新输入!");
+			//涓嶆槸鏁板瓧
+			pLabel->SetText(L"收款码格式不对,请检查后重新输入!");
 			pLabel->SetVisible(true);
 
 			return;
@@ -328,7 +363,7 @@ void CShoukuanWnd::StartShoukuan()
 		&& s_Fukuanma.find("29") == s_Fukuanma.npos \
 		&& s_Fukuanma.find("30") == s_Fukuanma.npos)
 	{
-		pLabel->SetText(L"收款码格式不对,请检查后重新输入!");
+		pLabel->SetText(L"收款码格式不对,请检查后重新输入!");
 		pLabel->SetVisible(true);
 
 		return;
@@ -336,17 +371,30 @@ void CShoukuanWnd::StartShoukuan()
 
 	m_fukuanma = ws_Fukuanma;
 
-	//开启一个线程,开始处理登录
+	CVerticalLayoutUI* before_pay_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_before_pay_layout")));
+	before_pay_layout->SetVisible(false);
+
+	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
+	paying_layout->SetVisible(true);
+
+	CLabelUI* pMoneyPaying = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_paying_money")));
+
+	std::wstring valueInfo = L"付款金额:¥" + m_money;
+	pMoneyPaying->SetText(valueInfo.c_str());
+
+	//开启一个线程,开始处理登录
 	std::thread(&CShoukuanWnd::HandleShoukuan, this).detach();
 }
 
 void CShoukuanWnd::HandleShoukuan()
 {
-	//生成随机的order_no
+	//鐢熸垚闅忔満鐨刼rder_no
 
 	std::map<string, string> params;
 
 	params["order_no"] = CRandomHelper::GetRandString(20);
+	m_order_no = params["order_no"];
+
 	params["yingshou_value"] = CLewaimaiString::UnicodeToUTF8(m_money);
 	params["shishou_value"] = CLewaimaiString::UnicodeToUTF8(m_money);
 	params["zhaoling_value"] = to_string(0);
@@ -355,6 +403,8 @@ void CShoukuanWnd::HandleShoukuan()
 
 	std::string response;
 
+	m_shoukuan_status = 1;
+
 	std::string url = "/shouyin/sendorder";
 	CZhipuziHttpClient::Request(url.c_str(), params, response);
 
@@ -382,7 +432,90 @@ void CShoukuanWnd::HandleShoukuan()
 	}
 
 	rapidjson::Value& data = document["data"];
-	rapidjson::Value& v_count = data["count"];
+	rapidjson::Value& status = data["status"];
+
+	std::string s_status = status.GetString();
+
+	if (s_status == "success")
+	{
+		//鏀�粯鎴愬姛
+		m_shoukuan_status = 3;
+
+		SendMessage(WM_SHOUKUAN_STATUS_SUCCESS, 0, 0);
+	}
+	else if (s_status == "fail")
+	{
+		//鏀�粯澶辫触
+		m_shoukuan_status = 4;
+
+		SendMessage(WM_SHOUKUAN_STATUS_FAIL, 0, 0);
+	}
+	else if (s_status == "password")
+	{
+		m_shoukuan_status = 2;
+
+		m_trade_no = data["trade_no"].GetString();
+
+		//需要查询支付状态
+		SendMessage(WM_SHOUKUAN_STATUS_NEEDPASSWORD, 0, 0);
+	}
+}
+
+void CShoukuanWnd::HandleShoukuanPassword()
+{
+	std::map<string, string> params;
+
+	params["trade_no"] = m_trade_no;
+
+	while (m_shoukuan_status == 2)
+	{
+		std::string response;
+
+		std::string url = "/shouyin/queryorderstatus";
+		CZhipuziHttpClient::Request(url.c_str(), params, response);
+
+		rapidjson::Document document;
+		document.Parse(response.c_str());
+
+		if (document.HasParseError())
+		{
+			LOG_INFO("parse response error!");
+			return;
+		}
+
+		if (!document.HasMember("errcode") || !document.HasMember("errmsg") || !document.HasMember("data"))
+		{
+			LOG_INFO("json error!");
+			return;
+		}
+
+		rapidjson::Value& v_errcode = document["errcode"];
+		int errcode = v_errcode.GetInt();
+		if (errcode != 0)
+		{
+			LOG_INFO("response failed! message:" << document["errmsg"].GetString());
+			return;
+		}
+
+		rapidjson::Value& data = document["data"];
+		rapidjson::Value& status = data["status"];
+
+		std::string s_status = status.GetString();
+
+		if (s_status == "success")
+		{
+			//鏀�粯鎴愬姛
+			m_shoukuan_status = 3;
+
+			SendMessage(WM_SHOUKUAN_STATUS_SUCCESS, 0, 0);
+
+			break;
+		}
+		else
+		{
+			Sleep(1000);
+		}
+	}
 }
 
 void CShoukuanWnd::ShoukuanSuccess()

+ 17 - 0
zhipuzi_pay_plugin/wnd/CShoukuanWnd.h

@@ -48,6 +48,12 @@ public:
 
 	LRESULT OnShoukuanUpdateFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
 
+	LRESULT OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+
+	LRESULT OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+
+	LRESULT OnShoukuanFail(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+
 	LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
 
 	LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
@@ -56,10 +62,15 @@ public:
 
 	void UpdateFocus();
 
+	//点击确认,开始执行收款
 	void StartShoukuan();
 
+	//处理收款
 	void HandleShoukuan();
 
+	//处理收款的密码查询
+	void HandleShoukuanPassword();
+
 	void ShoukuanSuccess();
 
 	void ShoukuanError();
@@ -73,5 +84,11 @@ public:
 	std::wstring m_money;
 
 	std::wstring m_fukuanma;
+
+	std::string m_order_no;
+	std::string m_trade_no;
+
+	//收款状态 0:未开始 1:请求发给服务器了,但是暂时还没得到反馈 2:查询密码中 3:成功 4:失败
+	int m_shoukuan_status = 0;
 };