Class: ActivePayment::Paypal::Gateway

Inherits:
Gateway::Base show all
Defined in:
lib/activepayment/paypal/gateway.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Gateway::Base

build, config, config=, #http_connection, #initialize, #url

Constructor Details

This class inherits a constructor from ActivePayment::Gateway::Base

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



7
8
9
# File 'lib/activepayment/paypal/gateway.rb', line 7

def amount
  @amount
end

#cancel_urlObject

Returns the value of attribute cancel_url.



7
8
9
# File 'lib/activepayment/paypal/gateway.rb', line 7

def cancel_url
  @cancel_url
end

#invoiceObject

Returns the value of attribute invoice.



7
8
9
# File 'lib/activepayment/paypal/gateway.rb', line 7

def invoice
  @invoice
end

#item_nameObject

Returns the value of attribute item_name.



7
8
9
# File 'lib/activepayment/paypal/gateway.rb', line 7

def item_name
  @item_name
end

#jop_idObject

Returns the value of attribute jop_id.



7
8
9
# File 'lib/activepayment/paypal/gateway.rb', line 7

def jop_id
  @jop_id
end

#notify_urlObject

Returns the value of attribute notify_url.



7
8
9
# File 'lib/activepayment/paypal/gateway.rb', line 7

def notify_url
  @notify_url
end

#return_urlObject

Returns the value of attribute return_url.



7
8
9
# File 'lib/activepayment/paypal/gateway.rb', line 7

def return_url
  @return_url
end

#transaction_idObject

Returns the value of attribute transaction_id.



7
8
9
# File 'lib/activepayment/paypal/gateway.rb', line 7

def transaction_id
  @transaction_id
end

Instance Method Details

#purchase_valid?(request) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
22
23
24
25
26
27
# File 'lib/activepayment/paypal/gateway.rb', line 19

def purchase_valid?(request)
  response = post_validation_request(request)

  if response.eql?('VERIFIED')
    return true
  else
    return false
  end
end

#redirect_urlObject



15
16
17
# File 'lib/activepayment/paypal/gateway.rb', line 15

def redirect_url
  URI.parse(self.url.to_s + transaction_params.to_query)
end