ianfleeton-paypal-express 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b3867967578bb74d22b8fc5d931c62a01fa890c
4
- data.tar.gz: 97b4500f7158307eb8fb5183367cd3046bb968cf
3
+ metadata.gz: ef80a541893e55346f5ad9b9f4f816e583506abd
4
+ data.tar.gz: c94857a7a632ab4d6f2386a52d4630b694f9c844
5
5
  SHA512:
6
- metadata.gz: 1959ef947bd20eb3fb27d9a439dc657e51871be138e8f1f293307170fbf63781b11483de776cf4709b7dc39d5ba9adbf13237a3b12d0d801bac6a46ad8e415e1
7
- data.tar.gz: 3f8fa18f46458fcb4f1390c3d8a2fbe91cafebdb3c16dce2908e0726f89f9f43ea96721f9924f7b921574e7a5d563529d18db6b14f986a1acc007236bbb90c75
6
+ metadata.gz: 4a1123c6e08907f95c31780317541e11c744cc04787850c743a213f2557b17f612bca873c3f2970e4c9b8a882f27a9f2c8ddb1cf67d3efaad98016acb8d9aea4
7
+ data.tar.gz: 372e09ac614ddfd5b74e57cdddfd275d4a7d7a44c34ad6ec992a63c5dde1eb107470795b0eb9a237a07743f3e8a1e03887d6ff86dd31c061b3ede7cfc895c6c9
data/README.rdoc CHANGED
@@ -15,17 +15,17 @@ You can use this fork which is actively maintained to ensure it is working prope
15
15
  == Installation
16
16
 
17
17
  Add to your Gemfile
18
- gem 'paypal-express', github: 'ianfleeton/paypal-express'
18
+ gem 'ianfleeton-paypal-express', github: 'ianfleeton/paypal-express', require: 'paypal/express'
19
19
  Or
20
- gem 'ianfleeton-paypal-express'
20
+ gem 'ianfleeton-paypal-express', require: 'paypal/express'
21
21
 
22
22
  == Usage
23
23
 
24
24
  See Wiki on Github
25
- https://github.com/nov/paypal-express/wiki
25
+ https://github.com/ianfleeton/paypal-express/wiki
26
26
 
27
27
  Play with Sample Rails App
28
- https://github.com/nov/paypal-express-sample
28
+ https://github.com/ianfleeton/paypal-express-sample
29
29
  https://paypal-express-sample.heroku.com
30
30
 
31
31
  == Note on Patches/Pull Requests
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.2
1
+ 0.8.3
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
17
  s.add_dependency 'activesupport', '>= 2.3', '< 6'
18
18
  s.add_dependency 'rest-client', '~> 2.0'
19
- s.add_dependency 'attr_required', '~> 0.0', '>= 0.0.5'
19
+ s.add_dependency 'attr_required', '~> 1.0'
20
20
  s.add_development_dependency 'rake', '~> 12.0', '>= 12.0.0'
21
21
  s.add_development_dependency 'simplecov', '~> 0'
22
22
  s.add_development_dependency 'rspec', '~> 3.5', '>= 3.5.0'
@@ -32,7 +32,8 @@ module Paypal
32
32
  :PAYMENTSTATUS => :payment_status,
33
33
  :PAYMENTTYPE => :payment_type,
34
34
  :REASONCODE => :reason_code,
35
- :TRANSACTIONTYPE => :transaction_type
35
+ :TRANSACTIONTYPE => :transaction_type,
36
+ REFUNDSTATUS: :refund_status
36
37
  }
37
38
  attr_accessor *@@attribute_mapping.values
38
39
  attr_accessor :raw, :details
@@ -0,0 +1 @@
1
+ TIMESTAMP=2017%2d03%2d01T16%3a17%3a13Z&CORRELATIONID=ec17e6541628a&ACK=Failure&VERSION=204%2e0&BUILD=30763207&L_ERRORCODE0=10009&L_SHORTMESSAGE0=Transaction%20refused&L_LONGMESSAGE0=This%20transaction%20has%20already%20been%20fully%20refunded&L_SEVERITYCODE0=Error&REFUNDSTATUS=None&PENDINGREASON=None
@@ -88,6 +88,14 @@ describe Paypal::Exception::APIError do
88
88
  end
89
89
  end
90
90
 
91
+ context 'when refund failure params given' do
92
+ let(:params) { { REFUNDSTATUS: 'None' } }
93
+ describe 'error.response.refund_status' do
94
+ subject { error.response.refund_status }
95
+ it { should eq 'None' }
96
+ end
97
+ end
98
+
91
99
  context 'otherwise' do
92
100
  subject { error }
93
101
  let(:params) { 'Failure' }
@@ -97,6 +97,17 @@ describe Paypal::NVP::Request do
97
97
  end
98
98
  end
99
99
 
100
+ context 'when API error response received from RefundTransaction' do
101
+ before { fake_response 'RefundTransaction/failure' }
102
+
103
+ it 'should handle all attributes while raising an API error' do
104
+ expect(Paypal.logger).not_to receive(:warn)
105
+ expect do
106
+ instance.request :Refund, TRANSACTIONID: 'already-refunded'
107
+ end.to raise_error(Paypal::Exception::APIError)
108
+ end
109
+ end
110
+
100
111
  context 'when got HTTP error response' do
101
112
  before do
102
113
  stub_request(:post, Paypal::NVP::Request::ENDPOINT[:production])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ianfleeton-paypal-express
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Fleeton
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-19 00:00:00.000000000 Z
12
+ date: 2017-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -51,20 +51,14 @@ dependencies:
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.0'
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: 0.0.5
54
+ version: '1.0'
58
55
  type: :runtime
59
56
  prerelease: false
60
57
  version_requirements: !ruby/object:Gem::Requirement
61
58
  requirements:
62
59
  - - "~>"
63
60
  - !ruby/object:Gem::Version
64
- version: '0.0'
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: 0.0.5
61
+ version: '1.0'
68
62
  - !ruby/object:Gem::Dependency
69
63
  name: rake
70
64
  requirement: !ruby/object:Gem::Requirement
@@ -211,6 +205,7 @@ files:
211
205
  - spec/fake_response/IPN/valid.txt
212
206
  - spec/fake_response/ManageRecurringPaymentsProfileStatus/failure.txt
213
207
  - spec/fake_response/ManageRecurringPaymentsProfileStatus/success.txt
208
+ - spec/fake_response/RefundTransaction/failure.txt
214
209
  - spec/fake_response/RefundTransaction/full.txt
215
210
  - spec/fake_response/SetExpressCheckout/failure.txt
216
211
  - spec/fake_response/SetExpressCheckout/success.txt
@@ -290,6 +285,7 @@ test_files:
290
285
  - spec/fake_response/IPN/valid.txt
291
286
  - spec/fake_response/ManageRecurringPaymentsProfileStatus/failure.txt
292
287
  - spec/fake_response/ManageRecurringPaymentsProfileStatus/success.txt
288
+ - spec/fake_response/RefundTransaction/failure.txt
293
289
  - spec/fake_response/RefundTransaction/full.txt
294
290
  - spec/fake_response/SetExpressCheckout/failure.txt
295
291
  - spec/fake_response/SetExpressCheckout/success.txt