payanyway 1.2.0 → 1.2.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: a3820acaab28d06906f0eb283beda473a1d2f084
4
- data.tar.gz: 0e8f58b5347aea043c3ee8a17fc346afbb078d43
3
+ metadata.gz: 10bf68a07ba7b3563b65cd8502d9a63d2be9f072
4
+ data.tar.gz: c5bcbcbb42073f55b15b168fe93a760cde2edeab
5
5
  SHA512:
6
- metadata.gz: dbb2e8812b3d2d95fb3cdc87d23ad119600c763fffc19891980a9e5c681aeabfffa8ed63921b1ca9cae8d00aa8a7b301276951a671819b116eb539de353cb542
7
- data.tar.gz: 8b4c4f979d6adf934788cb5fbf542b9288615cffd32c720f5682022b4f6ef66d49c94bf51802865acc23973460c646b1648a78b931c2b062041171faa9dc3caf
6
+ metadata.gz: a61ae15d407e121038088a4b342fa65f18c146250fa86cab3a10c61b23fe71e9ee4886a905d050b59753e7e45ba3667c4615bf41bd7c007666ba1ca7a4e112fa
7
+ data.tar.gz: 8f4b768defa188b4c7eb18e11b2d4c751f4af601d6198ef7abce7eb9fb9d4649adac4ebea2279ee61e4cee12d1280b4030058a03cd1c351ffbf2c19fe56c68f5
@@ -41,9 +41,15 @@ module Payanyway
41
41
 
42
42
  def check
43
43
  service = Payanyway::Response::Check.new(params)
44
- raise service.error_message unless service.success?
45
-
46
- render xml: service.result(check_implementation(service.pretty_params)).to_xml
44
+ if service.pretty_params.present?
45
+ raise service.error_message unless service.success?
46
+
47
+ render xml: service.result(check_implementation(service.pretty_params)).to_xml
48
+ else
49
+ # Не выдавать ошибку, если параметры пустые
50
+ # Необходимо для проверки со стороны moneta.ru
51
+ render nothing: true
52
+ end
47
53
  end
48
54
 
49
55
  private
@@ -1,3 +1,3 @@
1
1
  module Payanyway
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
@@ -34,9 +34,15 @@ describe PayanywayController do
34
34
  end
35
35
 
36
36
  describe 'GET #check' do
37
+ context 'when empty params' do
38
+ it 'should raise error' do
39
+ expect{ get :check }.not_to raise_error
40
+ end
41
+ end
42
+
37
43
  context 'when invalid signature' do
38
44
  it 'should raise error' do
39
- expect{ get :check }.to raise_error
45
+ expect{ get(:check, { 'MNT_TRANSACTION_ID' => 676 }) }.to raise_error
40
46
  end
41
47
  end
42
48
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payanyway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ssnikolay