文件名称:微支付 JAVA集合版
文件大小:7KB
文件格式:RAR
更新时间:2017-09-24 08:52:57
微信 支付 JAVA
WxPayHelper wxPayHelper = new WxPayHelper(); //先设置基本信息 wxPayHelper.SetAppId("wxf8b4f85f3a794e77"); wxPayHelper.SetAppKey("2Wozy2aksie1puXUBpWD8oZxiD1DfQuEaiC7KcRATv1Ino3mdopKaPGQQ7TtkNySuAmCaDCrw4xhPY5qKTBl7Fzm0RgR3c0WaVYIXZARsxzHV2x7iwPPzOz94dnwPWSn"); wxPayHelper.SetPartnerKey("8934e7d15453e97507ef794cf7b0519d"); wxPayHelper.SetSignType("sha1"); //设置请求package信息 wxPayHelper.SetParameter("bank_type", "WX"); wxPayHelper.SetParameter("body", "test"); wxPayHelper.SetParameter("partner", "1900000109"); wxPayHelper.SetParameter("out_trade_no", CommonUtil.CreateNoncestr()); wxPayHelper.SetParameter("total_fee", "1"); wxPayHelper.SetParameter("fee_type", "1"); wxPayHelper.SetParameter("notify_url", "htttp://www.baidu.com"); wxPayHelper.SetParameter("spbill_create_ip", "127.0.0.1"); wxPayHelper.SetParameter("input_charset", "GBK"); System.out.println("生成app支付package:"); System.out.println(wxPayHelper.CreateAppPackage("test")); System.out.println("生成jsapi支付package:"); System.out.println(wxPayHelper.CreateBizPackage()); System.out.println("生成原生支付url:"); System.out.println(wxPayHelper.CreateNativeUrl("abc")); System.out.println("生成原生支付package:"); System.out.println(wxPayHelper.CreateNativePackage("0", "ok")); 按readme配制好了以后一键生成对应需要的支付请求
【文件预览】:
WxPay.java
----MD5SignUtil.java(717B)
----SDKRuntimeException.java(199B)
----WxPayHelper.java(7KB)
----Example.java(1KB)
----CommonUtil.java(3KB)
----SHA1Util.java(1KB)
----MD5Util.java(1KB)
----readme.txt(1KB)