Class: ActiveMerchant::Billing::MollieIdealGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::MollieIdealGateway
- Defined in:
- lib/active_merchant/billing/mollie_ideal.rb
Constant Summary collapse
- URL =
"https://secure.mollie.nl/xml/ideal"
Instance Method Summary collapse
- #details_for(token) ⇒ Object
-
#initialize(options = {}) ⇒ MollieIdealGateway
constructor
A new instance of MollieIdealGateway.
- #redirect_url_for(token) ⇒ Object
- #setup_purchase(money, options) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ MollieIdealGateway
Returns a new instance of MollieIdealGateway.
9 10 11 12 13 |
# File 'lib/active_merchant/billing/mollie_ideal.rb', line 9 def initialize(={}) requires!(, :partner_id) @options = super end |
Instance Method Details
#details_for(token) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/active_merchant/billing/mollie_ideal.rb', line 34 def details_for(token) build_response_check(commit('check', { :partnerid => @options[:partner_id], :transaction_id => token, :testmode => ActiveMerchant::Billing::Base.test? })) end |
#redirect_url_for(token) ⇒ Object
30 31 32 |
# File 'lib/active_merchant/billing/mollie_ideal.rb', line 30 def redirect_url_for(token) @response.url if @response.token == token end |
#setup_purchase(money, options) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/active_merchant/billing/mollie_ideal.rb', line 15 def setup_purchase(money, ) requires!(, :return_url, :report_url, :bank_id, :description) raise ArgumentError.new("Amount should be at least EUR 1,18") if money < 118 @response = build_response_fetch(commit("fetch", { :amount => money, :bank_id => [:bank_id], :description => CGI::escape([:description] || ""), :partnerid => @options[:partner_id], :reporturl => [:report_url], :returnurl => [:return_url] })) end |