active_paypal_adaptive_payment 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.3
2
+
3
+ - `autoload` the helper libs.
4
+
1
5
  ## 0.2.2
2
6
 
3
7
  - Array fix https://github.com/lsegal/yard/issues/370
data/README.md CHANGED
@@ -26,6 +26,16 @@ Add the following line to your app Gemfile:
26
26
 
27
27
  See [iAuction: An Adaptive Payments Tutorial Featuring Parallel Payments](https://www.x.com/docs/DOC-2505) tutorial for more info.
28
28
 
29
+ ### Init
30
+
31
+ @gateway =
32
+ ActiveMerchant::Billing::PaypalAdaptivePayment.new(
33
+ :login => "acutio_1313133342_biz_api1.gmail.com",
34
+ :password => "1255043567",
35
+ :signature => "Abg0gYcQlsdkls2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf",
36
+ :appid => "APP-80W284485P519543T"
37
+ )
38
+
29
39
  ### Pre-approved paymen
30
40
 
31
41
  gateway.preapprove_payment (
@@ -63,6 +73,8 @@ See [iAuction: An Adaptive Payments Tutorial Featuring Parallel Payments](https:
63
73
 
64
74
  Set the `:primary` flag to `false` for each recipient for a split payment.
65
75
 
76
+ Maybe also check the tests for a sample implementation.
77
+
66
78
  ## Testing
67
79
 
68
80
  First modify the values in `test/fixtures.yml` to fit your app credentials.
@@ -1,17 +1,18 @@
1
1
  # -*- coding: utf-8 -*-
2
- dir = File.dirname(__FILE__)
3
- %w{
4
- '/paypal_adaptive_payments/exceptions.rb'
5
- '/paypal_adaptive_payments/adaptive_payment_response.rb'
6
- '/paypal_adaptive_payments/ext.rb'
7
- }.each { |f| require File.join(dir, f) }
8
-
9
2
  require 'money'
10
3
 
11
4
  module ActiveMerchant #:nodoc:
12
5
  module Billing #:nodoc:
6
+
7
+ autoload :AdaptivePaymentResponse,
8
+ File.dirname(__FILE__) + '/paypal_adaptive_payments/adaptive_payment_response'
9
+
13
10
  class PaypalAdaptivePayment < Gateway # :nodoc:
14
11
 
12
+ d = File.dirname(__FILE__) + '/paypal_adaptive_payments/'
13
+ autoload :PaypalAdaptivePaymentsApiError, d + 'exception'
14
+ autoload :HTTPHeader, d + 'ext'
15
+
15
16
  TEST_URL = 'https://svcs.sandbox.paypal.com/AdaptivePayments/'
16
17
  LIVE_URL = 'https://svcs.paypal.com/AdaptivePayments/'
17
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_paypal_adaptive_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-13 00:00:00.000000000Z
12
+ date: 2011-08-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemerchant
16
- requirement: &22834000 !ruby/object:Gem::Requirement
16
+ requirement: &14390140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.5.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *22834000
24
+ version_requirements: *14390140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: multi_json
27
- requirement: &22833520 !ruby/object:Gem::Requirement
27
+ requirement: &14389660 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *22833520
35
+ version_requirements: *14389660
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rash
38
- requirement: &22789140 !ruby/object:Gem::Requirement
38
+ requirement: &14389180 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.3.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *22789140
46
+ version_requirements: *14389180
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: money
49
- requirement: &22788620 !ruby/object:Gem::Requirement
49
+ requirement: &14388700 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 3.6.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *22788620
57
+ version_requirements: *14388700
58
58
  description: ! ' This library is meant to interface with PayPal''s Adaptive Payment
59
59
  Gateway.
60
60
 
@@ -98,3 +98,4 @@ signing_key:
98
98
  specification_version: 3
99
99
  summary: ActiveMercant PayPal Adaptive Payment Library
100
100
  test_files: []
101
+ has_rdoc: