├── wxapp-todos ├── pages │ ├── pay │ │ ├── pay.json │ │ ├── pay.js │ │ ├── pay.wxml │ │ └── pay.wxss │ ├── index │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ └── logs │ │ ├── logs.json │ │ ├── logs.js │ │ ├── logs.wxml │ │ └── logs.wxss ├── images │ ├── board.png │ ├── home.png │ ├── note.png │ ├── plus.png │ ├── board-actived.png │ ├── home-actived.png │ └── note-actived.png ├── app.wxss ├── app.js ├── app.json └── utils │ └── md5.js ├── wxpay ├── src │ └── main │ │ ├── resources │ │ ├── config.properties │ │ ├── log4j.properties │ │ ├── redis.properties │ │ ├── mysql.properties │ │ └── applicationContext.xml │ │ ├── webapp │ │ ├── index.jsp │ │ ├── views │ │ │ └── payInfo.jsp │ │ └── WEB-INF │ │ │ ├── jsp │ │ │ ├── error.jsp │ │ │ └── index.jsp │ │ │ ├── web.xml │ │ │ └── springMVC-servlet.xml │ │ └── java │ │ └── luluteam │ │ └── wxpay │ │ ├── util │ │ ├── SpringContextHolder.java │ │ ├── TimeUtils.java │ │ ├── RandomUtils.java │ │ ├── HttpResult.java │ │ ├── CommonUtil.java │ │ └── HttpUtil.java │ │ ├── constant │ │ └── Constant.java │ │ ├── entity │ │ └── PayInfo.java │ │ └── controller │ │ └── PayController.java └── .idea │ ├── copyright │ └── profiles_settings.xml │ ├── encodings.xml │ ├── modules.xml │ ├── inspectionProfiles │ ├── profiles_settings.xml │ └── Project_Default.xml │ ├── artifacts │ └── wxpay_war.xml │ ├── libraries │ ├── Maven__asm_asm_3_3_1.xml │ ├── Maven__ognl_ognl_2_6_9.xml │ ├── Maven__junit_junit_4_10.xml │ ├── Maven__antlr_antlr_2_7_7.xml │ ├── Maven__cglib_cglib_2_2_2.xml │ ├── Maven__dom4j_dom4j_1_6_1.xml │ ├── Maven__jaxen_jaxen_1_1_3.xml │ ├── Maven__c3p0_c3p0_0_9_1_1.xml │ ├── Maven__log4j_log4j_1_2_16.xml │ ├── Maven__javax_servlet_jstl_1_2.xml │ ├── Maven__wsdl4j_wsdl4j_1_6_2.xml │ ├── Maven__asm_asm_attrs_1_5_3.xml │ ├── Maven__xpp3_xpp3_min_1_1_4c.xml │ ├── Maven__org_dbunit_dbunit_2_2_2.xml │ ├── Maven__org_apache_avro_avro_1_5_1.xml │ ├── Maven__redis_clients_jedis_2_7_0.xml │ ├── Maven__xerces_xercesImpl_2_6_2.xml │ ├── Maven__commons_io_commons_io_2_3.xml │ ├── Maven__org_slf4j_slf4j_api_1_6_4.xml │ ├── Maven__org_slf4j_slf4j_nop_1_4_3.xml │ ├── Maven__org_objenesis_objenesis_1_0.xml │ ├── Maven__aopalliance_aopalliance_1_0.xml │ ├── Maven__com_alibaba_fastjson_1_2_20.xml │ ├── Maven__net_sf_ehcache_ehcache_1_2_3.xml │ ├── Maven__opensymphony_sitemesh_2_4_2.xml │ ├── Maven__org_apache_cxf_cxf_api_2_6_1.xml │ ├── Maven__org_aspectj_aspectjrt_1_6_9.xml │ ├── Maven__org_unitils_unitils_orm_3_3.xml │ ├── Maven__com_google_code_gson_gson_2_2_4.xml │ ├── Maven__com_google_guava_guava_11_0_2.xml │ ├── Maven__javax_servlet_servlet_api_2_5.xml │ ├── Maven__javax_xml_bind_jaxb_api_2_2_5.xml │ ├── Maven__org_apache_neethi_neethi_3_0_2.xml │ ├── Maven__org_unitils_unitils_core_3_3.xml │ ├── Maven__xerces_xmlParserAPIs_2_6_2.xml │ ├── Maven__commons_dbcp_commons_dbcp_1_4.xml │ ├── Maven__commons_lang_commons_lang_2_6.xml │ ├── Maven__commons_pool_commons_pool_1_6.xml │ ├── Maven__junit_addons_junit_addons_1_4.xml │ ├── Maven__xml_resolver_xml_resolver_1_2.xml │ ├── Maven__org_apache_solr_solr_core_3_5_0.xml │ ├── Maven__com_sun_xml_bind_jaxb_impl_2_2_5.xml │ ├── Maven__org_hamcrest_hamcrest_core_1_1.xml │ ├── Maven__org_mockito_mockito_core_1_9_0.xml │ ├── Maven__org_quartz_scheduler_quartz_2_1_5.xml │ ├── Maven__org_slf4j_slf4j_log4j12_1_6_4.xml │ ├── Maven__org_unitils_unitils_dbunit_3_3.xml │ ├── Maven__org_unitils_unitils_spring_3_3.xml │ ├── Maven__commons_codec_commons_codec_1_6.xml │ ├── Maven__org_apache_solr_solr_solrj_3_5_0.xml │ ├── Maven__org_slf4j_jcl_over_slf4j_1_6_4.xml │ ├── Maven__org_apache_cxf_cxf_rt_core_2_6_1.xml │ ├── Maven__org_aspectj_aspectjweaver_1_6_9.xml │ ├── Maven__org_freemarker_freemarker_2_3_19.xml │ ├── Maven__org_hibernate_hibernate_3_2_5_ga.xml │ ├── Maven__org_jgroups_jgroups_3_0_9_Final.xml │ ├── Maven__poi_poi_2_5_1_final_20040804.xml │ ├── Maven__net_sf_ehcache_ehcache_core_2_5_2.xml │ ├── Maven__org_unitils_unitils_database_3_3.xml │ ├── Maven__com_google_code_findbugs_jsr305_1_3_9.xml │ ├── Maven__org_javassist_javassist_3_15_0_GA.xml │ ├── Maven__com_thoughtworks_xstream_xstream_1_3_1.xml │ ├── Maven__org_apache_lucene_lucene_core_3_5_0.xml │ ├── Maven__org_apache_lucene_lucene_misc_3_5_0.xml │ ├── Maven__org_codehaus_woodstox_stax2_api_3_1_1.xml │ ├── Maven__commons_logging_commons_logging_1_2.xml │ ├── Maven__org_apache_commons_commons_lang3_3_1.xml │ ├── Maven__org_apache_commons_commons_pool2_2_3.xml │ ├── Maven__org_apache_cxf_cxf_rt_ws_addr_2_6_1.xml │ ├── Maven__com_thoughtworks_paranamer_paranamer_2_3.xml │ ├── Maven__mysql_mysql_connector_java_5_0_5.xml │ ├── Maven__org_powermock_powermock_core_1_4_12.xml │ ├── Maven__javax_persistence_persistence_api_1_0.xml │ ├── Maven__org_apache_httpcomponents_httpclient_4_5.xml │ ├── Maven__org_apache_httpcomponents_httpcore_4_4_1.xml │ ├── Maven__org_apache_lucene_lucene_memory_3_5_0.xml │ ├── Maven__org_apache_lucene_lucene_smartcn_3_5_0.xml │ ├── Maven__org_apache_lucene_lucene_spatial_3_5_0.xml │ ├── Maven__org_apache_lucene_lucene_stempel_3_5_0.xml │ ├── Maven__org_apache_cxf_cxf_rt_ws_policy_2_6_1.xml │ ├── Maven__org_unitils_unitils_dbmaintainer_3_3.xml │ ├── Maven__org_apache_lucene_lucene_grouping_3_5_0.xml │ ├── Maven__org_apache_solr_solr_commons_csv_3_5_0.xml │ ├── Maven__org_xerial_snappy_snappy_java_1_0_1_rc3.xml │ ├── Maven__org_powermock_powermock_reflect_1_4_12.xml │ ├── Maven__javax_validation_validation_api_1_0_0_GA.xml │ ├── Maven__org_apache_lucene_lucene_analyzers_3_5_0.xml │ ├── Maven__org_jboss_logging_jboss_logging_3_1_0_GA.xml │ ├── Maven__commons_beanutils_commons_beanutils_1_8_3.xml │ ├── Maven__org_apache_cxf_cxf_rt_bindings_xml_2_6_1.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_0_1.xml │ ├── Maven__org_apache_ws_xmlschema_xmlschema_core_2_0_2.xml │ ├── Maven__org_hibernate_hibernate_core_4_1_4_Final.xml │ ├── Maven__org_apache_cxf_cxf_rt_bindings_soap_2_6_1.xml │ ├── Maven__org_apache_lucene_lucene_highlighter_3_5_0.xml │ ├── Maven__org_codehaus_jackson_jackson_core_asl_1_9_7.xml │ ├── Maven__org_springframework_spring_tx_3_1_1_RELEASE.xml │ ├── Maven__commons_fileupload_commons_fileupload_1_2_2.xml │ ├── Maven__org_apache_lucene_lucene_spellchecker_3_5_0.xml │ ├── Maven__org_apache_solr_solr_analysis_extras_3_5_0.xml │ ├── Maven__org_eclipse_jetty_jetty_jsp_7_6_3_v20120416.xml │ ├── Maven__org_apache_cxf_cxf_rt_frontend_jaxws_2_6_1.xml │ ├── Maven__org_codehaus_woodstox_woodstox_core_asl_4_1_2.xml │ ├── Maven__org_hibernate_hibernate_search_4_1_1_Final.xml │ ├── Maven__org_infinispan_infinispan_core_5_1_4_FINAL.xml │ ├── Maven__org_powermock_powermock_api_mockito_1_4_12.xml │ ├── Maven__org_powermock_powermock_api_support_1_4_12.xml │ ├── Maven__org_springframework_spring_aop_3_1_1_RELEASE.xml │ ├── Maven__org_springframework_spring_asm_3_1_1_RELEASE.xml │ ├── Maven__org_springframework_spring_orm_3_1_1_RELEASE.xml │ ├── Maven__org_springframework_spring_oxm_3_1_1_RELEASE.xml │ ├── Maven__org_springframework_spring_web_3_1_1_RELEASE.xml │ ├── Maven__commons_collections_commons_collections_3_2_1.xml │ ├── Maven__org_apache_cxf_cxf_rt_frontend_simple_2_6_1.xml │ ├── Maven__org_apache_cxf_cxf_rt_transports_http_2_6_1.xml │ ├── Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_7.xml │ ├── Maven__org_rhq_helpers_rhq_pluginAnnotations_3_0_4.xml │ ├── Maven__org_springframework_spring_core_3_1_1_RELEASE.xml │ ├── Maven__org_springframework_spring_jdbc_3_1_1_RELEASE.xml │ ├── Maven__org_springframework_spring_test_3_1_1_RELEASE.xml │ ├── Maven__org_hibernate_hibernate_ehcache_4_1_4_Final.xml │ ├── Maven__org_apache_cxf_cxf_rt_databinding_jaxb_2_6_1.xml │ ├── Maven__org_powermock_powermock_module_junit4_1_4_12.xml │ ├── Maven__org_springframework_spring_beans_3_1_1_RELEASE.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_0_1.xml │ ├── Maven__org_hibernate_hibernate_validator_4_3_0_Final.xml │ ├── Maven__org_springframework_spring_webmvc_3_1_1_RELEASE.xml │ ├── Maven__org_springframework_spring_context_3_1_1_RELEASE.xml │ ├── Maven__org_eclipse_jetty_orbit_org_eclipse_jdt_core_3_7_1.xml │ ├── Maven__org_hibernate_hibernate_search_orm_4_1_1_Final.xml │ ├── Maven__org_jboss_marshalling_jboss_marshalling_1_3_11_GA.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_0_1.xml │ ├── Maven__org_eclipse_jetty_orbit_javax_el_2_1_0_v201105211819.xml │ ├── Maven__org_hibernate_hibernate_entitymanager_4_1_4_Final.xml │ ├── Maven__org_hibernate_hibernate_search_engine_4_1_1_Final.xml │ ├── Maven__org_springframework_spring_expression_3_1_1_RELEASE.xml │ ├── Maven__org_eclipse_jetty_orbit_com_sun_el_1_0_0_v201105211818.xml │ ├── Maven__org_springframework_data_spring_data_jpa_1_0_3_RELEASE.xml │ ├── Maven__org_eclipse_jetty_aggregate_jetty_webapp_7_6_3_v20120416.xml │ ├── Maven__org_powermock_powermock_module_junit4_common_1_4_12.xml │ ├── Maven__org_hibernate_hibernate_search_analyzers_4_1_1_Final.xml │ ├── Maven__org_jboss_marshalling_jboss_marshalling_river_1_3_11_GA.xml │ ├── Maven__org_eclipse_jetty_orbit_javax_servlet_2_5_0_v201103041518.xml │ ├── Maven__org_hibernate_hibernate_search_infinispan_4_1_1_Final.xml │ ├── Maven__org_infinispan_infinispan_lucene_directory_5_1_4_FINAL.xml │ ├── Maven__org_springframework_spring_context_support_3_1_1_RELEASE.xml │ ├── Maven__com_fasterxml_jackson_jaxrs_jackson_jaxrs_json_provider_2_0_1.xml │ ├── Maven__org_springframework_security_spring_security_acl_3_1_0_RELEASE.xml │ ├── Maven__org_springframework_security_spring_security_web_3_1_0_RELEASE.xml │ ├── Maven__org_eclipse_jetty_orbit_javax_servlet_jsp_2_1_0_v201105211820.xml │ ├── Maven__org_springframework_security_spring_security_core_3_1_0_RELEASE.xml │ ├── Maven__org_hibernate_javax_persistence_hibernate_jpa_2_0_api_1_0_1_Final.xml │ ├── Maven__org_springframework_data_spring_data_commons_core_1_1_0_RELEASE.xml │ ├── Maven__org_hibernate_common_hibernate_commons_annotations_4_0_1_Final.xml │ ├── Maven__org_springframework_security_spring_security_config_3_1_0_RELEASE.xml │ ├── Maven__org_springframework_security_spring_security_crypto_3_1_0_RELEASE.xml │ ├── Maven__com_fasterxml_jackson_module_jackson_module_jaxb_annotations_2_0_1.xml │ ├── Maven__org_springframework_security_spring_security_taglibs_3_1_0_RELEASE.xml │ ├── Maven__org_eclipse_jetty_orbit_javax_servlet_jsp_jstl_1_2_0_v201105211821.xml │ ├── Maven__org_eclipse_jetty_orbit_org_apache_jasper_glassfish_2_1_0_v201110031002.xml │ ├── Maven__org_jboss_spec_javax_transaction_jboss_transaction_api_1_1_spec_1_0_0_Final.xml │ └── Maven__org_eclipse_jetty_orbit_org_apache_taglibs_standard_glassfish_1_2_0_v201112081803.xml │ ├── compiler.xml │ ├── misc.xml │ └── uiDesigner.xml └── README.md /wxapp-todos/pages/pay/pay.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /wxapp-todos/pages/index/index.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /wxapp-todos/pages/pay/pay.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | 3 | }) -------------------------------------------------------------------------------- /wxapp-todos/pages/logs/logs.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "Logs « TODOS" 3 | } 4 | -------------------------------------------------------------------------------- /wxpay/src/main/resources/config.properties: -------------------------------------------------------------------------------- 1 | ip=125.216.242.150:8080 2 | domain=https://i-test.com.cn -------------------------------------------------------------------------------- /wxpay/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /wxapp-todos/images/board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwcqc/WechatPayDemo/HEAD/wxapp-todos/images/board.png -------------------------------------------------------------------------------- /wxapp-todos/images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwcqc/WechatPayDemo/HEAD/wxapp-todos/images/home.png -------------------------------------------------------------------------------- /wxapp-todos/images/note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwcqc/WechatPayDemo/HEAD/wxapp-todos/images/note.png -------------------------------------------------------------------------------- /wxapp-todos/images/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwcqc/WechatPayDemo/HEAD/wxapp-todos/images/plus.png -------------------------------------------------------------------------------- /wxapp-todos/app.wxss: -------------------------------------------------------------------------------- 1 | page { 2 | height: 100%; 3 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 4 | } 5 | -------------------------------------------------------------------------------- /wxapp-todos/images/board-actived.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwcqc/WechatPayDemo/HEAD/wxapp-todos/images/board-actived.png -------------------------------------------------------------------------------- /wxapp-todos/images/home-actived.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwcqc/WechatPayDemo/HEAD/wxapp-todos/images/home-actived.png -------------------------------------------------------------------------------- /wxapp-todos/images/note-actived.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwcqc/WechatPayDemo/HEAD/wxapp-todos/images/note-actived.png -------------------------------------------------------------------------------- /wxpay/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /wxpay/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwcqc/WechatPayDemo/HEAD/wxpay/src/main/resources/log4j.properties -------------------------------------------------------------------------------- /wxapp-todos/pages/pay/pay.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 谢谢您的支持! 4 | 5 | -------------------------------------------------------------------------------- /wxpay/src/main/resources/redis.properties: -------------------------------------------------------------------------------- 1 | redis.pool.maxActive=100 2 | redis.pool.maxIdle=20 3 | redis.pool.maxWait=3000 4 | redis.ip=125.216.242.151 5 | redis.port=6379 -------------------------------------------------------------------------------- /wxpay/src/main/java/luluteam/wxpay/util/SpringContextHolder.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwcqc/WechatPayDemo/HEAD/wxpay/src/main/java/luluteam/wxpay/util/SpringContextHolder.java -------------------------------------------------------------------------------- /wxpay/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wxpay/src/main/webapp/views/payInfo.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 支付结果 5 | 6 | 7 | 8 | This is the result page. 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxapp-todos/pages/logs/logs.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data:{ 3 | logs: [] 4 | }, 5 | onShow: function () { 6 | var logs = wx.getStorageSync('todo_logs') 7 | if (logs) { 8 | this.setData({ logs: logs.reverse() }) 9 | } 10 | }, 11 | }) 12 | -------------------------------------------------------------------------------- /wxpay/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /wxpay/src/main/resources/mysql.properties: -------------------------------------------------------------------------------- 1 | jdbc.driver=com.mysql.jdbc.Driver 2 | jdbc.url=jdbc:mysql://localhost:3306/yjy 3 | jdbc.username=root 4 | jdbc.password=root 5 | 6 | hibernate.dialect=org.hibernate.dialect.MySQLDialect 7 | 8 | #dbcp settings 9 | dbcp.maxIdle=5 10 | dbcp.maxActive=40 -------------------------------------------------------------------------------- /wxpay/.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /wxpay/.idea/artifacts/wxpay_war.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/target 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /wxapp-todos/pages/pay/pay.wxss: -------------------------------------------------------------------------------- 1 | .container { 2 | padding: 20rpx; 3 | border-top: 1rpx solid #e5e5e5; 4 | } 5 | 6 | .header { 7 | display: flex; 8 | align-items: center; 9 | border: 1rpx solid #e0e0e0; 10 | border-radius: 10rpx; 11 | box-shadow: 0 0 5rpx #e0e0e0; 12 | margin-bottom: 20rpx; 13 | padding: 20rpx; 14 | } 15 | -------------------------------------------------------------------------------- /wxapp-todos/pages/logs/logs.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [{{ item.timestamp }}] 5 | {{ item.name }} 6 | {{ item.action }} 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /wxpay/src/main/webapp/WEB-INF/jsp/error.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Hyman 4 | Date: 2016/4/25 5 | Time: 18:18 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 13 | 14 | 15 |

出错页面

16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__asm_asm_3_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__ognl_ognl_2_6_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__junit_junit_4_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__antlr_antlr_2_7_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__cglib_cglib_2_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__dom4j_dom4j_1_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__jaxen_jaxen_1_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__c3p0_c3p0_0_9_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__log4j_log4j_1_2_16.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__wsdl4j_wsdl4j_1_6_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__asm_asm_attrs_1_5_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_dbunit_dbunit_2_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_avro_avro_1_5_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__redis_clients_jedis_2_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__xerces_xercesImpl_2_6_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__commons_io_commons_io_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_slf4j_slf4j_api_1_6_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_slf4j_slf4j_nop_1_4_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_objenesis_objenesis_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_alibaba_fastjson_1_2_20.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__net_sf_ehcache_ehcache_1_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__opensymphony_sitemesh_2_4_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_cxf_cxf_api_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_aspectj_aspectjrt_1_6_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_unitils_unitils_orm_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_google_code_gson_gson_2_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_google_guava_guava_11_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__javax_servlet_servlet_api_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__javax_xml_bind_jaxb_api_2_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_neethi_neethi_3_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_unitils_unitils_core_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__xerces_xmlParserAPIs_2_6_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__commons_dbcp_commons_dbcp_1_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__junit_addons_junit_addons_1_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__xml_resolver_xml_resolver_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_solr_solr_core_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_sun_xml_bind_jaxb_impl_2_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_mockito_mockito_core_1_9_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_quartz_scheduler_quartz_2_1_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_slf4j_slf4j_log4j12_1_6_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_unitils_unitils_dbunit_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_unitils_unitils_spring_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_solr_solr_solrj_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_6_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_cxf_cxf_rt_core_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_6_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_freemarker_freemarker_2_3_19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_hibernate_3_2_5_ga.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_jgroups_jgroups_3_0_9_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__poi_poi_2_5_1_final_20040804.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__net_sf_ehcache_ehcache_core_2_5_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_unitils_unitils_database_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_google_code_findbugs_jsr305_1_3_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_javassist_javassist_3_15_0_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_lucene_lucene_core_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_lucene_lucene_misc_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_codehaus_woodstox_stax2_api_3_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_cxf_cxf_rt_ws_addr_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_thoughtworks_paranamer_paranamer_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__mysql_mysql_connector_java_5_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_powermock_powermock_core_1_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__javax_persistence_persistence_api_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_lucene_lucene_memory_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_lucene_lucene_smartcn_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_lucene_lucene_spatial_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_lucene_lucene_stempel_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_cxf_cxf_rt_ws_policy_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_unitils_unitils_dbmaintainer_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_lucene_lucene_grouping_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_solr_solr_commons_csv_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_xerial_snappy_snappy_java_1_0_1_rc3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_powermock_powermock_reflect_1_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__javax_validation_validation_api_1_0_0_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_lucene_lucene_analyzers_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_1_0_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_8_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_cxf_cxf_rt_bindings_xml_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_ws_xmlschema_xmlschema_core_2_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_hibernate_core_4_1_4_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_cxf_cxf_rt_bindings_soap_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_lucene_lucene_highlighter_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_codehaus_jackson_jackson_core_asl_1_9_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_tx_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_lucene_lucene_spellchecker_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_solr_solr_analysis_extras_3_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_eclipse_jetty_jetty_jsp_7_6_3_v20120416.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_cxf_cxf_rt_frontend_jaxws_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_codehaus_woodstox_woodstox_core_asl_4_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_hibernate_search_4_1_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_infinispan_infinispan_core_5_1_4_FINAL.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_powermock_powermock_api_mockito_1_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_powermock_powermock_api_support_1_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_aop_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_asm_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_orm_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_oxm_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_web_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__commons_collections_commons_collections_3_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_cxf_cxf_rt_frontend_simple_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_cxf_cxf_rt_transports_http_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_rhq_helpers_rhq_pluginAnnotations_3_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_core_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_jdbc_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_test_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_hibernate_ehcache_4_1_4_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxapp-todos/pages/logs/logs.wxss: -------------------------------------------------------------------------------- 1 | .container { 2 | padding: 20rpx; 3 | border-top: 1rpx solid #e5e5e5; 4 | } 5 | 6 | .logs { 7 | border: 1rpx solid #e0e0e0; 8 | border-radius: 10rpx; 9 | box-shadow: 0 0 5rpx #e0e0e0; 10 | } 11 | 12 | .item { 13 | padding: 20rpx; 14 | border-bottom: 1rpx solid #f0f0f0; 15 | font-size: 30rpx; 16 | color: #888; 17 | } 18 | 19 | .item:last-child { 20 | border-bottom: 0; 21 | } 22 | 23 | .timestamp { 24 | display: block; 25 | margin-bottom: 10rpx; 26 | } 27 | 28 | .name { 29 | display: inline-block; 30 | width: 380rpx; 31 | color: #aa0; 32 | } 33 | 34 | .action { 35 | display: inline-block; 36 | width: 280rpx; 37 | color: #f40; 38 | text-align: right; 39 | } 40 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_apache_cxf_cxf_rt_databinding_jaxb_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_powermock_powermock_module_junit4_1_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_beans_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxapp-todos/app.js: -------------------------------------------------------------------------------- 1 | App({ 2 | globalData:{ 3 | // userInfo:null, 4 | appId: 'xxx', 5 | key: 'xxx' //AppSecret 6 | }, 7 | onLaunch: function() { 8 | 9 | }, 10 | getUserInfo:function(cb){ 11 | var that = this; 12 | if(this.globalData.userInfo){ 13 | typeof cb == "function" && cb(this.globalData.userInfo) 14 | }else{ 15 | //调用登录接口 16 | wx.login({ 17 | success: function () { 18 | wx.getUserInfo({ 19 | success: function (res) { 20 | that.globalData.userInfo = res.userInfo; 21 | typeof cb == "function" && cb(that.globalData.userInfo) 22 | } 23 | }) 24 | } 25 | }); 26 | } 27 | } 28 | 29 | }) -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_hibernate_validator_4_3_0_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_webmvc_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_context_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_eclipse_jetty_orbit_org_eclipse_jdt_core_3_7_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_hibernate_search_orm_4_1_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_jboss_marshalling_jboss_marshalling_1_3_11_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_eclipse_jetty_orbit_javax_el_2_1_0_v201105211819.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_hibernate_entitymanager_4_1_4_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_hibernate_search_engine_4_1_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_expression_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_eclipse_jetty_orbit_com_sun_el_1_0_0_v201105211818.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_data_spring_data_jpa_1_0_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_eclipse_jetty_aggregate_jetty_webapp_7_6_3_v20120416.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_powermock_powermock_module_junit4_common_1_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_hibernate_search_analyzers_4_1_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_jboss_marshalling_jboss_marshalling_river_1_3_11_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_eclipse_jetty_orbit_javax_servlet_2_5_0_v201103041518.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_hibernate_search_infinispan_4_1_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_infinispan_infinispan_lucene_directory_5_1_4_FINAL.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_spring_context_support_3_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_fasterxml_jackson_jaxrs_jackson_jaxrs_json_provider_2_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_security_spring_security_acl_3_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_security_spring_security_web_3_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_eclipse_jetty_orbit_javax_servlet_jsp_2_1_0_v201105211820.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_security_spring_security_core_3_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_javax_persistence_hibernate_jpa_2_0_api_1_0_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_data_spring_data_commons_core_1_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_hibernate_common_hibernate_commons_annotations_4_0_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_security_spring_security_config_3_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_security_spring_security_crypto_3_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/src/main/java/luluteam/wxpay/constant/Constant.java: -------------------------------------------------------------------------------- 1 | package luluteam.wxpay.constant; 2 | 3 | /** 4 | * Created by Hyman on 2017/2/27. 5 | */ 6 | public class Constant { 7 | 8 | public static final String DOMAIN = "https://i-test.com.cn"; 9 | 10 | public static final String APP_ID = "填写自己的"; 11 | 12 | public static final String APP_SECRET = "填写自己的"; 13 | 14 | public static final String APP_KEY = "填写自己的"; 15 | 16 | public static final String MCH_ID = "填写自己的"; //商户号 17 | 18 | public static final String URL_UNIFIED_ORDER = "https://api.mch.weixin.qq.com/pay/unifiedorder"; 19 | 20 | public static final String URL_NOTIFY = Constant.DOMAIN + "/wxpay/views/payInfo.jsp"; 21 | 22 | public static final String TIME_FORMAT = "yyyyMMddHHmmss"; 23 | 24 | public static final int TIME_EXPIRE = 2; //单位是day 25 | 26 | } 27 | -------------------------------------------------------------------------------- /wxpay/src/main/java/luluteam/wxpay/util/TimeUtils.java: -------------------------------------------------------------------------------- 1 | package luluteam.wxpay.util; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Calendar; 5 | import java.util.Date; 6 | 7 | /** 8 | * Created by Hyman on 2017/2/28. 9 | */ 10 | public class TimeUtils { 11 | 12 | //TODO 都未处理输入参数 13 | 14 | public static String getFormatTime(Date date, String format) { 15 | SimpleDateFormat sdf = new SimpleDateFormat(format); 16 | return sdf.format(date); 17 | } 18 | 19 | public static Date addDay(Date date, int day) { 20 | Calendar cal = Calendar.getInstance(); 21 | cal.setTime(date); 22 | cal.add(Calendar.DATE, 2); 23 | return cal.getTime(); 24 | } 25 | 26 | public static Date minusDay(Date date, int day) { 27 | return addDay(date, -day); 28 | } 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_jaxb_annotations_2_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_springframework_security_spring_security_taglibs_3_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_eclipse_jetty_orbit_javax_servlet_jsp_jstl_1_2_0_v201105211821.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxapp-todos/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages":[ 3 | "pages/index/index", 4 | "pages/logs/logs", 5 | "pages/pay/pay" 6 | ], 7 | "window":{ 8 | "backgroundTextStyle":"light", 9 | "navigationBarBackgroundColor": "#fff", 10 | "navigationBarTitleText": "TODOS", 11 | "navigationBarTextStyle":"black" 12 | }, 13 | "tabBar": { 14 | "borderStyle": "white", 15 | "backgroundColor": "#f5f5f5", 16 | "selectedColor": "#222", 17 | "list": [ 18 | { 19 | "pagePath": "pages/index/index", 20 | "text": "TODOS", 21 | "iconPath": "images/home.png", 22 | "selectedIconPath": "images/home-actived.png" 23 | }, 24 | { 25 | "pagePath": "pages/logs/logs", 26 | "text": "LOGS", 27 | "iconPath": "images/note.png", 28 | "selectedIconPath": "images/note-actived.png" 29 | } 30 | ] 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_eclipse_jetty_orbit_org_apache_jasper_glassfish_2_1_0_v201110031002.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_jboss_spec_javax_transaction_jboss_transaction_api_1_1_spec_1_0_0_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/src/main/webapp/WEB-INF/jsp/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: Hyman 4 | Date: 2016/4/25 5 | Time: 18:18 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | 12 | 13 | 14 | 15 | hello world 2 16 | 17 |


18 | 19 |
20 | <%----%> 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /wxpay/.idea/libraries/Maven__org_eclipse_jetty_orbit_org_apache_taglibs_standard_glassfish_1_2_0_v201112081803.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /wxpay/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /wxapp-todos/pages/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{ item.name }} 13 | 14 | 15 | 16 | 17 | 切换所有 18 | 剩余 {{ leftCount }} 件事 19 | 清空已完成 20 | 21 | 22 | 23 | 24 | 25 | 没有代办事项 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /wxapp-todos/pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | .container { 2 | padding: 20rpx; 3 | border-top: 1rpx solid #e5e5e5; 4 | } 5 | 6 | .header { 7 | display: flex; 8 | align-items: center; 9 | border: 1rpx solid #e0e0e0; 10 | border-radius: 10rpx; 11 | box-shadow: 0 0 5rpx #e0e0e0; 12 | margin-bottom: 20rpx; 13 | padding: 20rpx; 14 | } 15 | 16 | .header .plus { 17 | width: 41rpx; 18 | height: 41rpx; 19 | margin-right: 20rpx; 20 | } 21 | 22 | .header .new-todo { 23 | flex: 1; 24 | font-size: 28rpx; 25 | } 26 | 27 | .todos { 28 | border: 1rpx solid #e0e0e0; 29 | border-radius: 10rpx; 30 | box-shadow: 0 0 5rpx #e0e0e0; 31 | } 32 | 33 | .todos .item { 34 | display: flex; 35 | align-items: center; 36 | padding: 20rpx; 37 | border-bottom: 1rpx solid #e0e0e0; 38 | } 39 | 40 | .todos .item:last-child { 41 | border-bottom: 0; 42 | } 43 | 44 | .todos .item .name { 45 | flex: 1; 46 | font-size: 30rpx; 47 | color: #444; 48 | } 49 | 50 | .todos .item.completed .name { 51 | text-decoration: line-through; 52 | color: #888; 53 | } 54 | 55 | .todos .item .checkbox { 56 | margin-right: 10rpx; 57 | } 58 | 59 | .todos .item .remove { 60 | cursor: pointer; 61 | } 62 | 63 | .footer { 64 | display: flex; 65 | justify-content: space-between; 66 | margin: 30rpx 0; 67 | padding: 0 10rpx; 68 | font-size: 26rpx; 69 | color: #777; 70 | } 71 | 72 | .footer .btn { 73 | cursor: pointer; 74 | } 75 | 76 | .empty { 77 | display: flex; 78 | flex-direction: column; 79 | align-items: center; 80 | justify-content: center; 81 | } 82 | 83 | .empty .title { 84 | font-size: 60rpx; 85 | margin: 200rpx 50rpx 50rpx; 86 | color: #444; 87 | } 88 | 89 | .empty .content { 90 | color: #666; 91 | text-align: center; 92 | } 93 | 94 | .dashang { 95 | margin-top: 10px; 96 | text-align: center; 97 | } 98 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WechatPayDemo 2 | 3 | 1、根据调用API必须遵循的协议规则,提交方式均采用post,提交和返回数据格式都为XML,根节点名为xml,字符统一采用UTF-8编码,签名算法使用MD5。 4 | 5 | 2、本次后台代码使用Java语言编写。由于微信支付要求传输方式必须采用https,如果已为Nginx服务器配置证书,只需再配置一下Nginx配置文件,在server参数下添加如下代码,让Nginx支持将.do和.jsp请求转发到后端Tomcat服务器上即可 6 | 7 | ``` 8 | location ~ (\.jsp)|(\.do)$ { 9 | proxy_pass http://your_url; 10 | proxy_redirect off; 11 | proxy_set_header Host $host; 12 | proxy_set_header X-Real-IP $remote_addr; 13 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 14 | client_max_body_size 10m; 15 | client_body_buffer_size 128k; 16 | proxy_connect_timeout 90; 17 | proxy_send_timeout 90; 18 | proxy_read_timeout 90; 19 | proxy_buffer_size 4k; 20 | proxy_buffers 4 32k; 21 | proxy_busy_buffers_size 64k; 22 | proxy_temp_file_write_size 64k; 23 | } 24 | ``` 25 | 26 | 3、如下图所示是微信官方给出的小程序支付业务流程时序图,基本流程如下: 27 | ![image](http://oih08wgjx.bkt.clouddn.com/images/blog/wxpay_develop_process/1.png) 28 | 29 | 1)小程序内发起支付请求,调用后台接口,同时将支付商品信息以及用户在小程序授权登录过后得到的code一起发送到后台服务器; 30 | 2)后台通过code 去换取session_key和 openid,此处调用的微信接口如下: 31 | 32 | > https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code 33 | 34 | 参数说明: 35 | appid 小程序唯一标识 36 | secret 小程序的 app secret 37 | js_code 上面提到的登录时获取的 code 38 | grant_type 固定填写为 authorization_code 39 | 40 | 3)服务器端调用支付统一下单接口,调用该接口会在微信支付服务后台生成预支付交易单,同时返回prepay_id,这个prepay_id就是预支付的ID。后面小程序调用支付需要用到它 41 | 这里调用的接口链接为: 42 | 43 | > https://api.mch.weixin.qq.com/pay/unifiedorder 44 | 45 | 参数和说明太多,可以参考如下链接去详细了解:https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_1 46 | 47 | 这里做几点说明: 48 | a、nonce_str随机字符串字段由后台自己根据一定的策略生成; 49 | b、sign字段为签名字段,根据官方描述,签名的原则是先把所有要传的非空参数值的参数按照key=value的格式,并按照ASCII码从小到大排序,即key1=value1&key2=value2…拼接成字符串stringA,再用stringA拼接上key得到stringSignTemp字符串,并对stringSignTemp进行MD5运算,再将得到的字符串所有字符转换为大写,即可得到sign值。(key值设置路径:微信商户平台(pay.weixin.qq.com)-->账户设置-->API安全-->密钥设置)。 50 | 51 | > 签名生成算法参见:https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=4_3 52 | 53 | c、需要把所有的参数封装为XML格式用post方式发送到统一下单接口 54 | 55 | 4)将获取到的prepay_id以及生成的nonceStr等数据组装好返回给小程序,再由小程序去调起微信支付API -------------------------------------------------------------------------------- /wxpay/src/main/java/luluteam/wxpay/util/RandomUtils.java: -------------------------------------------------------------------------------- 1 | package luluteam.wxpay.util; 2 | 3 | import java.util.Random; 4 | 5 | /** 6 | * 随机数、随即字符串工具 7 | * 8 | * Created by Hyman on 2017/2/28. 9 | */ 10 | public class RandomUtils { 11 | public static final String allChar = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 12 | public static final String letterChar = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 13 | public static final String numberChar = "0123456789"; 14 | 15 | /** 16 | * 返回一个定长的随机字符串(只包含大小写字母、数字) 17 | * 18 | * @param length 随机字符串长度 19 | * @return 随机字符串 20 | */ 21 | public static String generateString(int length) { 22 | StringBuffer sb = new StringBuffer(); 23 | Random random = new Random(); 24 | for (int i = 0; i < length; i++) { 25 | sb.append(allChar.charAt(random.nextInt(allChar.length()))); 26 | } 27 | return sb.toString(); 28 | } 29 | 30 | /** 31 | * 返回一个定长的随机纯字母字符串(只包含大小写字母) 32 | * 33 | * @param length 随机字符串长度 34 | * @return 随机字符串 35 | */ 36 | public static String generateMixString(int length) { 37 | StringBuffer sb = new StringBuffer(); 38 | Random random = new Random(); 39 | for (int i = 0; i < length; i++) { 40 | sb.append(allChar.charAt(random.nextInt(letterChar.length()))); 41 | } 42 | return sb.toString(); 43 | } 44 | 45 | /** 46 | * 返回一个定长的随机纯小写字母字符串(只包含小写字母) 47 | * 48 | * @param length 随机字符串长度 49 | * @return 随机字符串 50 | */ 51 | public static String generateLowerString(int length) { 52 | return generateMixString(length).toLowerCase(); 53 | } 54 | 55 | /** 56 | * 返回一个定长的随机纯大写字母字符串(只包含大写字母) 57 | * 58 | * @param length 随机字符串长度 59 | * @return 随机字符串 60 | */ 61 | public static String generateUpperString(int length) { 62 | return generateMixString(length).toUpperCase(); 63 | } 64 | 65 | 66 | public static void main(String[] args) { 67 | System.out.println(generateString(32)); 68 | System.out.println(generateMixString(32)); 69 | System.out.println(generateLowerString(32)); 70 | System.out.println(generateUpperString(32)); 71 | } 72 | } -------------------------------------------------------------------------------- /wxpay/src/main/java/luluteam/wxpay/util/HttpResult.java: -------------------------------------------------------------------------------- 1 | package luluteam.wxpay.util; 2 | 3 | import java.util.HashMap; 4 | import java.util.List; 5 | 6 | import org.apache.http.Header; 7 | import org.apache.http.cookie.Cookie; 8 | 9 | public class HttpResult { 10 | 11 | private List cookies; 12 | 13 | private HashMap headers; 14 | 15 | private int statusCode; 16 | 17 | private String body; 18 | 19 | public List getCookies() { 20 | return cookies; 21 | } 22 | 23 | public void setCookies(List cookies) { 24 | this.cookies = cookies; 25 | } 26 | 27 | public HashMap getHeaders() { 28 | return headers; 29 | } 30 | 31 | public void setHeaders(Header[] headerAll) { 32 | headers = new HashMap(); 33 | for (Header header : headerAll) { 34 | headers.put(header.getName(), header); 35 | } 36 | } 37 | 38 | public int getStatusCode() { 39 | return statusCode; 40 | } 41 | 42 | public void setStatusCode(int statusCode) { 43 | this.statusCode = statusCode; 44 | } 45 | 46 | public String getBody() { 47 | return body; 48 | } 49 | 50 | public void setBody(String body) { 51 | this.body = body; 52 | } 53 | 54 | @Override 55 | public String toString() { 56 | StringBuffer sb = new StringBuffer(); 57 | sb.append("======================= HttpResult toString start ========================\n"); 58 | sb.append("----- statusCode: " + statusCode + "\n"); 59 | if(headers != null) { 60 | sb.append("----- headers:\n"); 61 | for(String key : headers.keySet()) { 62 | sb.append("\t" + key + " : " + headers.get(key) + "\n"); 63 | } 64 | } 65 | if(cookies != null) { 66 | sb.append("----- cookies:\n"); 67 | for(Cookie cookie : cookies) { 68 | sb.append("\t" + cookie.getName() + " : " + cookie.getValue() + "\n"); 69 | } 70 | } 71 | sb.append("======================= body start ========================\n"); 72 | sb.append(body); 73 | sb.append("======================= body end ========================\n"); 74 | sb.append("======================= HttpResult toString end ======================="); 75 | 76 | return sb.toString(); 77 | } 78 | 79 | public String getCookieValue(String cookieName) { 80 | 81 | if(cookies.isEmpty()) { 82 | return null; 83 | } 84 | 85 | for(Cookie cookie : cookies) { 86 | if(cookie.getName().equals(cookieName)) { 87 | return cookie.getValue(); 88 | } 89 | } 90 | 91 | return null; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /wxpay/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | contextConfigLocation 9 | classpath:applicationContext.xml 10 | 11 | 12 | org.springframework.web.context.ContextLoaderListener 13 | 14 | 15 | 16 | 17 | springMVC 18 | org.springframework.web.servlet.DispatcherServlet 19 | 1 20 | 21 | 22 | 23 | springMVC 24 | *.do 25 | 26 | 27 | 28 | springMVC 29 | / 30 | 31 | 32 | 33 | 34 | 35 | encodingFilter 36 | org.springframework.web.filter.CharacterEncodingFilter 37 | 38 | encoding 39 | UTF-8 40 | 41 | 42 | forceEncoding 43 | true 44 | 45 | 46 | 47 | encodingFilter 48 | /* 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | /WEB-INF/jsp/index.jsp 73 | 74 | 75 | -------------------------------------------------------------------------------- /wxpay/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /wxpay/src/main/java/luluteam/wxpay/util/CommonUtil.java: -------------------------------------------------------------------------------- 1 | package luluteam.wxpay.util; 2 | 3 | import com.thoughtworks.xstream.XStream; 4 | import com.thoughtworks.xstream.core.util.QuickWriter; 5 | import com.thoughtworks.xstream.io.HierarchicalStreamWriter; 6 | import com.thoughtworks.xstream.io.xml.PrettyPrintWriter; 7 | import com.thoughtworks.xstream.io.xml.XppDriver; 8 | import luluteam.wxpay.entity.PayInfo; 9 | import org.apache.commons.lang3.StringUtils; 10 | import org.dom4j.Document; 11 | import org.dom4j.DocumentHelper; 12 | import org.dom4j.Element; 13 | 14 | import javax.servlet.http.HttpServletRequest; 15 | import java.io.*; 16 | import java.math.BigInteger; 17 | import java.security.MessageDigest; 18 | import java.util.*; 19 | 20 | /** 21 | * Created by Hyman on 2017/2/28. 22 | */ 23 | public class CommonUtil { 24 | 25 | public static String getRandomOrderId() { 26 | // UUID.randomUUID().toString().replace("-","") 27 | Random random = new Random(System.currentTimeMillis()); 28 | int value = random.nextInt(); 29 | while (value < 0) { 30 | value = random.nextInt(); 31 | } 32 | return value + ""; 33 | } 34 | 35 | private static XStream xstream = new XStream(new XppDriver() { 36 | public HierarchicalStreamWriter createWriter(Writer out) { 37 | return new PrettyPrintWriter(out) { 38 | //增加CDATA标记 39 | boolean cdata = true; 40 | @SuppressWarnings("rawtypes") 41 | public void startNode(String name, Class clazz) { 42 | super.startNode(name, clazz); 43 | } 44 | protected void writeText(QuickWriter writer, String text) { 45 | if (cdata) { 46 | writer.write(""); 49 | } else { 50 | writer.write(text); 51 | } 52 | } 53 | }; 54 | } 55 | }); 56 | 57 | public static String payInfoToXML(PayInfo pi) { 58 | xstream.alias("xml", pi.getClass()); 59 | return xstream.toXML(pi); 60 | } 61 | 62 | @SuppressWarnings("unchecked") 63 | public static Map parseXml(String xml) throws Exception { 64 | Map map = new HashMap(); 65 | Document document = DocumentHelper.parseText(xml); 66 | Element root = document.getRootElement(); 67 | List elementList = root.elements(); 68 | for (Element e : elementList) 69 | map.put(e.getName(), e.getText()); 70 | return map; 71 | } 72 | 73 | 74 | public static String getClientIp(HttpServletRequest request) { 75 | String ip = request.getHeader("X-Forwarded-For"); 76 | if(StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)){ 77 | //多次反向代理后会有多个ip值,第一个ip才是真实ip 78 | int index = ip.indexOf(","); 79 | if(index != -1){ 80 | return ip.substring(0,index); 81 | }else{ 82 | return ip; 83 | } 84 | } 85 | ip = request.getHeader("X-Real-IP"); 86 | if(StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)){ 87 | return ip; 88 | } 89 | return request.getRemoteAddr(); 90 | } 91 | 92 | 93 | /** 94 | * 对字符串md5加密 95 | * 96 | * @param str 97 | * @return 98 | */ 99 | public static String getMD5(String str) throws Exception { 100 | try { 101 | // 生成一个MD5加密计算摘要 102 | MessageDigest md = MessageDigest.getInstance("MD5"); 103 | // 计算md5函数 104 | md.update(str.getBytes()); 105 | // digest()最后确定返回md5 hash值,返回值为8为字符串。因为md5 hash值是16位的hex值,实际上就是8位的字符 106 | // BigInteger函数则将8位的字符串转换成16位hex值,用字符串来表示;得到字符串形式的hash值 107 | return new BigInteger(1, md.digest()).toString(16); 108 | } catch (Exception e) { 109 | throw new Exception("MD5加密出现错误"); 110 | } 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /wxpay/src/main/java/luluteam/wxpay/entity/PayInfo.java: -------------------------------------------------------------------------------- 1 | package luluteam.wxpay.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by Hyman on 2017/2/28. 7 | */ 8 | public class PayInfo implements Serializable { 9 | 10 | private String appid; 11 | private String mch_id; 12 | private String device_info; //设备号,小程序传"WEB" 13 | private String nonce_str; 14 | private String sign; 15 | private String sign_type; //签名类型 16 | private String body; 17 | //private String detail; 18 | private String attach; 19 | private String out_trade_no; 20 | private int total_fee; 21 | private String spbill_create_ip; 22 | private String time_start; 23 | private String time_expire; 24 | private String notify_url; 25 | private String trade_type; //交易类型,JSAPI 26 | private String limit_pay; //指定支付方式,no_credit 27 | private String openid; 28 | 29 | public String getAppid() { 30 | return appid; 31 | } 32 | 33 | public void setAppid(String appid) { 34 | this.appid = appid; 35 | } 36 | 37 | public String getMch_id() { 38 | return mch_id; 39 | } 40 | 41 | public void setMch_id(String mch_id) { 42 | this.mch_id = mch_id; 43 | } 44 | 45 | public String getDevice_info() { 46 | return device_info; 47 | } 48 | 49 | public void setDevice_info(String device_info) { 50 | this.device_info = device_info; 51 | } 52 | 53 | public String getNonce_str() { 54 | return nonce_str; 55 | } 56 | 57 | public void setNonce_str(String nonce_str) { 58 | this.nonce_str = nonce_str; 59 | } 60 | 61 | public String getSign() { 62 | return sign; 63 | } 64 | 65 | public void setSign(String sign) { 66 | this.sign = sign; 67 | } 68 | 69 | public String getSign_type() { 70 | return sign_type; 71 | } 72 | 73 | public void setSign_type(String sign_type) { 74 | this.sign_type = sign_type; 75 | } 76 | 77 | public String getBody() { 78 | return body; 79 | } 80 | 81 | public void setBody(String body) { 82 | this.body = body; 83 | } 84 | 85 | public String getAttach() { 86 | return attach; 87 | } 88 | 89 | public void setAttach(String attach) { 90 | this.attach = attach; 91 | } 92 | 93 | public String getOut_trade_no() { 94 | return out_trade_no; 95 | } 96 | 97 | public void setOut_trade_no(String out_trade_no) { 98 | this.out_trade_no = out_trade_no; 99 | } 100 | 101 | public int getTotal_fee() { 102 | return total_fee; 103 | } 104 | 105 | public void setTotal_fee(int total_fee) { 106 | this.total_fee = total_fee; 107 | } 108 | 109 | public String getSpbill_create_ip() { 110 | return spbill_create_ip; 111 | } 112 | 113 | public void setSpbill_create_ip(String spbill_create_ip) { 114 | this.spbill_create_ip = spbill_create_ip; 115 | } 116 | 117 | public String getTime_start() { 118 | return time_start; 119 | } 120 | 121 | public void setTime_start(String time_start) { 122 | this.time_start = time_start; 123 | } 124 | 125 | public String getTime_expire() { 126 | return time_expire; 127 | } 128 | 129 | public void setTime_expire(String time_expire) { 130 | this.time_expire = time_expire; 131 | } 132 | 133 | public String getNotify_url() { 134 | return notify_url; 135 | } 136 | 137 | public void setNotify_url(String notify_url) { 138 | this.notify_url = notify_url; 139 | } 140 | 141 | public String getTrade_type() { 142 | return trade_type; 143 | } 144 | 145 | public void setTrade_type(String trade_type) { 146 | this.trade_type = trade_type; 147 | } 148 | 149 | public String getLimit_pay() { 150 | return limit_pay; 151 | } 152 | 153 | public void setLimit_pay(String limit_pay) { 154 | this.limit_pay = limit_pay; 155 | } 156 | 157 | public String getOpenid() { 158 | return openid; 159 | } 160 | 161 | public void setOpenid(String openid) { 162 | this.openid = openid; 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /wxpay/src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 53 | 54 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | ${hibernate.dialect} 65 | 3 66 | 18 67 | 10 68 | true 69 | false 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /wxpay/src/main/webapp/WEB-INF/springMVC-servlet.xml: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 60 | 61 | 63 | 65 | 66 | 67 | text/html;charset=UTF-8 68 | 69 | 70 | 71 | 72 | 73 | 74 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 91 | 92 | 93 | 94 | 95 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /wxapp-todos/pages/index/index.js: -------------------------------------------------------------------------------- 1 | // 1. 完成页面结构、布局、样式 2 | // 2. 设计数据结构 3 | // 3. 完成数据绑定 4 | // 4. 设计交互操作事件 5 | // 5. 数据存储 6 | var app = getApp() //实例化小程序,从而获取全局数据或者使用全局函数 7 | // console.log(app.globalData) 8 | var MD5Util = require('../../utils/md5.js'); 9 | 10 | Page({ 11 | // ===== 页面数据对象 ===== 12 | data: { 13 | input: '', 14 | todos: [], 15 | leftCount: 0, 16 | allCompleted: false, 17 | logs: [], 18 | price: 0.01 19 | }, 20 | save: function () { 21 | // 将 data 存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个同步接口。 22 | wx.setStorageSync('todo_list', this.data.todos) 23 | wx.setStorageSync('todo_logs', this.data.logs) 24 | }, 25 | load: function () { 26 | var todos = wx.getStorageSync('todo_list') 27 | if (todos) { 28 | var leftCount = todos.filter(function (item) { 29 | return !item.completed 30 | }).length 31 | this.setData({ todos: todos, leftCount: leftCount }) 32 | } 33 | var logs = wx.getStorageSync('todo_logs') 34 | if (logs) { 35 | this.setData({ logs: logs }) 36 | } 37 | }, 38 | // ===== 页面生命周期方法 ===== 39 | onLoad: function () { 40 | this.load(); 41 | }, 42 | // ===== 事件处理函数 ===== 43 | inputChangeHandle: function (e) { 44 | this.setData({ input: e.detail.value }) 45 | }, 46 | addTodoHandle: function (e) { 47 | if (!this.data.input || !this.data.input.trim()) return 48 | var todos = this.data.todos 49 | todos.push({ name: this.data.input, completed: false }) 50 | var logs = this.data.logs 51 | logs.push({ timestamp: new Date(), action: '新增', name: this.data.input }) 52 | this.setData({ 53 | input: '', 54 | todos: todos, 55 | leftCount: this.data.leftCount + 1, 56 | logs: logs 57 | }) 58 | this.save() 59 | }, 60 | toggleTodoHandle: function (e) { 61 | var index = e.currentTarget.dataset.index 62 | var todos = this.data.todos 63 | todos[index].completed = !todos[index].completed 64 | var logs = this.data.logs 65 | logs.push({ 66 | timestamp: new Date(), 67 | action: todos[index].completed ? '标记完成' : '标记未完成', 68 | name: todos[index].name 69 | }) 70 | this.setData({ 71 | todos: todos, 72 | leftCount: this.data.leftCount + (todos[index].completed ? -1 : 1), 73 | logs: logs 74 | }) 75 | this.save() 76 | }, 77 | removeTodoHandle: function (e) { 78 | var index = e.currentTarget.dataset.index 79 | var todos = this.data.todos 80 | var remove = todos.splice(index, 1)[0] 81 | var logs = this.data.logs 82 | logs.push({ timestamp: new Date(), action: '移除', name: remove.name }) 83 | this.setData({ 84 | todos: todos, 85 | leftCount: this.data.leftCount - (remove.completed ? 0 : 1), 86 | logs: logs 87 | }) 88 | this.save() 89 | }, 90 | toggleAllHandle: function (e) { 91 | this.data.allCompleted = !this.data.allCompleted 92 | var todos = this.data.todos 93 | for (var i = todos.length - 1; i >= 0; i--) { 94 | todos[i].completed = this.data.allCompleted 95 | } 96 | var logs = this.data.logs 97 | logs.push({ 98 | timestamp: new Date(), 99 | action: this.data.allCompleted ? '标记完成' : '标记未完成', 100 | name: '全部任务' 101 | }) 102 | this.setData({ 103 | todos: todos, 104 | leftCount: this.data.allCompleted ? 0 : todos.length, 105 | logs: logs 106 | }) 107 | this.save() 108 | }, 109 | clearCompletedHandle: function (e) { 110 | var todos = this.data.todos 111 | var remains = [] 112 | for (var i = 0; i < todos.length; i++) { 113 | todos[i].completed || remains.push(todos[i]) 114 | } 115 | var logs = this.data.logs 116 | logs.push({ 117 | timestamp: new Date(), 118 | action: '清空', 119 | name: '已完成任务' 120 | }) 121 | this.setData({ todos: remains, logs: logs }) 122 | this.save() 123 | }, 124 | wxPay: function (e) { 125 | var code = '' //传给服务器以获得openId 126 | var timestamp = String(Date.parse(new Date())) //时间戳 127 | var nonceStr = '' //随机字符串,后台返回 128 | var prepayId = '' //预支付id,后台返回 129 | var paySign = '' //加密字符串 130 | 131 | //获取用户登录状态 132 | wx.login({ 133 | success: function(res) { 134 | if (res.code) { 135 | code = res.code 136 | //发起网络请求,发起的是HTTPS请求,向服务端请求预支付 137 | wx.request({ 138 | url: 'https://i-test.com.cn/wxpay/prepay.do', 139 | data: { 140 | code: res.code 141 | }, 142 | success: function(res) { 143 | if(res.data.result == true){ 144 | nonceStr = res.data.nonceStr 145 | prepayId = res.data.prepayId 146 | // 按照字段首字母排序组成新字符串 147 | var payDataA = "appId="+app.globalData.appId+"&nonceStr="+res.data.nonceStr+"&package=prepay_id="+res.data.prepayId+"&signType=MD5&timeStamp="+timestamp; 148 | var payDataB = payDataA + "&key=" + app.globalData.key; 149 | // 使用MD5加密算法计算加密字符串 150 | paySign = MD5Util.MD5(payDataB).toUpperCase(); 151 | // 发起微信支付 152 | wx.requestPayment({ 153 | 'timeStamp': timestamp, 154 | 'nonceStr': nonceStr, 155 | 'package': 'prepay_id=' + prepayId, 156 | 'signType': 'MD5', 157 | 'paySign': paySign, 158 | 'success':function(res){ 159 | // 保留当前页面,跳转到应用内某个页面,使用wx.nevigeteBack可以返回原页面 160 | wx.navigateTo({ 161 | url: '../pay/pay' 162 | }) 163 | }, 164 | 'fail':function(res){ 165 | console.log(res.errMsg) 166 | } 167 | }) 168 | }else{ 169 | console.log('请求失败' + res.data.info) 170 | } 171 | } 172 | }) 173 | } else { 174 | console.log('获取用户登录态失败!' + res.errMsg) 175 | } 176 | } 177 | }); 178 | } 179 | }) 180 | -------------------------------------------------------------------------------- /wxpay/src/main/java/luluteam/wxpay/controller/PayController.java: -------------------------------------------------------------------------------- 1 | package luluteam.wxpay.controller; 2 | 3 | import com.google.gson.JsonObject; 4 | import com.google.gson.JsonParser; 5 | import luluteam.wxpay.constant.Constant; 6 | import luluteam.wxpay.entity.PayInfo; 7 | import luluteam.wxpay.util.*; 8 | import org.apache.commons.lang3.StringUtils; 9 | import org.apache.log4j.Logger; 10 | import org.codehaus.jackson.map.ObjectMapper; 11 | import org.springframework.stereotype.Controller; 12 | import org.springframework.ui.ModelMap; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.ResponseBody; 15 | 16 | import javax.servlet.http.HttpServletRequest; 17 | import java.util.*; 18 | 19 | @Controller 20 | public class PayController { 21 | 22 | private static Logger log = Logger.getLogger(PayController.class); 23 | 24 | @ResponseBody 25 | @RequestMapping(value = "/prepay", produces = "text/html;charset=UTF-8") 26 | public String prePay(String code, ModelMap model, HttpServletRequest request) { 27 | 28 | String content = null; 29 | Map map = new HashMap(); 30 | ObjectMapper mapper = new ObjectMapper(); 31 | 32 | boolean result = true; 33 | String info = ""; 34 | 35 | log.error("\n======================================================"); 36 | log.error("code: " + code); 37 | 38 | String openId = getOpenId(code); 39 | if(StringUtils.isBlank(openId)) { 40 | result = false; 41 | info = "获取到openId为空"; 42 | } else { 43 | openId = openId.replace("\"", "").trim(); 44 | 45 | String clientIP = CommonUtil.getClientIp(request); 46 | 47 | log.error("openId: " + openId + ", clientIP: " + clientIP); 48 | 49 | String randomNonceStr = RandomUtils.generateMixString(32); 50 | String prepayId = unifiedOrder(openId, clientIP, randomNonceStr); 51 | 52 | log.error("prepayId: " + prepayId); 53 | 54 | if(StringUtils.isBlank(prepayId)) { 55 | result = false; 56 | info = "出错了,未获取到prepayId"; 57 | } else { 58 | map.put("prepayId", prepayId); 59 | map.put("nonceStr", randomNonceStr); 60 | } 61 | } 62 | 63 | try { 64 | map.put("result", result); 65 | map.put("info", info); 66 | content = mapper.writeValueAsString(map); 67 | } catch (Exception e) { 68 | e.printStackTrace(); 69 | } 70 | 71 | return content; 72 | } 73 | 74 | 75 | private String getOpenId(String code) { 76 | String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + Constant.APP_ID + 77 | "&secret=" + Constant.APP_SECRET + "&js_code=" + code + "&grant_type=authorization_code"; 78 | 79 | HttpUtil httpUtil = new HttpUtil(); 80 | try { 81 | 82 | HttpResult httpResult = httpUtil.doGet(url, null, null); 83 | 84 | if(httpResult.getStatusCode() == 200) { 85 | 86 | JsonParser jsonParser = new JsonParser(); 87 | JsonObject obj = (JsonObject) jsonParser.parse(httpResult.getBody()); 88 | 89 | log.error("getOpenId: " + obj.toString()); 90 | 91 | if(obj.get("errcode") != null) { 92 | log.error("getOpenId returns errcode: " + obj.get("errcode")); 93 | return ""; 94 | } else { 95 | return obj.get("openid").toString(); 96 | } 97 | //return httpResult.getBody(); 98 | } 99 | } catch (Exception e) { 100 | e.printStackTrace(); 101 | } 102 | return ""; 103 | } 104 | 105 | /** 106 | * 调用统一下单接口 107 | * @param openId 108 | */ 109 | private String unifiedOrder(String openId, String clientIP, String randomNonceStr) { 110 | 111 | try { 112 | 113 | String url = Constant.URL_UNIFIED_ORDER; 114 | 115 | PayInfo payInfo = createPayInfo(openId, clientIP, randomNonceStr); 116 | String md5 = getSign(payInfo); 117 | payInfo.setSign(md5); 118 | 119 | log.error("md5 value: " + md5); 120 | 121 | String xml = CommonUtil.payInfoToXML(payInfo); 122 | xml = xml.replace("__", "_").replace("", "1"); 123 | //xml = xml.replace("__", "_").replace("", ""); 124 | log.error(xml); 125 | 126 | StringBuffer buffer = HttpUtil.httpsRequest(url, "POST", xml); 127 | log.error("unifiedOrder request return body: \n" + buffer.toString()); 128 | Map result = CommonUtil.parseXml(buffer.toString()); 129 | 130 | 131 | String return_code = result.get("return_code"); 132 | if(StringUtils.isNotBlank(return_code) && return_code.equals("SUCCESS")) { 133 | 134 | String return_msg = result.get("return_msg"); 135 | if(StringUtils.isNotBlank(return_msg) && !return_msg.equals("OK")) { 136 | //log.error("统一下单错误!"); 137 | return ""; 138 | } 139 | 140 | String prepay_Id = result.get("prepay_id"); 141 | return prepay_Id; 142 | 143 | } else { 144 | return ""; 145 | } 146 | 147 | } catch (Exception e) { 148 | e.printStackTrace(); 149 | } 150 | 151 | return ""; 152 | } 153 | 154 | private PayInfo createPayInfo(String openId, String clientIP, String randomNonceStr) { 155 | 156 | Date date = new Date(); 157 | String timeStart = TimeUtils.getFormatTime(date, Constant.TIME_FORMAT); 158 | String timeExpire = TimeUtils.getFormatTime(TimeUtils.addDay(date, Constant.TIME_EXPIRE), Constant.TIME_FORMAT); 159 | 160 | String randomOrderId = CommonUtil.getRandomOrderId(); 161 | 162 | PayInfo payInfo = new PayInfo(); 163 | payInfo.setAppid(Constant.APP_ID); 164 | payInfo.setMch_id(Constant.MCH_ID); 165 | payInfo.setDevice_info("WEB"); 166 | payInfo.setNonce_str(randomNonceStr); 167 | payInfo.setSign_type("MD5"); //默认即为MD5 168 | payInfo.setBody("JSAPI支付测试"); 169 | payInfo.setAttach("支付测试4luluteam"); 170 | payInfo.setOut_trade_no(randomOrderId); 171 | payInfo.setTotal_fee(1); 172 | payInfo.setSpbill_create_ip(clientIP); 173 | payInfo.setTime_start(timeStart); 174 | payInfo.setTime_expire(timeExpire); 175 | payInfo.setNotify_url(Constant.URL_NOTIFY); 176 | payInfo.setTrade_type("JSAPI"); 177 | payInfo.setLimit_pay("no_credit"); 178 | payInfo.setOpenid(openId); 179 | 180 | return payInfo; 181 | } 182 | 183 | private String getSign(PayInfo payInfo) throws Exception { 184 | StringBuffer sb = new StringBuffer(); 185 | sb.append("appid=" + payInfo.getAppid()) 186 | .append("&attach=" + payInfo.getAttach()) 187 | .append("&body=" + payInfo.getBody()) 188 | .append("&device_info=" + payInfo.getDevice_info()) 189 | .append("&limit_pay=" + payInfo.getLimit_pay()) 190 | .append("&mch_id=" + payInfo.getMch_id()) 191 | .append("&nonce_str=" + payInfo.getNonce_str()) 192 | .append("¬ify_url=" + payInfo.getNotify_url()) 193 | .append("&openid=" + payInfo.getOpenid()) 194 | .append("&out_trade_no=" + payInfo.getOut_trade_no()) 195 | .append("&sign_type=" + payInfo.getSign_type()) 196 | .append("&spbill_create_ip=" + payInfo.getSpbill_create_ip()) 197 | .append("&time_expire=" + payInfo.getTime_expire()) 198 | .append("&time_start=" + payInfo.getTime_start()) 199 | .append("&total_fee=" + payInfo.getTotal_fee()) 200 | .append("&trade_type=" + payInfo.getTrade_type()) 201 | .append("&key=" + Constant.APP_KEY); 202 | 203 | log.error("排序后的拼接参数:" + sb.toString()); 204 | 205 | return CommonUtil.getMD5(sb.toString().trim()).toUpperCase(); 206 | } 207 | 208 | 209 | 210 | } 211 | 212 | 213 | -------------------------------------------------------------------------------- /wxpay/.idea/uiDesigner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /wxapp-todos/utils/md5.js: -------------------------------------------------------------------------------- 1 | /* 2 | * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message 3 | * Digest Algorithm, as defined in RFC 1321. 4 | * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. 5 | * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet 6 | * Distributed under the BSD License 7 | */ 8 | 9 | /* 10 | * Configurable variables. You may need to tweak these to be compatible with 11 | * the server-side, but the defaults work in most cases. 12 | */ 13 | var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ 14 | var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ 15 | var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ 16 | 17 | /* 18 | * These are the functions you'll usually want to call 19 | * They take string arguments and return either hex or base-64 encoded strings 20 | */ 21 | function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} 22 | function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} 23 | function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} 24 | function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } 25 | function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } 26 | function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } 27 | 28 | /* 29 | * Perform a simple self-test to see if the VM is working 30 | */ 31 | function md5_vm_test() 32 | { 33 | return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; 34 | } 35 | 36 | /* 37 | * Calculate the MD5 of an array of little-endian words, and a bit length 38 | */ 39 | function core_md5(x, len) 40 | { 41 | /* append padding */ 42 | x[len >> 5] |= 0x80 << ((len) % 32); 43 | x[(((len + 64) >>> 9) << 4) + 14] = len; 44 | 45 | var a = 1732584193; 46 | var b = -271733879; 47 | var c = -1732584194; 48 | var d = 271733878; 49 | 50 | for(var i = 0; i < x.length; i += 16) 51 | { 52 | var olda = a; 53 | var oldb = b; 54 | var oldc = c; 55 | var oldd = d; 56 | 57 | a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); 58 | d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); 59 | c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); 60 | b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); 61 | a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); 62 | d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); 63 | c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); 64 | b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); 65 | a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); 66 | d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); 67 | c = md5_ff(c, d, a, b, x[i+10], 17, -42063); 68 | b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); 69 | a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); 70 | d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); 71 | c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); 72 | b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); 73 | 74 | a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); 75 | d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); 76 | c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); 77 | b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); 78 | a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); 79 | d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); 80 | c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); 81 | b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); 82 | a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); 83 | d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); 84 | c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); 85 | b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); 86 | a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); 87 | d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); 88 | c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); 89 | b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); 90 | 91 | a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); 92 | d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); 93 | c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); 94 | b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); 95 | a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); 96 | d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); 97 | c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); 98 | b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); 99 | a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); 100 | d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); 101 | c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); 102 | b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); 103 | a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); 104 | d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); 105 | c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); 106 | b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); 107 | 108 | a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); 109 | d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); 110 | c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); 111 | b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); 112 | a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); 113 | d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); 114 | c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); 115 | b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); 116 | a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); 117 | d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); 118 | c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); 119 | b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); 120 | a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); 121 | d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); 122 | c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); 123 | b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); 124 | 125 | a = safe_add(a, olda); 126 | b = safe_add(b, oldb); 127 | c = safe_add(c, oldc); 128 | d = safe_add(d, oldd); 129 | } 130 | return Array(a, b, c, d); 131 | 132 | } 133 | 134 | /* 135 | * These functions implement the four basic operations the algorithm uses. 136 | */ 137 | function md5_cmn(q, a, b, x, s, t) 138 | { 139 | return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); 140 | } 141 | function md5_ff(a, b, c, d, x, s, t) 142 | { 143 | return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); 144 | } 145 | function md5_gg(a, b, c, d, x, s, t) 146 | { 147 | return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); 148 | } 149 | function md5_hh(a, b, c, d, x, s, t) 150 | { 151 | return md5_cmn(b ^ c ^ d, a, b, x, s, t); 152 | } 153 | function md5_ii(a, b, c, d, x, s, t) 154 | { 155 | return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); 156 | } 157 | 158 | /* 159 | * Calculate the HMAC-MD5, of a key and some data 160 | */ 161 | function core_hmac_md5(key, data) 162 | { 163 | var bkey = str2binl(key); 164 | if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); 165 | 166 | var ipad = Array(16), opad = Array(16); 167 | for(var i = 0; i < 16; i++) 168 | { 169 | ipad[i] = bkey[i] ^ 0x36363636; 170 | opad[i] = bkey[i] ^ 0x5C5C5C5C; 171 | } 172 | 173 | var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); 174 | return core_md5(opad.concat(hash), 512 + 128); 175 | } 176 | 177 | /* 178 | * Add integers, wrapping at 2^32. This uses 16-bit operations internally 179 | * to work around bugs in some JS interpreters. 180 | */ 181 | function safe_add(x, y) 182 | { 183 | var lsw = (x & 0xFFFF) + (y & 0xFFFF); 184 | var msw = (x >> 16) + (y >> 16) + (lsw >> 16); 185 | return (msw << 16) | (lsw & 0xFFFF); 186 | } 187 | 188 | /* 189 | * Bitwise rotate a 32-bit number to the left. 190 | */ 191 | function bit_rol(num, cnt) 192 | { 193 | return (num << cnt) | (num >>> (32 - cnt)); 194 | } 195 | 196 | /* 197 | * Convert a string to an array of little-endian words 198 | * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. 199 | */ 200 | function str2binl(str) 201 | { 202 | var bin = Array(); 203 | var mask = (1 << chrsz) - 1; 204 | for(var i = 0; i < str.length * chrsz; i += chrsz) 205 | bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); 206 | return bin; 207 | } 208 | 209 | /* 210 | * Convert an array of little-endian words to a string 211 | */ 212 | function binl2str(bin) 213 | { 214 | var str = ""; 215 | var mask = (1 << chrsz) - 1; 216 | for(var i = 0; i < bin.length * 32; i += chrsz) 217 | str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); 218 | return str; 219 | } 220 | 221 | /* 222 | * Convert an array of little-endian words to a hex string. 223 | */ 224 | function binl2hex(binarray) 225 | { 226 | var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; 227 | var str = ""; 228 | for(var i = 0; i < binarray.length * 4; i++) 229 | { 230 | str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + 231 | hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); 232 | } 233 | return str; 234 | } 235 | 236 | /* 237 | * Convert an array of little-endian words to a base-64 string 238 | */ 239 | function binl2b64(binarray) 240 | { 241 | var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 242 | var str = ""; 243 | for(var i = 0; i < binarray.length * 4; i += 3) 244 | { 245 | var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) 246 | | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) 247 | | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); 248 | for(var j = 0; j < 4; j++) 249 | { 250 | if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; 251 | else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); 252 | } 253 | } 254 | return str; 255 | } 256 | module.exports = { 257 | MD5:hex_md5 258 | } -------------------------------------------------------------------------------- /wxpay/src/main/java/luluteam/wxpay/util/HttpUtil.java: -------------------------------------------------------------------------------- 1 | package luluteam.wxpay.util; 2 | 3 | import java.io.*; 4 | import java.net.URL; 5 | import java.security.KeyManagementException; 6 | import java.security.KeyStoreException; 7 | import java.security.NoSuchAlgorithmException; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | import org.apache.http.Consts; 13 | import org.apache.http.Header; 14 | import org.apache.http.HttpEntity; 15 | import org.apache.http.HttpResponse; 16 | import org.apache.http.NameValuePair; 17 | import org.apache.http.client.ClientProtocolException; 18 | import org.apache.http.client.entity.UrlEncodedFormEntity; 19 | import org.apache.http.client.methods.CloseableHttpResponse; 20 | import org.apache.http.client.methods.HttpGet; 21 | import org.apache.http.client.methods.HttpPost; 22 | import org.apache.http.conn.ssl.SSLConnectionSocketFactory; 23 | import org.apache.http.conn.ssl.SSLContextBuilder; 24 | import org.apache.http.conn.ssl.TrustSelfSignedStrategy; 25 | import org.apache.http.cookie.Cookie; 26 | import org.apache.http.impl.client.BasicCookieStore; 27 | import org.apache.http.impl.client.CloseableHttpClient; 28 | import org.apache.http.impl.client.HttpClients; 29 | import org.apache.http.message.BasicHeader; 30 | import org.apache.http.message.BasicNameValuePair; 31 | import org.apache.http.util.EntityUtils; 32 | 33 | import javax.net.ssl.HttpsURLConnection; 34 | 35 | public class HttpUtil { 36 | 37 | // User-Agent 38 | public static final String USERAGENT_FIREFOX = "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"; 39 | public static final String USERAGENT_IE = "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko"; 40 | 41 | private CloseableHttpClient httpClient; 42 | 43 | private BasicCookieStore cookieStore; 44 | private HttpGet get; 45 | private HttpPost post; 46 | 47 | public static StringBuffer httpsRequest(String requestUrl, String requestMethod, String output) throws IOException { 48 | URL url = new URL(requestUrl); 49 | HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); 50 | connection.setDoOutput(true); 51 | connection.setDoInput(true); 52 | connection.setUseCaches(false); 53 | connection.setRequestMethod(requestMethod); 54 | if (null != output) { 55 | OutputStream outputStream = connection.getOutputStream(); 56 | outputStream.write(output.getBytes("UTF-8")); 57 | outputStream.close(); 58 | } 59 | // 从输入流读取返回内容 60 | InputStream inputStream = connection.getInputStream(); 61 | InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "UTF-8"); 62 | BufferedReader bufferedReader = new BufferedReader(inputStreamReader); 63 | String str = null; 64 | StringBuffer buffer = new StringBuffer(); 65 | while ((str = bufferedReader.readLine()) != null) { 66 | buffer.append(str); 67 | } 68 | bufferedReader.close(); 69 | inputStreamReader.close(); 70 | inputStream.close(); 71 | inputStream = null; 72 | connection.disconnect(); 73 | return buffer; 74 | } 75 | 76 | 77 | public HttpResult doGet(String url, Map headers, Map params) throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException, ClientProtocolException, IOException { 78 | 79 | if (url == null|| url.equals("")) { 80 | return null; 81 | } 82 | 83 | SSLContextBuilder builder = new SSLContextBuilder(); 84 | builder.loadTrustMaterial(null, new TrustSelfSignedStrategy()); 85 | SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build()); 86 | cookieStore = new BasicCookieStore(); 87 | CloseableHttpClient httpclient = HttpClients.custom().setDefaultCookieStore(cookieStore) 88 | .setSSLSocketFactory(sslsf).build(); 89 | 90 | HttpResult result = null; 91 | try { 92 | 93 | url = url + "?" + parseParams(params); 94 | HttpGet httpget = new HttpGet(url); 95 | httpget.setHeaders(parseHeader(headers)); 96 | 97 | CloseableHttpResponse response = httpclient.execute(httpget); 98 | try { 99 | HttpEntity entity = response.getEntity(); 100 | 101 | if (entity != null) { 102 | result = new HttpResult(); 103 | result.setCookies(cookieStore.getCookies()); 104 | result.setStatusCode(response.getStatusLine().getStatusCode()); 105 | result.setHeaders(response.getAllHeaders()); 106 | result.setBody(EntityUtils.toString(entity)); 107 | } 108 | 109 | } finally { 110 | response.close(); 111 | } 112 | } finally { 113 | httpclient.close(); 114 | } 115 | 116 | return result; 117 | 118 | } 119 | 120 | public HttpResult doPost(String url, Map headers, Map postData, String encoding) throws Exception { 121 | 122 | if (url == null|| url.equals("")) { 123 | return null; 124 | } 125 | if (encoding == null|| encoding.equals("")) { 126 | encoding = "utf-8"; 127 | } 128 | 129 | SSLContextBuilder builder = new SSLContextBuilder(); 130 | builder.loadTrustMaterial(null, new TrustSelfSignedStrategy()); 131 | SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build()); 132 | cookieStore = new BasicCookieStore(); 133 | CloseableHttpClient httpClient = HttpClients.custom().setDefaultCookieStore(cookieStore) 134 | .setSSLSocketFactory(sslsf).build(); 135 | 136 | post = new HttpPost(url); 137 | List list = new ArrayList(); 138 | for (String tmp : postData.keySet()) { 139 | list.add(new BasicNameValuePair(tmp, postData.get(tmp))); 140 | } 141 | post.setEntity(new UrlEncodedFormEntity(list, encoding)); 142 | post.setHeaders(parseHeader(headers)); 143 | 144 | CloseableHttpResponse response = httpClient.execute(post); 145 | HttpEntity entity = response.getEntity(); 146 | 147 | HttpResult result = new HttpResult(); 148 | result.setCookies(cookieStore.getCookies()); 149 | result.setStatusCode(response.getStatusLine().getStatusCode()); 150 | result.setHeaders(response.getAllHeaders()); 151 | result.setBody(EntityUtils.toString(entity, encoding)); 152 | 153 | close(entity, response); 154 | 155 | return result; 156 | } 157 | 158 | private String parseParams(Map params) { 159 | if (params == null || params.isEmpty()) { 160 | return ""; 161 | } 162 | 163 | StringBuffer sb = new StringBuffer(); 164 | for (String key : params.keySet()) { 165 | sb.append(key + "=" + params.get(key) + "&"); 166 | } 167 | return sb.substring(0, sb.length() - 1); 168 | 169 | } 170 | 171 | private Header[] parseHeader(Map headers) { 172 | if (headers == null || headers.isEmpty()) { 173 | return getDefaultHeaders(); 174 | } 175 | 176 | Header[] retHeader = new BasicHeader[headers.size()]; 177 | int i = 0; 178 | for (String str : headers.keySet()) { 179 | retHeader[i++] = new BasicHeader(str, headers.get(str)); 180 | } 181 | return retHeader; 182 | } 183 | 184 | private Header[] getDefaultHeaders() { 185 | Header[] headers = new BasicHeader[3]; 186 | headers[0] = new BasicHeader("User-Agent", USERAGENT_IE); 187 | headers[1] = new BasicHeader("Accept-Encoding", "gzip, deflate"); 188 | headers[2] = new BasicHeader("Accept-Language", "en-US,en;q=0.8,zh-Hans-CN;q=0.5,zh-Hans;q=0.3"); 189 | return headers; 190 | } 191 | 192 | private void close(HttpEntity entity, CloseableHttpResponse response) { 193 | try { 194 | if (entity != null) { 195 | InputStream input = entity.getContent(); 196 | input.close(); 197 | } 198 | } catch (Exception e) { 199 | e.printStackTrace(); 200 | } finally { 201 | try { 202 | response.close(); 203 | } catch (IOException e) { 204 | //e.printStackTrace(); 205 | } 206 | } 207 | } 208 | 209 | 210 | /** 211 | * 下载文件 212 | * @param url 下载文件的链接 213 | * @param destFile 包含路径的目标文件名 214 | * @param headers 请求头 215 | * @return 216 | */ 217 | public HttpResult downloadFile(String url, String destFile, Map headers) throws Exception { 218 | 219 | SSLContextBuilder builder = new SSLContextBuilder(); 220 | builder.loadTrustMaterial(null, new TrustSelfSignedStrategy()); 221 | SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build()); 222 | BasicCookieStore cookieStore = new BasicCookieStore(); 223 | CloseableHttpClient httpclient = HttpClients.custom().setDefaultCookieStore(cookieStore).setSSLSocketFactory(sslsf).build(); 224 | 225 | HttpGet get = new HttpGet(url); 226 | get.setHeaders(parseHeader(headers)); 227 | InputStream input = null; 228 | CloseableHttpResponse response = null; 229 | HttpResult result = null; 230 | 231 | try { 232 | response = httpclient.execute(get); 233 | HttpEntity entity = response.getEntity(); 234 | input = entity.getContent(); 235 | File file = new File(destFile); 236 | 237 | FileOutputStream fos = new FileOutputStream(file); 238 | int len = -1; 239 | byte[] tmp = new byte[1024]; 240 | while((len=input.read(tmp)) != -1) { 241 | fos.write(tmp, 0, len); 242 | } 243 | fos.flush(); 244 | fos.close(); 245 | 246 | result = new HttpResult(); 247 | result.setCookies(cookieStore.getCookies()); 248 | result.setStatusCode(response.getStatusLine().getStatusCode()); 249 | result.setHeaders(response.getAllHeaders()); 250 | result.setBody(EntityUtils.toString(entity, Consts.UTF_8)); 251 | 252 | } catch (IOException e) { 253 | e.printStackTrace(); 254 | } finally { 255 | try { 256 | if(input != null) { 257 | input.close(); 258 | } 259 | if(response != null) { 260 | response.close(); 261 | } 262 | } catch (IOException e) { 263 | e.printStackTrace(); 264 | } 265 | } 266 | return result; 267 | } 268 | 269 | } 270 | --------------------------------------------------------------------------------