paypal-express 0.0.8 → 0.0.9
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/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
@@ -28,7 +28,7 @@ module Paypal
|
|
28
28
|
v.blank?
|
29
29
|
end
|
30
30
|
if self.items.present?
|
31
|
-
params[:"PAYMENTREQUEST_#{index}_ITEMAMT"] = items.sum(&:amount)
|
31
|
+
params[:"PAYMENTREQUEST_#{index}_ITEMAMT"] = Util.formatted_amount(items.sum(&:amount).to_i)
|
32
32
|
self.items.each_with_index do |item, item_index|
|
33
33
|
params.merge! item.to_params(index, item_index)
|
34
34
|
end
|
@@ -81,6 +81,21 @@ describe Paypal::Express::Request do
|
|
81
81
|
response.should be_instance_of(Paypal::Express::Response)
|
82
82
|
end
|
83
83
|
|
84
|
+
it 'should support no_shipping option' do
|
85
|
+
lambda do
|
86
|
+
instance.setup instant_payment_request, :no_shipping => true
|
87
|
+
end.should request_to 'https://api-3t.paypal.com/nvp', :post
|
88
|
+
instance._method_.should == :SetExpressCheckout
|
89
|
+
instance._sent_params_.should == {
|
90
|
+
:PAYMENTREQUEST_0_DESC => 'Instant Payment Request',
|
91
|
+
:RETURNURL => 'http://example.com/success',
|
92
|
+
:CANCELURL => 'http://example.com/cancel',
|
93
|
+
:PAYMENTREQUEST_0_AMT => '1000.00',
|
94
|
+
:REQCONFIRMSHIPPING => 0,
|
95
|
+
:NOSHIPPING => 1
|
96
|
+
}
|
97
|
+
end
|
98
|
+
|
84
99
|
context 'when instance payment request given' do
|
85
100
|
it 'should call SetExpressCheckout' do
|
86
101
|
lambda do
|
@@ -45,9 +45,11 @@ describe Paypal::Payment::Request do
|
|
45
45
|
:PAYMENTREQUEST_0_CURRENCYCODE => :JPY,
|
46
46
|
:PAYMENTREQUEST_0_DESC => "Instant Payment Request",
|
47
47
|
:PAYMENTREQUEST_0_NOTIFYURL => "http://merchant.example.com/notify",
|
48
|
+
:PAYMENTREQUEST_0_ITEMAMT => "10.00",
|
48
49
|
:L_PAYMENTREQUEST_0_NAME0 => "Item1",
|
49
50
|
:L_PAYMENTREQUEST_0_DESC0 => "Awesome Item!",
|
50
|
-
:L_PAYMENTREQUEST_0_AMT0 => "10.00"
|
51
|
+
:L_PAYMENTREQUEST_0_AMT0 => "10.00",
|
52
|
+
:L_PAYMENTREQUEST_0_QTY0 => 1
|
51
53
|
}
|
52
54
|
end
|
53
55
|
|
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: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- nov matake
|