Module: Paypal::Config
- Defined in:
- lib/paypal/config.rb
Class Attribute Summary collapse
-
.business_cert ⇒ Object
Returns the value of attribute business_cert.
-
.business_cert_id ⇒ Object
Returns the value of attribute business_cert_id.
-
.business_key ⇒ Object
Returns the value of attribute business_key.
-
.ipn_urls ⇒ Object
Returns the value of attribute ipn_urls.
-
.mode ⇒ Object
Returns the value of attribute mode.
-
.paypal_production_cert ⇒ Object
Returns the value of attribute paypal_production_cert.
-
.paypal_sandbox_cert ⇒ Object
Returns the value of attribute paypal_sandbox_cert.
Class Method Summary collapse
Class Attribute Details
.business_cert ⇒ Object
Returns the value of attribute business_cert.
5 6 7 |
# File 'lib/paypal/config.rb', line 5 def business_cert @business_cert end |
.business_cert_id ⇒ Object
Returns the value of attribute business_cert_id.
5 6 7 |
# File 'lib/paypal/config.rb', line 5 def business_cert_id @business_cert_id end |
.business_key ⇒ Object
Returns the value of attribute business_key.
5 6 7 |
# File 'lib/paypal/config.rb', line 5 def business_key @business_key end |
.ipn_urls ⇒ Object
Returns the value of attribute ipn_urls.
5 6 7 |
# File 'lib/paypal/config.rb', line 5 def ipn_urls @ipn_urls end |
.mode ⇒ Object
Returns the value of attribute mode.
5 6 7 |
# File 'lib/paypal/config.rb', line 5 def mode @mode end |
.paypal_production_cert ⇒ Object
Returns the value of attribute paypal_production_cert.
5 6 7 |
# File 'lib/paypal/config.rb', line 5 def paypal_production_cert @paypal_production_cert end |
.paypal_sandbox_cert ⇒ Object
Returns the value of attribute paypal_sandbox_cert.
5 6 7 |
# File 'lib/paypal/config.rb', line 5 def paypal_sandbox_cert @paypal_sandbox_cert end |
Class Method Details
.ipn_url ⇒ Object
22 23 24 |
# File 'lib/paypal/config.rb', line 22 def ipn_url ipn_urls[mode] end |
.ipn_validation_path ⇒ Object
26 27 28 |
# File 'lib/paypal/config.rb', line 26 def ipn_validation_path URI.parse(ipn_url).path + "?cmd=_notify-validate" end |
.ipn_validation_url ⇒ Object
30 31 32 |
# File 'lib/paypal/config.rb', line 30 def ipn_validation_url "#{ipn_url}?cmd=_notify-validate" end |
.paypal_cert ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/paypal/config.rb', line 38 def paypal_cert case mode when :sandbox paypal_sandbox_cert when :production raise StandardError.new("You should set Paypal::Config.paypal_production_cert with your paypal production certificate") unless paypal_production_cert paypal_production_cert end end |