ruby-paypal 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ruby-paypal/paypal.rb +8 -2
  2. metadata +41 -34
@@ -193,13 +193,14 @@ class Paypal
193
193
  #
194
194
  # Equivalent of SetExpressCheckout.
195
195
  #
196
- def set_express_checkout(return_url, cancel_url, amount)
196
+ def set_express_checkout(return_url, cancel_url, amount, other_params={})
197
197
  params = {
198
198
  'METHOD' => 'SetExpressCheckout',
199
199
  'RETURNURL' => return_url,
200
200
  'CANCELURL' => cancel_url,
201
201
  'AMT' => amount.to_s
202
202
  }
203
+ params.merge! other_params
203
204
  make_nvp_call(params)
204
205
  end
205
206
 
@@ -220,7 +221,7 @@ class Paypal
220
221
  #
221
222
  # Equivalent of DoExpressCheckoutPayment
222
223
  #
223
- def do_express_checkout_payment(token, payment_action,payer_id, amount)
224
+ def do_express_checkout_payment(token, payment_action, payer_id, amount, other_params={})
224
225
  params = {
225
226
  'METHOD' => 'DoExpressCheckoutPayment',
226
227
  'TOKEN' => token,
@@ -228,6 +229,10 @@ class Paypal
228
229
  'PAYERID' => payer_id,
229
230
  'AMT' => amount
230
231
  }
232
+
233
+ params.merge! other_params
234
+ pp "DO EXPRESS CHECKOUT PAYMENT"
235
+ pp params
231
236
  make_nvp_call(params)
232
237
  end
233
238
 
@@ -289,6 +294,7 @@ class Paypal
289
294
  # Makes the call to the PayPal NVP API. This is the workhorse method for the other method calls.
290
295
  #
291
296
  def make_nvp_call(params)
297
+ pp params
292
298
  @api_parameters.merge! params
293
299
  parameters = URI.escape(@api_parameters.to_a.collect {|pair| pair.join('=')}.join('&'))
294
300
  response = Net::HTTPS.post_form(URI.parse("https://#{@paypal_url}"), @api_parameters)
metadata CHANGED
@@ -1,33 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: ruby-paypal
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.0.3
7
- date: 2008-01-30 00:00:00 +08:00
8
- summary: A lightweight Ruby wrapper for PayPal NVP API
9
- require_paths:
10
- - lib
11
- email: sausheong.chang@gmail.com
12
- homepage: http://blog.saush.com
13
- rubyforge_project:
14
- description:
15
- autorequire: ruby-paypal
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ version: 0.0.4
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - Chang Sau Sheong
8
+ autorequire: ruby-paypal
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-07-19 00:00:00 +08:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: sausheong.chang@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README
31
24
  files:
32
25
  - lib/ruby-paypal
33
26
  - lib/ruby-paypal/credit_card_checks.rb
@@ -35,17 +28,31 @@ files:
35
28
  - lib/ruby-paypal.rb
36
29
  - test/ts_ruby-paypal.rb
37
30
  - README
38
- test_files:
39
- - test/ts_ruby-paypal.rb
31
+ has_rdoc: true
32
+ homepage: http://blog.saush.com
33
+ post_install_message:
40
34
  rdoc_options: []
41
35
 
42
- extra_rdoc_files:
43
- - README
44
- executables: []
45
-
46
- extensions: []
47
-
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: "0"
43
+ version:
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: "0"
49
+ version:
48
50
  requirements: []
49
51
 
50
- dependencies: []
51
-
52
+ rubyforge_project:
53
+ rubygems_version: 1.0.1
54
+ signing_key:
55
+ specification_version: 2
56
+ summary: A lightweight Ruby wrapper for PayPal NVP API
57
+ test_files:
58
+ - test/ts_ruby-paypal.rb