Module: Paypal
- Defined in:
- lib/paypal.rb,
lib/paypal/ipn.rb,
lib/paypal/base.rb,
lib/paypal/util.rb,
lib/paypal/exception.rb,
lib/paypal/nvp/request.rb,
lib/paypal/nvp/response.rb,
lib/paypal/express/request.rb,
lib/paypal/payment/request.rb,
lib/paypal/express/response.rb,
lib/paypal/payment/response.rb,
lib/paypal/payment/recurring.rb,
lib/paypal/exception/api_error.rb,
lib/paypal/exception/http_error.rb,
lib/paypal/payment/request/item.rb,
lib/paypal/payment/common/amount.rb,
lib/paypal/payment/response/info.rb,
lib/paypal/payment/response/item.rb,
lib/paypal/payment/response/payer.rb,
lib/paypal/payment/response/refund.rb,
lib/paypal/payment/response/address.rb,
lib/paypal/payment/recurring/billing.rb,
lib/paypal/payment/recurring/summary.rb,
lib/paypal/payment/response/reference.rb,
lib/paypal/payment/recurring/activation.rb
Defined Under Namespace
Modules: Express, IPN, NVP, Payment, Util
Classes: Base, Exception
Constant Summary
collapse
- ENDPOINT =
{
:production => 'https://www.paypal.com/cgi-bin/webscr',
:sandbox => 'https://www.sandbox.paypal.com/cgi-bin/webscr'
}
{
:production => 'https://www.paypal.com/incontext',
:sandbox => 'https://www.sandbox.paypal.com/incontext'
}
- @@logger =
Logger.new(STDERR)
Class Method Summary
collapse
Class Method Details
.endpoint ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/paypal.rb', line 21
def self.endpoint
if sandbox?
Paypal::ENDPOINT[:sandbox]
else
Paypal::ENDPOINT[:production]
end
end
|
.log(message, mode = :info) ⇒ Object
36
37
38
|
# File 'lib/paypal.rb', line 36
def self.log(message, mode = :info)
self.logger.send mode, message
end
|
.logger ⇒ Object
39
40
41
|
# File 'lib/paypal.rb', line 39
def self.logger
@@logger
end
|
.logger=(logger) ⇒ Object
42
43
44
|
# File 'lib/paypal.rb', line 42
def self.logger=(logger)
@@logger = logger
end
|
.sandbox! ⇒ Object
51
52
53
|
# File 'lib/paypal.rb', line 51
def self.sandbox!
self.sandbox = true
end
|
.sandbox=(boolean) ⇒ Object
54
55
56
|
# File 'lib/paypal.rb', line 54
def self.sandbox=(boolean)
@@sandbox = boolean
end
|
.sandbox? ⇒ Boolean
48
49
50
|
# File 'lib/paypal.rb', line 48
def self.sandbox?
@@sandbox
end
|