Module: OffsitePayments::Integrations::MollieIdeal
- Includes:
- Mollie
- Defined in:
- lib/offsite_payments/integrations/mollie_ideal.rb
Defined Under Namespace
Classes: Helper, Notification, Return
Constant Summary
collapse
- RedirectError =
Class.new(ActiveUtils::ActiveUtilsError)
- MOLLIE_API_V1_URI =
'https://api.mollie.nl/v1/'.freeze
Class Method Summary
collapse
Class Method Details
.check_payment_status(token, payment_id) ⇒ Object
61
62
63
|
# File 'lib/offsite_payments/integrations/mollie_ideal.rb', line 61
def self.check_payment_status(token, payment_id)
API.new(token).get_request("payments/#{payment_id}")
end
|
.create_payment(token, params) ⇒ Object
57
58
59
|
# File 'lib/offsite_payments/integrations/mollie_ideal.rb', line 57
def self.create_payment(token, params)
API.new(token).post_request('payments', params)
end
|
.live? ⇒ Boolean
53
54
55
|
# File 'lib/offsite_payments/integrations/mollie_ideal.rb', line 53
def self.live?
OffsitePayments.mode == :production
end
|
.notification(post, options = {}) ⇒ Object
45
46
47
|
# File 'lib/offsite_payments/integrations/mollie_ideal.rb', line 45
def self.notification(post, options = {})
Notification.new(post, options)
end
|
.redirect_param_label ⇒ Object
25
26
27
|
# File 'lib/offsite_payments/integrations/mollie_ideal.rb', line 25
def self.redirect_param_label
"Select your bank"
end
|
.redirect_param_options(options = {}) ⇒ Object
29
30
31
32
|
# File 'lib/offsite_payments/integrations/mollie_ideal.rb', line 29
def self.redirect_param_options(options = {})
return test_issuers if options[:credential1].blank?
options[:credential1].start_with?('live_') ? live_issuers : test_issuers
end
|
.requires_redirect_param? ⇒ Boolean
65
66
67
|
# File 'lib/offsite_payments/integrations/mollie_ideal.rb', line 65
def self.requires_redirect_param?
true
end
|
.retrieve_issuers(token) ⇒ Object
34
35
36
37
38
39
|
# File 'lib/offsite_payments/integrations/mollie_ideal.rb', line 34
def self.retrieve_issuers(token)
response = API.new(token).get_request("issuers")
response['data']
.select { |issuer| issuer['method'] == 'ideal' }
.map { |issuer| [issuer['name'], issuer['id']] }
end
|
.return(post, options = {}) ⇒ Object
49
50
51
|
# File 'lib/offsite_payments/integrations/mollie_ideal.rb', line 49
def self.return(post, options = {})
Return.new(post, options)
end
|