WXPayDefaultConfig.java 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package com.fdkankan.pay.wx;
  2. import com.fdkankan.pay.wx.sdk.WXPayConfig;
  3. import java.io.ByteArrayInputStream;
  4. import java.io.InputStream;
  5. public class WXPayDefaultConfig implements WXPayConfig {
  6. private byte[] certData;
  7. public WXPayDefaultConfig() throws Exception {
  8. /*String certPath = CONSTANTFILEPATH.WEIXINCERT;
  9. File file = new File(certPath);
  10. InputStream certStream = new FileInputStream(file);
  11. this.certData = new byte[(int) file.length()];
  12. certStream.read(this.certData);
  13. certStream.close();*/
  14. }
  15. public String getAppID() {
  16. return "wx779dbafb46bab697";
  17. }
  18. public String getMchID() {
  19. return "1505605401";
  20. }
  21. public String getKey() {
  22. return "4DAGE1684DAGE1684DAGE1684DAGE168";
  23. }
  24. public String getSecret() {
  25. return "b578c41b560f37c2c2c1981114830d23";
  26. }
  27. public String getCreateIP() {
  28. return "47.104.99.106";
  29. }
  30. public String getH5RedirectURL() {
  31. return "mobile.html#/check";
  32. }
  33. public String getNotifyURL() {
  34. return "api/order/pay/wechatPay/notify";
  35. }
  36. public String getOrderURL() {
  37. return "https://api.mch.weixin.qq.com/pay/unifiedorder";
  38. }
  39. public InputStream getCertStream() {
  40. return new ByteArrayInputStream(this.certData);
  41. }
  42. public int getHttpConnectTimeoutMs() {
  43. return 8000;
  44. }
  45. public int getHttpReadTimeoutMs() {
  46. return 10000;
  47. }
  48. }