Module: Shoppe::Paypal::PaymentExtensions
- Defined in:
- lib/shoppe/paypal/payment_extensions.rb
Instance Method Summary collapse
-
#paypal_payment ⇒ Object
Get the PayPal payment information from the API.
-
#transaction_url ⇒ Object
The PayPal transaction URL.
Instance Method Details
#paypal_payment ⇒ Object
Get the PayPal payment information from the API
6 7 8 9 10 |
# File 'lib/shoppe/paypal/payment_extensions.rb', line 6 def paypal_payment return false unless self.method == "PayPal" @paypal_payment ||= PayPal::SDK::REST::Payment.find(self.reference) end |
#transaction_url ⇒ Object
The PayPal transaction URL
13 14 15 16 17 18 19 |
# File 'lib/shoppe/paypal/payment_extensions.rb', line 13 def transaction_url if Rails.env.production? "https://history.paypal.com/uk/cgi-bin/webscr?cmd=_history-details-from-hub&id=#{reference}" else "https://www.sandbox.paypal.com/uk/cgi-bin/webscr?cmd=_history-details-from-hub&id=#{reference}" end end |