Sha256: f8c5c609289376c62597e3dd3f078bb8f4d4f87b02a2f06136ea0a29e67cb6cc
Contents?: true
Size: 792 Bytes
Versions: 28
Compression:
Stored size: 792 Bytes
Contents
module Paypal module Express class Response < NVP::Response attr_accessor :pay_on_paypal def initialize(response, options = {}) super response @pay_on_paypal = options[:pay_on_paypal] end def redirect_uri endpoint = URI.parse Paypal.endpoint endpoint.query = query(:with_cmd).to_query endpoint.to_s end def popup_uri endpoint = URI.parse Paypal.popup_endpoint endpoint.query = query.to_query endpoint.to_s end private def query(with_cmd = false) _query_ = {:token => self.token} _query_.merge!(:cmd => '_express-checkout') if with_cmd _query_.merge!(:useraction => 'commit') if pay_on_paypal _query_ end end end end
Version data entries
28 entries across 28 versions & 1 rubygems