Class: Paypal::Express::Response

Inherits:
NVP::Response show all
Defined in:
lib/paypal/express/response.rb

Instance Attribute Summary collapse

Attributes inherited from NVP::Response

#amount, #bill_to, #billing_agreement, #description, #insurance_option_selected, #items, #payer, #payment_info, #payment_responses, #recurring, #refund, #ship_to, #shipping_options_is_default, #success_page_redirect_requested

Instance Method Summary collapse

Methods included from Util

#==, formatted_amount, #numeric_attribute?, to_numeric

Constructor Details

#initialize(response, options = {}) ⇒ Response

Returns a new instance of Response.



6
7
8
9
10
# File 'lib/paypal/express/response.rb', line 6

def initialize(response, options = {})
  super response
  @pay_on_paypal = options[:pay_on_paypal]
  @mobile        = options[:mobile]
end

Instance Attribute Details

#mobileObject

Returns the value of attribute mobile.



4
5
6
# File 'lib/paypal/express/response.rb', line 4

def mobile
  @mobile
end

#pay_on_paypalObject

Returns the value of attribute pay_on_paypal.



4
5
6
# File 'lib/paypal/express/response.rb', line 4

def pay_on_paypal
  @pay_on_paypal
end

Instance Method Details



18
19
20
21
22
# File 'lib/paypal/express/response.rb', line 18

def popup_uri
  endpoint = URI.parse Paypal.popup_endpoint
  endpoint.query = query.to_query
  endpoint.to_s
end

#redirect_uriObject



12
13
14
15
16
# File 'lib/paypal/express/response.rb', line 12

def redirect_uri
  endpoint = URI.parse Paypal.endpoint
  endpoint.query = query(:with_cmd).to_query
  endpoint.to_s
end