paypal_adaptive 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +12 -5
- data/VERSION +1 -1
- data/lib/config.rb +5 -4
- data/paypal_adaptive.gemspec +2 -2
- metadata +2 -2
data/README.markdown
CHANGED
@@ -4,7 +4,7 @@ This gem is a lightweight wrapper for the paypal adaptive payments API.
|
|
4
4
|
This is very much a work in progress! Use at your own risk or submit bug fixes :)
|
5
5
|
|
6
6
|
Before you need start, download pp_adaptivepayments.pdf and IPNGuide.pdf from the Paypal's dev site http://x.com
|
7
|
-
It'll be invaluable
|
7
|
+
It'll be invaluable for parameters and error messages.
|
8
8
|
|
9
9
|
## HOWTO
|
10
10
|
Create paypal_adaptive.yml to your config folder:
|
@@ -43,13 +43,13 @@ Make the payment request:
|
|
43
43
|
"ipnNotificationUrl"=>"http://testserver.com/payments/ipn_notification"
|
44
44
|
}
|
45
45
|
|
46
|
-
|
46
|
+
pay_response = pay_request.pay(data)
|
47
47
|
|
48
|
-
if
|
48
|
+
if pay_response.success?
|
49
49
|
redirect_to pp_response.approve_paypal_payment_url
|
50
50
|
else
|
51
|
-
puts
|
52
|
-
redirect_to
|
51
|
+
puts pay_response.errors.first['message']
|
52
|
+
redirect_to failed_payment_url
|
53
53
|
end
|
54
54
|
|
55
55
|
---
|
@@ -63,6 +63,13 @@ The actual payment details will be sent to your server via "ipnNotificationUrl"
|
|
63
63
|
You have to create a listener to receive POST messages from paypal. I added a Rails metal template in the templates folder which handles the callbcak.
|
64
64
|
|
65
65
|
|
66
|
+
## Changelog
|
67
|
+
0.0.2
|
68
|
+
Fixed initialized constant warning.
|
69
|
+
|
70
|
+
0.0.1
|
71
|
+
First release.
|
72
|
+
|
66
73
|
## Copyright
|
67
74
|
|
68
75
|
Copyright (c) 2009 Tommy Chheng. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/config.rb
CHANGED
@@ -4,13 +4,14 @@ module PaypalAdaptive
|
|
4
4
|
:production => "https://www.paypal.com",
|
5
5
|
:sandbox => "https://www.sandbox.paypal.com",
|
6
6
|
:beta_sandbox => "https://www.beta-sandbox.paypal.com"
|
7
|
-
}
|
8
|
-
|
7
|
+
} unless defined? PAYPAL_BASE_URL_MAPPING
|
8
|
+
|
9
|
+
API_BASE_URL_MAPPING = {
|
9
10
|
:production => "https://svcs.paypal.com",
|
10
11
|
:sandbox => "https://svcs.sandbox.paypal.com",
|
11
12
|
:beta_sandbox => "https://svcs.beta-sandbox.paypal.com"
|
12
|
-
}
|
13
|
-
|
13
|
+
} unless defined? API_BASE_URL_MAPPING
|
14
|
+
|
14
15
|
attr_accessor :config_filepath, :paypal_base_url, :api_base_url, :headers
|
15
16
|
|
16
17
|
def initialize(env=nil)
|
data/paypal_adaptive.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{paypal_adaptive}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Tommy Chheng"]
|
12
|
-
s.date = %q{2009-12-
|
12
|
+
s.date = %q{2009-12-28}
|
13
13
|
s.description = %q{Lightweight wrapper for Paypal's Adaptive Payments API.}
|
14
14
|
s.email = %q{tommy.chheng@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paypal_adaptive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tommy Chheng
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-28 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|