Module: OffsitePayments::Integrations::Newebpay

Defined in:
lib/offsite_payments/integrations/newebpay.rb,
lib/offsite_payments/integrations/newebpay/helper.rb,
lib/offsite_payments/integrations/newebpay/return.rb,
lib/offsite_payments/integrations/newebpay/notification.rb,
lib/offsite_payments/integrations/newebpay/concern/has_trade_info.rb

Overview

NewebPay Integrations

Since:

  • 0.1.0

Defined Under Namespace

Modules: HasTradeInfo Classes: Helper, Notification, Return

Constant Summary collapse

VERSION =

Since:

  • 0.1.0

'1.5'

Class Method Summary collapse

Class Method Details

.helper(order, merchant, options = {}) ⇒ Object

Alias to create helper

Parameters:

  • order (String)

    ID

  • merchant (String)

    ID

  • options (Hash) (defaults to: {})

Since:

  • 0.1.0



44
45
46
# File 'lib/offsite_payments/integrations/newebpay.rb', line 44

def self.helper(order, merchant, options = {})
  OffsitePayments::Integrations::Newebpay::Helper.new(order, merchant, options)
end

.notification(query_string, options = {}) ⇒ Object

Alias to create notification object

Parameters:

  • query (String)

    string

  • options (Hash) (defaults to: {})

Since:

  • 0.1.0



64
65
66
# File 'lib/offsite_payments/integrations/newebpay.rb', line 64

def self.notification(query_string, options = {})
  OffsitePayments::Integrations::Newebpay::Notification.new(query_string, options)
end

.return(query_string, options = {}) ⇒ Object

Alias to create return object

Parameters:

  • query (String)

    string

  • options (Hash) (defaults to: {})

Since:

  • 0.1.0



54
55
56
# File 'lib/offsite_payments/integrations/newebpay.rb', line 54

def self.return(query_string, options = {})
  OffsitePayments::Integrations::Newebpay::Return.new(query_string, options)
end

.service_urlString

Current service URL

Returns:

  • (String)

Since:

  • 0.1.0



23
24
25
26
27
28
29
30
# File 'lib/offsite_payments/integrations/newebpay.rb', line 23

def self.service_url
  case OffsitePayments.mode
  when :production then live_url
  when :test then test_url
  else
    raise StandardError, "Integration mode set to an invalid value: #{OffsitePayments.mode}"
  end
end