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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9764c1135cab1afcb4477834f4aa25175bf120a343a5a79996012cc0939a1ce
4
- data.tar.gz: dfe175d31db79f93187e8ec29ea79153e615e27f093aa9b4da56ad9a700af0eb
3
+ metadata.gz: 1991d8bd7f14a97bc596e7177b5e05e1ef00f100eedc26f88814313a171e0f89
4
+ data.tar.gz: 18ac48352a5d69e8cd40dc2f21a9cf21889aa96a12726b79916cd042b8c3f87d
5
5
  SHA512:
6
- metadata.gz: 8d12c73a17f4e67c052c700bd37843b06a0f6c7a8db854a9e00a73786e95f7afc2bb3ff46da9b231d628b1585645e714ddd9cc45e0c4a291ca265773080d23a4
7
- data.tar.gz: e5a5c977e243c5e39ee751e17ddd08acaece3f053742e2edf478c6b82794fb447e73ede4730a77647ee928d4c6705c605b2528a860ed135935b7b2fccce6def6
6
+ metadata.gz: 56ef773973fdac8d7dbed7e5a664199b1da6631e4e4d4f09a03ddd6ce0b73b632a3bef7212514cf16dfd9838603cdffcc7934c925711d98c12240201767549d5
7
+ data.tar.gz: c26a4d95972c54bf34b800173d568ffa64ec530fb25cee61d26599c2e37edd6b96486fe3a4ed8b26537bf30306cdfafce4dcf3c4508179a6d6b7969656cf54e7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qiwi-pay (0.1.4)
4
+ qiwi-pay (0.1.7)
5
5
  rest-client (>= 1.8.0, < 2.1)
6
6
 
7
7
  GEM
@@ -104,5 +104,10 @@ module QiwiPay
104
104
  return @cheque.encode if @cheque.is_a? Cheque
105
105
  @cheque
106
106
  end
107
+
108
+ def merchant_cheque
109
+ return @merchant_cheque.encode if @merchant_cheque.is_a? Cheque
110
+ @merchant_cheque
111
+ end
107
112
  end
108
113
  end
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module QiwiPay
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.7"
5
5
  end
@@ -22,7 +22,7 @@ module QiwiPay::Wpf
22
22
  cf1 cf2 cf3 cf4 cf5
23
23
  product_name merchant_uid modifiers card_token order_expire
24
24
  callback_url success_url decline_url
25
- cheque
25
+ merchant_cheque
26
26
  ].freeze
27
27
  end
28
28
  end
@@ -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 'should ignore `cheque` parameter' do
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
- expect(subject).to eq 'abc|asd|b|cdf|zzz'
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiwi-pay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Klimenko