Class: SpreeAdyen::Gateways::Configure
- Inherits:
-
Object
- Object
- SpreeAdyen::Gateways::Configure
- Defined in:
- app/services/spree_adyen/gateways/configure.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(gateway) ⇒ Configure
constructor
A new instance of Configure.
Constructor Details
#initialize(gateway) ⇒ Configure
Returns a new instance of Configure.
4 5 6 |
# File 'app/services/spree_adyen/gateways/configure.rb', line 4 def initialize(gateway) @gateway = gateway end |
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/services/spree_adyen/gateways/configure.rb', line 8 def call gateway.preferred_client_key = configuration.client_key || gateway.generate_client_key.params['clientKey'] gateway.preferred_merchant_account = configuration.merchant_account set_up_allowed_origins set_up_webhook_with_hmac_key unless current_webhook_is_valid? gateway.skip_auto_configuration = true gateway.save! end |