Module: Walletone

Defined in:
lib/walletone/fields.rb,
lib/walletone.rb,
lib/walletone/form.rb,
lib/walletone/signer.rb,
lib/walletone/payment.rb,
lib/walletone/version.rb,
lib/walletone/invoicing.rb,
lib/walletone/recurrent.rb,
lib/walletone/middleware.rb,
lib/walletone/notification.rb,
lib/walletone/error_response.rb

Overview

Уведомление об оплате от walletone которое пришло через rack middleware callback

Defined Under Namespace

Modules: Invoicing, Middleware, Recurrent Classes: Configuration, ErrorResponse, Fields, Form, Notification, Payment, Signer

Constant Summary collapse

API_URL =
'https://api.w1.ru/OpenApi/'
V1_CHECKOUT_URL =
'https://www.walletone.com/checkout/default.aspx'
V2_CHECKOUT_URL =
'https://wl.walletone.com/checkout/checkout/Index'
VERSION =
'0.3.0'

Class Method Summary collapse

Class Method Details

.configObject



47
48
49
# File 'lib/walletone.rb', line 47

def self.config
  Configuration.instance
end

.configure {|config| ... } ⇒ Object

Yields:



51
52
53
# File 'lib/walletone.rb', line 51

def self.configure
  yield config
end

.loggerObject



55
56
57
# File 'lib/walletone.rb', line 55

def self.logger
  config.logger
end

.notify_error(error, *args) ⇒ Object



36
37
38
39
40
# File 'lib/walletone.rb', line 36

def self.notify_error error, *args
  logger.error "Catch error #{error}"
  return unless config.error_notifier
  config.error_notifier.send self.config.error_notify_method, error, *args
end

.raise_error(error) ⇒ Object



42
43
44
45
# File 'lib/walletone.rb', line 42

def self.raise_error error
  notify_error error
  fail error
end