paypal_nvp 0.2.9 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17a96b1afc9add51e85abc215c9e76debf45297b
4
- data.tar.gz: 7efb4f20e95bdc3e10cd6ab6f7669d840265a663
3
+ metadata.gz: f28302e8467d1a621a1438b4caeb2947dd3e3de8
4
+ data.tar.gz: 9d0447cd0866c61a68593c718b6f9d26f59211b8
5
5
  SHA512:
6
- metadata.gz: adf896734735e12ed48a8cd16d4aa19dbef2869f9cc9890fefc1e1608370ba132072c0f7388fd3a25491d67f3f54684920af3671e53f8571cf8ee2c4047f5361
7
- data.tar.gz: 4b1294de0098f0371e9a79879f0ae90271feeca3aaf05180fd1ee99af9cd40e40b6fab39e911c8a9fe19c624f946ea4598cdfe8084741ca8b797993f1364b8f5
6
+ metadata.gz: 784eb4cdf7f27041b509bb6dad6b755cef838d1836a7cc20ae34bb2f7a117a97f6abd88f9c524a860ebaaaef681a2e7ca16f255ccab1fee5b031c4206c353c75
7
+ data.tar.gz: 71965387b10f72d59e9160f9ff24b1e7142dc6c4092b233caac9099ff4efcf3174612f89fa01aa3605bc23af68c323375b1922dcd336ac5d3754978bfb47fc2f
@@ -4,9 +4,13 @@ Paypal NVP allow to connect your Ruby on Rails application to the Paypal NVP API
4
4
 
5
5
  == Installation
6
6
 
7
- The recommended way is that you get the gem:
7
+ You can install the gem in one of two ways. The first is using the gem install command from the command line:
8
8
 
9
- $ sudo gem install paypal_nvp
9
+ $ gem install paypal_nvp
10
+
11
+ And the second is using Bundler. Simply add `gem 'paypal_nvp'` to your gemfile, then install with the following command:
12
+
13
+ $ bundle install
10
14
 
11
15
  PaypalNVP need an optional paypal.yml file in your config directory (Rails App).
12
16
  Or you can specify parameter within the constructor
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('paypal_nvp', '0.2.9') do |p|
5
+ Echoe.new('paypal_nvp', '0.3.0') do |p|
6
6
  p.description = "Paypal NVP API Class."
7
7
  p.url = "http://github.com/solisoft/paypal_nvp"
8
8
  p.author = "Olivier BONNAURE - Direct Interactive LLC"
@@ -46,10 +46,13 @@ class PaypalNVP
46
46
  end
47
47
 
48
48
  def call_paypal(data)
49
- data.merge!({ "USER" => @user, "PWD" => @pass, "SIGNATURE" => @cert })
50
- data.merge!(@extras)
49
+ # items in the data hash should take precedence over preconfigured values,
50
+ # to allow for maximum flexibility:
51
+ params = @extras.dup
52
+ params.merge!({ "USER" => @user, "PWD" => @pass, "SIGNATURE" => @cert })
53
+ params.merge!(data)
51
54
  qs = []
52
- data.each do |key, value|
55
+ params.each do |key, value|
53
56
  qs << "#{key.to_s.upcase}=#{URI.escape(value.to_s, /\+/)}"
54
57
  end
55
58
  qs = "#{qs * "&"}"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{paypal_nvp}
5
- s.version = "0.2.9"
5
+ s.version = "0.3.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Olivier BONNAURE - solisoft"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypal_nvp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier BONNAURE - solisoft