qiwi-pay 0.1.4 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/qiwi-pay/payment_operation.rb +5 -0
- data/lib/qiwi-pay/signature.rb +1 -5
- data/lib/qiwi-pay/version.rb +1 -1
- data/lib/qiwi-pay/wpf/sale_operation.rb +1 -1
- data/spec/qiwi-pay/signature_spec.rb +5 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1991d8bd7f14a97bc596e7177b5e05e1ef00f100eedc26f88814313a171e0f89
|
4
|
+
data.tar.gz: 18ac48352a5d69e8cd40dc2f21a9cf21889aa96a12726b79916cd042b8c3f87d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56ef773973fdac8d7dbed7e5a664199b1da6631e4e4d4f09a03ddd6ce0b73b632a3bef7212514cf16dfd9838603cdffcc7934c925711d98c12240201767549d5
|
7
|
+
data.tar.gz: c26a4d95972c54bf34b800173d568ffa64ec530fb25cee61d26599c2e37edd6b96486fe3a4ed8b26537bf30306cdfafce4dcf3c4508179a6d6b7969656cf54e7
|
data/Gemfile.lock
CHANGED
data/lib/qiwi-pay/signature.rb
CHANGED
@@ -8,13 +8,9 @@ module QiwiPay
|
|
8
8
|
# @param params [Hash] request parameters
|
9
9
|
# @param secret [String] secret key for signature
|
10
10
|
def initialize(params, secret)
|
11
|
-
@params = params.tap do |hs|
|
11
|
+
@params = params.dup.tap do |hs|
|
12
12
|
hs.delete :sign
|
13
13
|
hs.delete 'sign'
|
14
|
-
hs.delete :cheque
|
15
|
-
hs.delete 'cheque'
|
16
|
-
hs.delete :merchant_cheque
|
17
|
-
hs.delete 'merchant_cheque'
|
18
14
|
end
|
19
15
|
@secret = secret.to_s
|
20
16
|
end
|
data/lib/qiwi-pay/version.rb
CHANGED
@@ -22,16 +22,13 @@ RSpec.describe QiwiPay::Signature do
|
|
22
22
|
expect(subject).to eq 'abc|asd|b|cdf|zzz'
|
23
23
|
end
|
24
24
|
|
25
|
-
it '
|
25
|
+
it 'preserves input params value' do
|
26
|
+
params[:sign] = 'sign1'
|
26
27
|
params[:cheque] = 'cheque1'
|
27
|
-
params['cheque'] = 'cheque2'
|
28
|
-
expect(subject).to eq 'abc|asd|b|cdf|zzz'
|
29
|
-
end
|
30
|
-
|
31
|
-
it 'should ignore `merchant_cheque` parameter' do
|
32
|
-
params[:merchant_cheque] = 'cheque1'
|
33
28
|
params['merchant_cheque'] = 'cheque2'
|
34
|
-
|
29
|
+
params_before = Marshal.load( Marshal.dump(params) )
|
30
|
+
subject
|
31
|
+
expect(params).to eq params_before
|
35
32
|
end
|
36
33
|
end
|
37
34
|
|