Sha256: 7dc085c0fce0903108a3899915e67a0acdd45b4c69bd3156f28916d88cf2a511
Contents?: true
Size: 638 Bytes
Versions: 6
Compression:
Stored size: 638 Bytes
Contents
module Shoppe module Paypal module PaymentExtensions # Get the PayPal payment information from the API def paypal_payment return false unless self.method == "PayPal" @paypal_payment ||= PayPal::SDK::REST::Payment.find(self.reference) end # The PayPal transaction URL 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 end end end
Version data entries
6 entries across 6 versions & 1 rubygems