payanyway 2.0.0 → 2.0.1

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
  SHA1:
3
- metadata.gz: 06077962e86daa653defd01ffb1f707aaee9bfde
4
- data.tar.gz: c6501c85c337160858dd80d8aca56d8e7ba0ac33
3
+ metadata.gz: 05673b4e12bd38b85b361e9181396ac890c9f735
4
+ data.tar.gz: 0ddf0a1ee9a5725e94f6559c3f03cf93b4340bd4
5
5
  SHA512:
6
- metadata.gz: e79ec02616965d5c6d2d8e6d24046bb513330650509250abc9f3031d141df4f879e24df8a602b411e9c9944aaca122dc6c5a338fe91c41e3dbee31e3a8c28e34
7
- data.tar.gz: 1a7768deb3da108b295704f83630daccf328d715fd9cd339d0da6f03268afe06939f892b0d2e7f97bff5a1f7e220ac8e0964b2650aa99db8f83f47d0f3c66a69
6
+ metadata.gz: e5dd2cc9f7616f943f2305cc5489038eb8376a14a015d55a028d9a1e26587afbb92159c68246e0e946c1762462e49d3e25adf8061437802a2b276ecf3da542ee
7
+ data.tar.gz: 692be96d4980db8a9e213e4f4127d68680570733665ce42655e1a88e9a51b90b0ca17d0057012660ed5a3dd4d1623fee23ed87194fccccaf35c4bfabf3bb26f8
@@ -4,7 +4,7 @@ module Payanyway
4
4
  module Helpers
5
5
  class SignatureGenerate
6
6
  BASE_KEYS = %w(
7
- moneta_id
7
+ MNT_ID
8
8
  MNT_TRANSACTION_ID
9
9
  MNT_OPERATION_ID
10
10
  MNT_AMOUNT
@@ -38,8 +38,6 @@ module Payanyway
38
38
  def get_value(params, key)
39
39
  if key == 'MNT_AMOUNT' && params[key].present?
40
40
  '%.2f' % params[key]
41
- elsif key == 'moneta_id'
42
- Payanyway::Gateway.config['moneta_id'].to_s
43
41
  else
44
42
  params[key]
45
43
  end
@@ -1,3 +1,3 @@
1
1
  module Payanyway
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
@@ -2,32 +2,32 @@ describe Payanyway::Engine, type: :routing do
2
2
  routes { Payanyway::Engine.routes }
3
3
 
4
4
  context 'payanyway' do
5
- specify { get('/success').should route_to(
5
+ specify { expect(get('/success')).to route_to(
6
6
  controller: 'payanyway',
7
7
  action: 'success'
8
8
  )}
9
9
 
10
- specify { get('/pay').should route_to(
10
+ specify { expect(get('/pay')).to route_to(
11
11
  controller: 'payanyway',
12
12
  action: 'pay'
13
13
  )}
14
14
 
15
- specify { get('/fail').should route_to(
15
+ specify { expect(get('/fail')).to route_to(
16
16
  controller: 'payanyway',
17
17
  action: 'fail'
18
18
  )}
19
19
 
20
- specify { get('/return').should route_to(
20
+ specify { expect(get('/return')).to route_to(
21
21
  controller: 'payanyway',
22
22
  action: 'return'
23
23
  )}
24
24
 
25
- specify { get('/in_progress').should route_to(
25
+ specify { expect(get('/in_progress')).to route_to(
26
26
  controller: 'payanyway',
27
27
  action: 'in_progress'
28
28
  )}
29
29
 
30
- specify { get('/check').should route_to(
30
+ specify { expect(get('/check')).to route_to(
31
31
  controller: 'payanyway',
32
32
  action: 'check'
33
33
  )}
@@ -51,7 +51,7 @@ describe PayanywayController do
51
51
  expect(Rails.logger).not_to receive(:info).with(/PAYANYWAY: XML response for check/)
52
52
  expect_any_instance_of(Payanyway::Controller).to receive(:check_implementation).and_return(amount: 12, state: :paid)
53
53
 
54
- get :check, { 'MNT_TRANSACTION_ID' => 676, 'MNT_SIGNATURE' => '79c1c4f41a0a70bb107c976ebba25811' }
54
+ get :check, { 'MNT_ID' => Payanyway::Gateway.config['moneta_id'].to_s, 'MNT_TRANSACTION_ID' => 676, 'MNT_SIGNATURE' => '79c1c4f41a0a70bb107c976ebba25811' }
55
55
 
56
56
  expect(Nokogiri::XML(response.body).at_css('MNT_RESPONSE')).to be_present
57
57
  end
@@ -62,7 +62,7 @@ describe PayanywayController do
62
62
  expect(Rails.logger).to receive(:info).with(/PAYANYWAY: XML response for check/)
63
63
 
64
64
  expect_any_instance_of(Payanyway::Controller).to receive(:check_implementation).and_return(amount: 12, state: :paid, logger: true)
65
- get :check, { 'MNT_TRANSACTION_ID' => 676, 'MNT_SIGNATURE' => '79c1c4f41a0a70bb107c976ebba25811' }
65
+ get :check, { 'MNT_ID' => Payanyway::Gateway.config['moneta_id'].to_s, 'MNT_TRANSACTION_ID' => 676, 'MNT_SIGNATURE' => '79c1c4f41a0a70bb107c976ebba25811' }
66
66
  end
67
67
  end
68
68
  end
@@ -2,7 +2,7 @@ describe Payanyway::Request::Pay do
2
2
  let(:service) { described_class.new(params) }
3
3
  let(:params) do
4
4
  {
5
- 'MNT_ID' => 1,
5
+ 'MNT_ID' => Payanyway::Gateway.config['moneta_id'].to_s,
6
6
  'MNT_TRANSACTION_ID' => 2,
7
7
  'MNT_OPERATION_ID' => 3,
8
8
  'MNT_AMOUNT' => 10.20,
data/spec/spec_helper.rb CHANGED
@@ -18,4 +18,4 @@ CodeClimate::TestReporter.start if ENV['CODECLIMATE_REPO_TOKEN']
18
18
 
19
19
  RSpec.configure do |config|
20
20
  config.infer_spec_type_from_file_location!
21
- end
21
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payanyway
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ssnikolay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2015-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails