itunes_receipt_decoder 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ee14ef362c8cbcea6ff0c44ecd75e99b0b5095f
|
4
|
+
data.tar.gz: bf0d7e7bf9280a8d0db9d4c7293550c1e7d11511
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81bc63bfbd525b90bbbea5a15b627d37e1c43ae7a962bdcbc5fbdfe2810e982e3ebd17dd05a1b902129097a11f70fd5718233521b8c90db3ba476c78f11e595a
|
7
|
+
data.tar.gz: ae515c200465fbe997cc6282b47b8897f9f6af9634ade1a6759ce625ac3de6b63e13e58a97ae9decfbbd9f88e18feb8c7f0addccbca35fb0d300537b34474974
|
@@ -20,7 +20,7 @@ module ItunesReceiptDecoder
|
|
20
20
|
# * +receipt_data+ - the base64 encoded receipt
|
21
21
|
# * +options+ - optional arguments
|
22
22
|
def self.new(receipt_data, options = {})
|
23
|
-
raw_receipt = Base64.
|
23
|
+
raw_receipt = Base64.decode64(receipt_data)
|
24
24
|
rescue ArgumentError => e
|
25
25
|
raise DecodingError, e.message
|
26
26
|
else
|
@@ -16,7 +16,7 @@ module ItunesReceiptDecoder
|
|
16
16
|
|
17
17
|
def decode
|
18
18
|
@receipt = parse_purchase_info
|
19
|
-
@environment = payload.fetch('environment')
|
19
|
+
@environment = payload.fetch('environment', nil)
|
20
20
|
rescue KeyError => e
|
21
21
|
raise DecodingError, e.message
|
22
22
|
end
|
@@ -31,7 +31,7 @@ module ItunesReceiptDecoder
|
|
31
31
|
|
32
32
|
def purchase_info
|
33
33
|
return @purchase_info if @purchase_info
|
34
|
-
contents = Base64.
|
34
|
+
contents = Base64.decode64 payload.fetch('purchase-info')
|
35
35
|
rescue KeyError => e
|
36
36
|
raise DecodingError, e.message
|
37
37
|
rescue ArgumentError => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itunes_receipt_decoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mbaasy.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: CFPropertyList
|