yl_alipay 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.travis.yml +5 -0
  4. data/CHANGELOG.md +101 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +810 -0
  8. data/Rakefile +9 -0
  9. data/alipay.gemspec +25 -0
  10. data/lib/alipay/app/service.rb +57 -0
  11. data/lib/alipay/app/sign.rb +36 -0
  12. data/lib/alipay/mobile/service.rb +27 -0
  13. data/lib/alipay/mobile/sign.rb +9 -0
  14. data/lib/alipay/notify.rb +19 -0
  15. data/lib/alipay/service.rb +239 -0
  16. data/lib/alipay/sign/dsa.rb +13 -0
  17. data/lib/alipay/sign/md5.rb +15 -0
  18. data/lib/alipay/sign/rsa.rb +18 -0
  19. data/lib/alipay/sign/rsa2.rb +18 -0
  20. data/lib/alipay/sign.rb +54 -0
  21. data/lib/alipay/utils.rb +19 -0
  22. data/lib/alipay/version.rb +3 -0
  23. data/lib/alipay/wap/notify.rb +13 -0
  24. data/lib/alipay/wap/service.rb +84 -0
  25. data/lib/alipay/wap/sign.rb +37 -0
  26. data/lib/alipay.rb +31 -0
  27. data/lib/yl_alipay.rb +1 -0
  28. data/test/alipay/app/service_test.rb +32 -0
  29. data/test/alipay/app/sign_test.rb +37 -0
  30. data/test/alipay/mobile/service_test.rb +16 -0
  31. data/test/alipay/mobile/sign_test.rb +7 -0
  32. data/test/alipay/notify_test.rb +35 -0
  33. data/test/alipay/service_test.rb +265 -0
  34. data/test/alipay/sign/md5_test.rb +20 -0
  35. data/test/alipay/sign/rsa2_test.rb +22 -0
  36. data/test/alipay/sign/rsa_test.rb +20 -0
  37. data/test/alipay/sign_test.rb +30 -0
  38. data/test/alipay/utils_test.rb +12 -0
  39. data/test/alipay/wap/notify_test.rb +38 -0
  40. data/test/alipay/wap/service_test.rb +67 -0
  41. data/test/alipay/wap/sign_test.rb +19 -0
  42. data/test/alipay_test.rb +11 -0
  43. data/test/test_helper.rb +34 -0
  44. data/yl_alipay.gemspec +25 -0
  45. metadata +159 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7746331657f8f9f8e18482d1fab0c29506187ddc
4
+ data.tar.gz: 4a3e6b0d11c95e8e34be4f36fb9d253f5934a03d
5
+ SHA512:
6
+ metadata.gz: 7fff30a979004687ee466691f25478c69f6ca3e00f05bb58c8eadd1a787d0f0aa68c788ce88e621dafd61edaf2c1ccd169b30f65b146d4fed92563c5ba9ce58b
7
+ data.tar.gz: 7d9b0f7e8cde2b049f1022e14b841d7509f4f39cb4dc803d1513ed1921ea6174e40725c2eec618a534d49fc74a0d55aecae1e923f1e1249977b5bf26ffd56bc9
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ .idea
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.0
4
+ - 2.2.4
5
+ - 2.1.8
data/CHANGELOG.md ADDED
@@ -0,0 +1,101 @@
1
+ ## master
2
+
3
+ ## v0.14.0 (2016-12-28)
4
+
5
+ - Add `Alipay::App::Service.create_forex_trade_wap_url` method, thanks @xiaohesong #61
6
+
7
+ ## v0.13.0 (2016-12-24)
8
+
9
+ - Add `Alipay::App::Service.alipay_trade_app_pay` method, thanks @FX-HAO #64
10
+
11
+ ## v0.12.0 (2016-03-07)
12
+
13
+ - Add `Alipay::Service::batch_trans_notify_url` method, thanks @ryancheung #58
14
+
15
+ ## v0.11.0 (2015-12-04)
16
+
17
+ - Add `Alipay::Wap::Service.security_risk_detect` method, thanks @jasl #55
18
+
19
+ ## v0.10.0 (2015-11-03)
20
+
21
+ - Add `Alipay::Service.account_page_query` method, thanks @xjz19901211 #53
22
+
23
+ ## v0.9.0 (2015-10-15)
24
+
25
+ - Add `Alipay::Service.create_direct_pay_by_user_wap_url` method, thanks @serco-chen #52
26
+
27
+ ## v0.8.0 (2015-07-20)
28
+
29
+ - Add `Alipay::Mobile::Service.mobile_security_pay_string` method, thanks @Sen #49
30
+ - Remove `Alipay::Service.mobile_security_pay_url` #49
31
+
32
+ ## v0.7.1 (2015-04-10)
33
+
34
+ - Don't warning when `rmb_fee` is used in forex_refund_url method.
35
+
36
+ ## v0.7.0 (2015-04-07)
37
+
38
+ - Remove Alipay.seller_email setting, it can be replaced by seller_id, than same with pid.
39
+ - Alipay::Wap::Service.trade_create_direct_token add a required params: seller_account_name.
40
+
41
+
42
+ ## v0.6.0 (2015-04-06)
43
+
44
+ New API:
45
+
46
+ - Add Alipay::Service.mobile_security_pay_url.
47
+ - All service methods accept `options` args to config pid, seller_email and key.
48
+
49
+ New Config:
50
+
51
+ - Add `Alipay.sign_type`, default is 'MD5', allow: 'MD5', 'RSA'. 'DSA' is not implemented yet.
52
+
53
+ Break Changes:
54
+
55
+ - Move `Alipay::Service::Wap` to `Alipay::Wap::Service`
56
+ - Move `Alipay::Sign::Wap` to `Alipay::Wap::Sign`
57
+ - Move `Alipay::Notify::Wap` to `Alipay::Wap::Notify`
58
+ - Rename `Alipay::Service.create_forex_single_refund_url` to `Alipay::Service.forex_refund_url`
59
+ - Rename `Alipay::Service.create_forex_trade` to `Alipay::Service.create_forex_trade_url`
60
+ - Rename `Alipay::Service.create_refund_url` to `Alipay::Service.refund_fastpay_by_platform_pwd_url`
61
+ - Rename `Service::Wap.auth_and_execute` to `Service::Wap::Service.auth_and_execute_url`
62
+
63
+ Now `Alipay::Sign.verify?` and `Alipay::Wap::Sign.verify?` detect sign_type by params.
64
+
65
+ Development:
66
+
67
+ - Update Test::Unit to Minitest.
68
+ - Use fxied test data.
69
+
70
+ ## v0.5.0 (2015-03-09)
71
+
72
+ - Add `forex_single_refund` service.
73
+ - Add `debug_mode` config:
74
+
75
+ set `Alipay.debug_mode = false` to disable options check warning in production env.
76
+
77
+ ## v0.4.1 (2015-03-03)
78
+
79
+ - Fix `single_trade_query` check options typo.
80
+
81
+ ## v0.4.0 (2015-01-23)
82
+
83
+ - Add `single_trade_query` service. #19
84
+
85
+ ## v0.3.1 (2015-01-15)
86
+
87
+ - Fix xml encoding #18
88
+
89
+ ## v0.3.0 (2014-12-10)
90
+
91
+ - Add `close_trade` service. by @linjunpop #16
92
+
93
+ ## v0.2.0 (2014-12-03)
94
+
95
+ - Add `create_forex_trade` service. by @christophe-dufour #15
96
+
97
+ ## v0.1.0 (2014-06-15)
98
+
99
+ - Add Wap API by @HungYuHei
100
+
101
+ - Add App API by @HungYuHei
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in alipay.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Rei
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.