coinjar-checkout 0.0.1 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: deab522795720037d35e7b21abd55b6e2c62ba4d
4
- data.tar.gz: a1c4310222c0c6fa3e56fa402d38ef821109a68e
3
+ metadata.gz: 760a290721d2ad544a08147b742ceb15a3d7326b
4
+ data.tar.gz: aca8749df3ce8cae70d7366a964a59e1b2178a7a
5
5
  SHA512:
6
- metadata.gz: 2f3ab0adc8d649dfa06714d3bd27f999e86ee2856507f0d21e0f4cd0351dd6b57fe0caac604f4cf5086c20a5344dcebb89c9ab7921a7752e1345a9ca15e1b043
7
- data.tar.gz: fe6bb393ad0ab6bdb3c490008161b6592679b616541d80b29390d76bca513915a76e8ab6563ba23d0951ed68ff6395dbc0a966e899a13d95baaf7c5252f7be1b
6
+ metadata.gz: 1a80ddd431f82552955398bdd7cdf63a8c11f02f74ebe5c07b4aec9a677808c5346c6b06682e9f041a34411b15ca76b55f1d4b80f20a85782d910aa612e0d046
7
+ data.tar.gz: 97a9dfa736abfb0e534ca83ae401576aee3f63162291a4b074591ce140b896cf712c7231c006ce67f47f0b312ef55629893eca0158929b7b770dcd79d42d5194
@@ -8,7 +8,11 @@ module CoinJarCheckout
8
8
  end
9
9
 
10
10
  def verify
11
- ipn_digest == Digest::SHA256.new.hexdigest("#{uuid}#{amount}#{currency}#{status}#{CoinJarCheckout.secret}")
11
+ ipn_digest == OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new('sha256'), CoinJarCheckout.secret, "#{uuid}#{amount}#{currency}#{status}")
12
+ end
13
+
14
+ def valid?
15
+ verify
12
16
  end
13
17
 
14
18
  def fetch_order
@@ -1,3 +1,3 @@
1
1
  module CoinJarCheckout
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coinjar-checkout
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
  - CoinJar Pty Ltd
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-27 00:00:00.000000000 Z
13
+ date: 2013-07-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler