fondy 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fondy.rb +1 -0
- data/lib/fondy/client.rb +3 -3
- data/lib/fondy/request.rb +1 -1
- data/lib/fondy/signature.rb +3 -1
- data/lib/fondy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57bc5a72e4c5d272e31aed137929ea388a7c4b88
|
4
|
+
data.tar.gz: 138b4e44a69784bbf7f4d9d66617a82a77294b10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6d369d94c931eca6a7ea9faec46a1db670ffa109950f4d180ba66e39181cb1463f032dd56f5695c4749f455500a3fffeb4c078e13363deb2d90140e921a73c3
|
7
|
+
data.tar.gz: 0ac578585a0511c4f48be32479b559d0a0df07d8ca733eca74079d96d93ab2fdd27530b254d3ab3c362de747a93657879220adb0f57ba0d7641bdb04f71b002e
|
data/lib/fondy.rb
CHANGED
data/lib/fondy/client.rb
CHANGED
@@ -12,7 +12,7 @@ module Fondy
|
|
12
12
|
merchant_id: merchant_id,
|
13
13
|
order_id: order_id,
|
14
14
|
}
|
15
|
-
send_request(:post,
|
15
|
+
send_request(:post, '/api/status/order_id', params)
|
16
16
|
end
|
17
17
|
|
18
18
|
def capture(order_id:, amount:, currency:)
|
@@ -22,7 +22,7 @@ module Fondy
|
|
22
22
|
amount: amount,
|
23
23
|
currency: currency,
|
24
24
|
}
|
25
|
-
send_request(:post,
|
25
|
+
send_request(:post, '/api/capture/order_id', params)
|
26
26
|
end
|
27
27
|
|
28
28
|
def reverse(order_id:, amount:, currency:, comment: nil)
|
@@ -33,7 +33,7 @@ module Fondy
|
|
33
33
|
currency: currency,
|
34
34
|
}
|
35
35
|
params[:comment] = comment if comment
|
36
|
-
send_request(:post,
|
36
|
+
send_request(:post, '/api/reverse/order_id', params)
|
37
37
|
end
|
38
38
|
|
39
39
|
private
|
data/lib/fondy/request.rb
CHANGED
data/lib/fondy/signature.rb
CHANGED
@@ -10,7 +10,9 @@ module Fondy
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def build
|
13
|
-
filtered_params = params.reject
|
13
|
+
filtered_params = params.reject do |k, v|
|
14
|
+
%w(signature response_signature_string).include?(k.to_s) || v.to_s.empty?
|
15
|
+
end
|
14
16
|
params_str = filtered_params.sort_by(&:first).map(&:last).join('|')
|
15
17
|
Digest::SHA1.hexdigest("#{password}|#{params_str}")
|
16
18
|
end
|
data/lib/fondy/version.rb
CHANGED