paypal-express 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/paypal.rb +2 -1
- data/lib/paypal/express/request.rb +2 -2
- data/lib/paypal/nvp/request.rb +1 -1
- data/spec/paypal/express/request_spec.rb +14 -0
- data/spec/paypal/nvp/request_spec.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78b9ee949ee0b587532731dfa0c52c11d514549d
|
4
|
+
data.tar.gz: c6ceeb70ec8eecbd506625624fbc0c4a0d571153
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01b135b01e61b710f75d6224a6b0136c6dac30243eb571e9da5de87a5a86118c57d5b912873d39df67ac478978b0c882404bb9744a1684f585c17ad971c9ff71
|
7
|
+
data.tar.gz: 908e9b074e6492f79ec11dbe2f9ebf0ed3f1b4e4caeccbee3fdc4f83bcb599a4abd894ba981fd22ab35da0af29df61c97c55d8b10483b36e4537cf83edef8b6d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.8.0
|
data/lib/paypal.rb
CHANGED
@@ -5,8 +5,9 @@ require 'attr_optional'
|
|
5
5
|
require 'rest_client'
|
6
6
|
|
7
7
|
module Paypal
|
8
|
+
cattr_accessor :api_version
|
9
|
+
self.api_version = '88.0'
|
8
10
|
|
9
|
-
API_VERSION = '88.0'
|
10
11
|
ENDPOINT = {
|
11
12
|
:production => 'https://www.paypal.com/cgi-bin/webscr',
|
12
13
|
:sandbox => 'https://www.sandbox.paypal.com/cgi-bin/webscr'
|
@@ -57,10 +57,10 @@ module Paypal
|
|
57
57
|
Response.new response
|
58
58
|
end
|
59
59
|
|
60
|
-
def capture!(authorization_id, amount, currency_code)
|
60
|
+
def capture!(authorization_id, amount, currency_code, complete_type = 'Complete')
|
61
61
|
params = {
|
62
62
|
:AUTHORIZATIONID => authorization_id,
|
63
|
-
:COMPLETETYPE =>
|
63
|
+
:COMPLETETYPE => complete_type,
|
64
64
|
:AMT => amount,
|
65
65
|
:CURRENCYCODE => currency_code
|
66
66
|
}
|
data/lib/paypal/nvp/request.rb
CHANGED
@@ -285,6 +285,20 @@ describe Paypal::Express::Request do
|
|
285
285
|
:CURRENCYCODE => :BRL
|
286
286
|
}
|
287
287
|
end
|
288
|
+
|
289
|
+
it 'should call DoExpressCheckoutPayment with NotComplete capture parameter' do
|
290
|
+
expect do
|
291
|
+
instance.capture! 'authorization_id', 181.98, :BRL, 'NotComplete'
|
292
|
+
end.to request_to nvp_endpoint, :post
|
293
|
+
|
294
|
+
instance._method_.should == :DoCapture
|
295
|
+
instance._sent_params_.should == {
|
296
|
+
:AUTHORIZATIONID => 'authorization_id',
|
297
|
+
:COMPLETETYPE => 'NotComplete',
|
298
|
+
:AMT => 181.98,
|
299
|
+
:CURRENCYCODE => :BRL
|
300
|
+
}
|
301
|
+
end
|
288
302
|
end
|
289
303
|
|
290
304
|
describe "#void!" do
|
@@ -36,7 +36,6 @@ describe Paypal::NVP::Request do
|
|
36
36
|
|
37
37
|
it 'should setup endpoint and version' do
|
38
38
|
client = Paypal::NVP::Request.new attributes
|
39
|
-
client.version.should == Paypal::API_VERSION
|
40
39
|
client.class.endpoint.should == Paypal::NVP::Request::ENDPOINT[:production]
|
41
40
|
end
|
42
41
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paypal-express
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nov matake
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|