kakeibo 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -3
  3. data/kakeibo.gemspec +2 -2
  4. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a5e283691ed79f090e5e549b7f9611d6a00b9ca
4
- data.tar.gz: e3425ee404da395fea670c351aa4e443eb3cef64
3
+ metadata.gz: a12a177e265793feb3a6fffd42baefa0c5edc1eb
4
+ data.tar.gz: ae24ace5460c7fe3f26baa75cc99be0517f298d2
5
5
  SHA512:
6
- metadata.gz: 65199f7c22547873e2ffce9aa1f58bf767ada37eb1ecce871274956a4ed2d04c53b008e1bcdd65bfa286317f0c6a3aaf1f5f9806690048b5a4aa87b8749ae38a
7
- data.tar.gz: edc580d5a152670c00565fe62d22b950ce9f96866a2bb70dcb3e2e8ceb5df8e9855f1438271ad406d104db2a2e05b162b122b641742d59bf24390caaa975c6f2
6
+ metadata.gz: f7a19c1f4802d60ad3a714c51382c32a721b9da3c3f0e5832f4959b43f1592e7eeda5534a62f2737be1da1f82a20352712a54b0ced6071d5bed45a365b1d4ce0
7
+ data.tar.gz: 8757629aa251d9166acc20d85558bd284b942da80547d9aacb24d6034f6b82633e351076117973906a20d45bb6ccf2bc372eb3aff49bb276fc529af7f2585dee
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Kakeibo
2
2
 
3
- TODO: Write a gem description
3
+ IAP and IAB receipt validation module.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,14 +18,50 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ ### iOS
22
+ * iOS(IAP in-app-purchase) receipt validation uses Apple receipt validation API.
23
+ * iOSのレシート検証はAppleのレシート検証APIを叩くことで行う
24
+
25
+ ```
26
+ kakeibo = Kakeibo.new(:Iap, retry_count: 2)
27
+ kakeibo.fetch(receipt, transaction_id: SKPaymentTransaction.transactionIdentifier)
28
+ kakeibo.valid?
29
+ ```
30
+
31
+ #### initialize option
32
+ * retry_count
33
+ * If Apple receipt API is down, fetching API retry_count times.
34
+ * Appleのレシート検証APIが落ちていた時の試行回数
35
+
36
+ ### Android
37
+ * Android(IAB in-app-billings) receipt validation uses public key from Google Play. DO NOT USE Google API.
38
+ * Androidのレシート検証は、Google Playから払い出される公開鍵を使って検証する。GoogleのAPIは使用しない
39
+
40
+ ```
41
+ kakeibo = Kakeibo.new(:Iab)
42
+ kakeibo.fetch(
43
+ receipt,
44
+ signature: signature,
45
+ base64_encoded_public_key: base64_encoded_public_key,
46
+ developer_payload: developer_payload
47
+ )
48
+ kakeibo.valid?
49
+ kakeibo.order_id # You should validate order_id uniqueness for security
50
+ ```
51
+
52
+ #### for sucurity
53
+ * Please See [this pages](http://developer.android.com/training/in-app-billing/purchase-iab-products.html) security recommendation!
54
+ * You should verify that the orderId is a unique value that you have not previously processed, and the developerPayload string matches the token that you sent previously with the purchase request.
55
+ * orderIdはユニーク性の担保をしてください。developerPayloadを使って、必ずrequestの整合性チェックを行って下さい
22
56
 
23
57
  ## Refernces
24
58
 
25
59
  ### iOS
60
+ * [レシート検証プログラミングガイド](https://developer.apple.com/jp/devcenter/ios/library/documentation/ValidateAppStoreReceipt.pdf)
61
+ * [In-App Purchaseプログラミングガイド](https://developer.apple.com/jp/devcenter/ios/library/documentation/StoreKitGuide.pdf)
62
+ * [SKPaymentTransaction](https://developer.apple.com/library/prerelease/mac/documentation/StoreKit/Reference/SKPaymentTransaction_Class/)
26
63
 
27
64
  ### Android
28
-
29
65
  * [Google Play In-app Billing](http://developer.android.com/google/play/billing/index.html)
30
66
  * [Purchasing In-app Billing Products](http://developer.android.com/training/in-app-billing/purchase-iab-products.html)
31
67
  * [Security Best Practices](http://developer.android.com/google/play/billing/billing_best_practices.html)
@@ -4,12 +4,12 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "kakeibo"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.authors = ["Spring_MT"]
9
9
  spec.email = ["today.is.sky.blue.sky@gmail.com"]
10
10
  spec.summary = %q{IAP and IAB receipt validation module.}
11
11
  spec.description = %q{IAP and IAB receipt validation module.}
12
- spec.homepage = ""
12
+ spec.homepage = "https://github.com/SpringMT/kakeibo-global"
13
13
  spec.license = "MIT"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kakeibo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spring_MT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-15 00:00:00.000000000 Z
11
+ date: 2014-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,7 +75,7 @@ files:
75
75
  - spec/samples/sample_iab_signature
76
76
  - spec/samples/sample_iap_receipt
77
77
  - spec/spec_helper.rb
78
- homepage: ''
78
+ homepage: https://github.com/SpringMT/kakeibo-global
79
79
  licenses:
80
80
  - MIT
81
81
  metadata: {}
@@ -112,3 +112,4 @@ test_files:
112
112
  - spec/samples/sample_iab_signature
113
113
  - spec/samples/sample_iap_receipt
114
114
  - spec/spec_helper.rb
115
+ has_rdoc: