Class: Buckaroo::Ideal::Config
- Inherits:
-
Object
- Object
- Buckaroo::Ideal::Config
- Defined in:
- lib/buckaroo-ideal/config.rb
Overview
Configuration singleton for storing settings required for making transactions.
Class Attribute Summary collapse
-
.autoclose_popup ⇒ Boolean
If the POPUP style is being used, you can autoclose the popup after a transaction.
-
.error_url ⇒ String
The URL the user will be redirected to after an error occured during the transaction.
-
.gateway_url ⇒ String
The gateway URL that is used to post form data to.
-
.merchant_key ⇒ String
The merchant-key is supllied by Buckaroo.
-
.reject_url ⇒ String
The URL the user will be redirected to after a failed transaction.
-
.return_method ⇒ String
The HTTP method that will be used to return the user back to the application after a transaction.
-
.secret_key ⇒ String
The secret_key should only be known by your application and Buckaroo.
-
.style ⇒ String
There are 2 styles that you can use to integrate Buckaroo iDEAL: * POPUP - The transaction is performed in a popup * PAGE - The transaction is performed in the original window.
-
.success_url ⇒ String
The URL the user will be redirected to after a successful transaction.
-
.test_mode ⇒ Boolean
If test_mode is enabled, transactions will be registered by Buckaroo, but clients will not be forwared to the iDEAL page of their bank.
Class Method Summary collapse
-
.configure(settings = {}) ⇒ Object
Configure the integration with Buckaroo.
-
.defaults ⇒ Object
Default settings.
-
.reset ⇒ Object
Reset the configuration to the default values.
Class Attribute Details
.autoclose_popup ⇒ Boolean
If the POPUP style is being used, you can autoclose the popup after a transaction. You will have to provide information about the transaction to the user on the page he will arrive on.
63 64 65 |
# File 'lib/buckaroo-ideal/config.rb', line 63 def autoclose_popup @autoclose_popup end |
.error_url ⇒ String
Returns The URL the user will be redirected to after an error occured during the transaction.
45 46 47 |
# File 'lib/buckaroo-ideal/config.rb', line 45 def error_url @error_url end |
.gateway_url ⇒ String
The gateway URL that is used to post form data to.
12 13 14 |
# File 'lib/buckaroo-ideal/config.rb', line 12 def gateway_url @gateway_url end |
.merchant_key ⇒ String
The merchant-key is supllied by Buckaroo. Every application MUST have it’s own merchant key.
18 19 20 |
# File 'lib/buckaroo-ideal/config.rb', line 18 def merchant_key @merchant_key end |
.reject_url ⇒ String
Returns The URL the user will be redirected to after a failed transaction.
41 42 43 |
# File 'lib/buckaroo-ideal/config.rb', line 41 def reject_url @reject_url end |
.return_method ⇒ String
Returns The HTTP method that will be used to return the user back to the application after a transaction.
49 50 51 |
# File 'lib/buckaroo-ideal/config.rb', line 49 def return_method @return_method end |
.secret_key ⇒ String
The secret_key should only be known by your application and Buckaroo. It is used to sign orders and validate transactions.
25 26 27 |
# File 'lib/buckaroo-ideal/config.rb', line 25 def secret_key @secret_key end |
.style ⇒ String
There are 2 styles that you can use to integrate Buckaroo iDEAL:
-
POPUP - The transaction is performed in a popup
-
PAGE - The transaction is performed in the original window
56 57 58 |
# File 'lib/buckaroo-ideal/config.rb', line 56 def style @style end |
.success_url ⇒ String
Returns The URL the user will be redirected to after a successful transaction.
37 38 39 |
# File 'lib/buckaroo-ideal/config.rb', line 37 def success_url @success_url end |
.test_mode ⇒ Boolean
If test_mode is enabled, transactions will be registered by Buckaroo, but clients will not be forwared to the iDEAL page of their bank.
Clients will be redirected back to the success_url of your application
33 34 35 |
# File 'lib/buckaroo-ideal/config.rb', line 33 def test_mode @test_mode end |
Class Method Details
.configure(settings = {}) ⇒ Object
Configure the integration with Buckaroo
82 83 84 85 86 |
# File 'lib/buckaroo-ideal/config.rb', line 82 def configure(settings = {}) defaults.merge(settings).each do |key, value| set key, value end end |
.defaults ⇒ Object
Default settings
66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/buckaroo-ideal/config.rb', line 66 def defaults { :gateway_url => 'https://payment.buckaroo.nl/gateway/ideal_payment.asp', :merchant_key => nil, :secret_key => nil, :test_mode => false, :success_url => nil, :reject_url => nil, :error_url => nil, :return_method => 'POST', :style => 'PAGE', :autoclose_popup => false } end |
.reset ⇒ Object
Reset the configuration to the default values
89 90 91 |
# File 'lib/buckaroo-ideal/config.rb', line 89 def reset configure({}) end |