Module: PayPal::Recurring
- Defined in:
- lib/paypal/recurring.rb,
lib/paypal/recurring/base.rb,
lib/paypal/recurring/utils.rb,
lib/paypal/recurring/request.rb,
lib/paypal/recurring/version.rb,
lib/paypal/recurring/response.rb,
lib/paypal/recurring/notification.rb,
lib/paypal/recurring/response/base.rb,
lib/paypal/recurring/response/refund.rb,
lib/paypal/recurring/response/details.rb,
lib/paypal/recurring/response/payment.rb,
lib/paypal/recurring/response/profile.rb,
lib/paypal/recurring/response/checkout.rb,
lib/paypal/recurring/response/manage_profile.rb
Defined Under Namespace
Modules: Response, Utils, Version Classes: Base, Notification, Request
Constant Summary collapse
- ENDPOINTS =
{ :sandbox => { :api => "https://api-3t.sandbox.paypal.com/nvp", :site => "https://www.sandbox.paypal.com/cgi-bin/webscr" }, :production => { :api => "https://api-3t.paypal.com/nvp", :site => "https://www.paypal.com/cgi-bin/webscr" } }
Class Attribute Summary collapse
-
.email ⇒ Object
The seller e-mail.
-
.password ⇒ Object
Set PayPal’s API password.
-
.sandbox ⇒ Object
Define if requests should be made to PayPal’s sandbox environment.
-
.seller_id ⇒ Object
Set seller id.
-
.signature ⇒ Object
Set PayPal’s API signature.
-
.username ⇒ Object
Set PayPal’s API username.
Class Method Summary collapse
-
.api_endpoint ⇒ Object
Return API endpoint based on current environment.
-
.api_version ⇒ Object
Return PayPal’s API version.
-
.configure {|PayPal::Recurring| ... } ⇒ Object
Configure PayPal::Recurring options.
-
.endpoints ⇒ Object
Return URL endpoints for current environment.
-
.environment ⇒ Object
Return a name for current environment mode (sandbox or production).
-
.new(options = {}) ⇒ Object
Just a shortcut for
PayPal::Recurring::Base.new
. -
.sandbox? ⇒ Boolean
Detect if sandbox mode is enabled.
-
.site_endpoint ⇒ Object
Return site endpoint based on current environment.
Class Attribute Details
.email ⇒ Object
The seller e-mail. Will be used to verify IPN.
55 56 57 |
# File 'lib/paypal/recurring.rb', line 55 def email @email end |
.password ⇒ Object
Set PayPal’s API password.
42 43 44 |
# File 'lib/paypal/recurring.rb', line 42 def password @password end |
.sandbox ⇒ Object
34 35 36 |
# File 'lib/paypal/recurring.rb', line 34 def sandbox @sandbox end |
.seller_id ⇒ Object
Set seller id. Will be used to verify IPN.
51 52 53 |
# File 'lib/paypal/recurring.rb', line 51 def seller_id @seller_id end |
.signature ⇒ Object
Set PayPal’s API signature.
46 47 48 |
# File 'lib/paypal/recurring.rb', line 46 def signature @signature end |
.username ⇒ Object
Set PayPal’s API username.
38 39 40 |
# File 'lib/paypal/recurring.rb', line 38 def username @username end |
Class Method Details
.api_endpoint ⇒ Object
Return API endpoint based on current environment.
94 95 96 |
# File 'lib/paypal/recurring.rb', line 94 def self.api_endpoint endpoints[:api] end |
.api_version ⇒ Object
Return PayPal’s API version.
100 101 102 |
# File 'lib/paypal/recurring.rb', line 100 def self.api_version "72.0" end |
.configure {|PayPal::Recurring| ... } ⇒ Object
70 71 72 |
# File 'lib/paypal/recurring.rb', line 70 def self.configure(&block) yield PayPal::Recurring end |
.endpoints ⇒ Object
Return URL endpoints for current environment.
88 89 90 |
# File 'lib/paypal/recurring.rb', line 88 def self.endpoints ENDPOINTS[environment] end |
.environment ⇒ Object
Return a name for current environment mode (sandbox or production).
82 83 84 |
# File 'lib/paypal/recurring.rb', line 82 def self.environment sandbox? ? :sandbox : :production end |
.new(options = {}) ⇒ Object
Just a shortcut for PayPal::Recurring::Base.new
.
60 61 62 |
# File 'lib/paypal/recurring.rb', line 60 def self.new( = {}) Base.new() end |
.sandbox? ⇒ Boolean
Detect if sandbox mode is enabled.
76 77 78 |
# File 'lib/paypal/recurring.rb', line 76 def self.sandbox? sandbox == true end |
.site_endpoint ⇒ Object
Return site endpoint based on current environment.
106 107 108 |
# File 'lib/paypal/recurring.rb', line 106 def self.site_endpoint endpoints[:site] end |