omnipay 0.0.2 → 0.0.4
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe9720764c2301a4ac9f4093f7a007ae02a30218
|
|
4
|
+
data.tar.gz: 767eb86e44f1c07be4cece815b0b17ccea205b57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d31dd12edd544e6a171e074d6094d170b868e464e513967955c6ef001902bf943886e086ab0e00a42eebbbd7e9481d76a8676368b3539fb106159dc184c8c90b
|
|
7
|
+
data.tar.gz: ab2da0e7a7505776b020555ad979d555a81f81cde685ce015653398b84ca95f533240cd6444688fc46aaca10e4ede0f79def320f91e9b69be3cf5a6af9ab471e
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
# - client_passphrase:string (mandatory) : the passphrase for your account
|
|
7
7
|
# - wallet_id:string (mandatory) : the wallet to be credited with the payments
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
require 'omnipay/adapters/mangopay/client'
|
|
11
10
|
|
|
12
11
|
module Omnipay
|
|
13
12
|
module Adapters
|
|
@@ -107,12 +107,18 @@ module Omnipay
|
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
def signature(params)
|
|
110
|
-
|
|
110
|
+
# Params values sorted by key name
|
|
111
|
+
values = params.sort_by{|k,v|k.to_s}.map(&:last)
|
|
112
|
+
to_sign = (values + [@secret_key]).join('|')
|
|
111
113
|
Digest::SHA512.hexdigest(Base64.encode64(to_sign).gsub(/\n/, ''))
|
|
112
114
|
end
|
|
113
115
|
|
|
114
116
|
def get_transaction_amount(transaction_id)
|
|
115
|
-
response = HTTParty.post(
|
|
117
|
+
response = HTTParty.post(
|
|
118
|
+
"#{validation_url}/rest/payment/find?serialNumber=#{@tpe_id}&key=#{@secret_key}&transactionRef=#{transaction_id}",
|
|
119
|
+
:headers => {'content-type' => "application/x-www-form-urlencoded"} # For ruby 1.8.7
|
|
120
|
+
)
|
|
121
|
+
|
|
116
122
|
(response.parsed_response["transaction"][0]["ok"] != 0) && response.parsed_response["transaction"][0]["amount"]
|
|
117
123
|
end
|
|
118
124
|
|
data/lib/omnipay/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omnipay
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ClicRDV
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-01-
|
|
11
|
+
date: 2014-01-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rack
|
|
@@ -16,28 +16,28 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '>='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 1.4.5
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '>='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 1.4.5
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: httparty
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ~>
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: 0.11.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ~>
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: 0.11.0
|
|
41
41
|
description: Payment gateway abstraction for rack applications. Think omniauth for
|
|
42
42
|
off-site payment.
|
|
43
43
|
email:
|