paypal-express 0.2.2 → 0.2.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.
- data/README.rdoc +2 -1
- data/VERSION +1 -1
- data/lib/paypal/payment/request.rb +1 -1
- data/paypal-express.gemspec +2 -2
- data/spec/paypal/payment/request_spec.rb +16 -8
- metadata +6 -6
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
@@ -28,7 +28,7 @@ module Paypal
|
|
28
28
|
v.blank?
|
29
29
|
end
|
30
30
|
if self.items.present?
|
31
|
-
params[:"PAYMENTREQUEST_#{index}_ITEMAMT"] = Util.formatted_amount(items.sum(&:amount)
|
31
|
+
params[:"PAYMENTREQUEST_#{index}_ITEMAMT"] = Util.formatted_amount(items.sum(&:amount))
|
32
32
|
self.items.each_with_index do |item, item_index|
|
33
33
|
params.merge! item.to_params(index, item_index)
|
34
34
|
end
|
data/paypal-express.gemspec
CHANGED
@@ -3,8 +3,8 @@ Gem::Specification.new do |s|
|
|
3
3
|
s.version = File.read(File.join(File.dirname(__FILE__), "VERSION"))
|
4
4
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version=
|
5
5
|
s.authors = ["nov matake"]
|
6
|
-
s.description = %q{
|
7
|
-
s.summary = %q{PayPal Express Checkout API Client
|
6
|
+
s.description = %q{PayPal Express Checkout API Client for Instance, Recurring and Digital Goods Payment.}
|
7
|
+
s.summary = %q{PayPal Express Checkout API Client for Instance, Recurring and Digital Goods Payment.}
|
8
8
|
s.email = "nov@matake.jp"
|
9
9
|
s.extra_rdoc_files = ["LICENSE", "README.rdoc"]
|
10
10
|
s.rdoc_options = ["--charset=UTF-8"]
|
@@ -3,14 +3,18 @@ require 'spec_helper.rb'
|
|
3
3
|
describe Paypal::Payment::Request do
|
4
4
|
let :instant_request do
|
5
5
|
Paypal::Payment::Request.new(
|
6
|
-
:amount =>
|
6
|
+
:amount => 20.3,
|
7
7
|
:currency_code => :JPY,
|
8
8
|
:description => 'Instant Payment Request',
|
9
9
|
:notify_url => 'http://merchant.example.com/notify',
|
10
10
|
:items => [{
|
11
|
+
:name => 'Item0',
|
12
|
+
:description => 'Awesome Item!',
|
13
|
+
:amount => 10.25
|
14
|
+
}, {
|
11
15
|
:name => 'Item1',
|
12
16
|
:description => 'Awesome Item!',
|
13
|
-
:amount => 10
|
17
|
+
:amount => 10.05
|
14
18
|
}]
|
15
19
|
)
|
16
20
|
end
|
@@ -25,7 +29,7 @@ describe Paypal::Payment::Request do
|
|
25
29
|
|
26
30
|
describe '.new' do
|
27
31
|
it 'should handle Instant Payment parameters' do
|
28
|
-
instant_request.amount.should ==
|
32
|
+
instant_request.amount.should == 20.3
|
29
33
|
instant_request.currency_code.should == :JPY
|
30
34
|
instant_request.description.should == 'Instant Payment Request'
|
31
35
|
instant_request.notify_url.should == 'http://merchant.example.com/notify'
|
@@ -41,15 +45,19 @@ describe Paypal::Payment::Request do
|
|
41
45
|
describe '#to_params' do
|
42
46
|
it 'should handle Instant Payment parameters' do
|
43
47
|
instant_request.to_params.should == {
|
44
|
-
:PAYMENTREQUEST_0_AMT => "
|
48
|
+
:PAYMENTREQUEST_0_AMT => "20.30",
|
45
49
|
:PAYMENTREQUEST_0_CURRENCYCODE => :JPY,
|
46
50
|
:PAYMENTREQUEST_0_DESC => "Instant Payment Request",
|
47
51
|
:PAYMENTREQUEST_0_NOTIFYURL => "http://merchant.example.com/notify",
|
48
|
-
:PAYMENTREQUEST_0_ITEMAMT => "
|
49
|
-
:L_PAYMENTREQUEST_0_NAME0 => "
|
52
|
+
:PAYMENTREQUEST_0_ITEMAMT => "20.30",
|
53
|
+
:L_PAYMENTREQUEST_0_NAME0 => "Item0",
|
50
54
|
:L_PAYMENTREQUEST_0_DESC0 => "Awesome Item!",
|
51
|
-
:L_PAYMENTREQUEST_0_AMT0 => "10.
|
52
|
-
:L_PAYMENTREQUEST_0_QTY0 => 1
|
55
|
+
:L_PAYMENTREQUEST_0_AMT0 => "10.25",
|
56
|
+
:L_PAYMENTREQUEST_0_QTY0 => 1,
|
57
|
+
:L_PAYMENTREQUEST_0_NAME1 => "Item1",
|
58
|
+
:L_PAYMENTREQUEST_0_DESC1 => "Awesome Item!",
|
59
|
+
:L_PAYMENTREQUEST_0_AMT1 => "10.05",
|
60
|
+
:L_PAYMENTREQUEST_0_QTY1 => 1
|
53
61
|
}
|
54
62
|
end
|
55
63
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paypal-express
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- nov matake
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-30 00:00:00 +09:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
version: 1.3.0
|
138
138
|
type: :development
|
139
139
|
version_requirements: *id008
|
140
|
-
description:
|
140
|
+
description: PayPal Express Checkout API Client for Instance, Recurring and Digital Goods Payment.
|
141
141
|
email: nov@matake.jp
|
142
142
|
executables: []
|
143
143
|
|
@@ -247,7 +247,7 @@ rubyforge_project:
|
|
247
247
|
rubygems_version: 1.5.3
|
248
248
|
signing_key:
|
249
249
|
specification_version: 3
|
250
|
-
summary: PayPal Express Checkout API Client
|
250
|
+
summary: PayPal Express Checkout API Client for Instance, Recurring and Digital Goods Payment.
|
251
251
|
test_files:
|
252
252
|
- spec/fake_response/CreateRecurringPaymentsProfile/failure.txt
|
253
253
|
- spec/fake_response/CreateRecurringPaymentsProfile/success.txt
|