Class: Payonline::RebillGateway
- Inherits:
-
Object
- Object
- Payonline::RebillGateway
- Defined in:
- lib/payonline/rebill_gateway.rb
Constant Summary collapse
- SIGNED_PARAMS =
%w(rebill_anchor order_id amount currency)
- PERMITTED_PARAMS =
%w(rebill_anchor order_id amount currency)
- BASE_URL =
'https://secure.payonlinesystem.com'
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ RebillGateway
constructor
A new instance of RebillGateway.
-
#rebill ⇒ Object
Perform the rebill operation and return the response.
-
#rebill_url ⇒ Object
Return the URL without performing a request.
Constructor Details
#initialize(params = {}) ⇒ RebillGateway
Returns a new instance of RebillGateway.
7 8 9 |
# File 'lib/payonline/rebill_gateway.rb', line 7 def initialize(params = {}) @params = prepare_params(params) end |
Instance Method Details
#rebill ⇒ Object
Perform the rebill operation and return the response
12 13 14 15 16 17 |
# File 'lib/payonline/rebill_gateway.rb', line 12 def rebill response = HTTParty.get(rebill_url) return false unless response.success? Payonline::RebillResponse.new(response.body).success? end |