lib/adyen/form.rb in adyen-1.0.0 vs lib/adyen/form.rb in adyen-1.1.0
- old
+ new
@@ -26,23 +26,24 @@
######################################################
# ADYEN FORM URL
######################################################
# The URL of the Adyen payment system that still requires the current
- # Adyen enviroment to be filled in.
- ACTION_URL = "https://%s.adyen.com/hpp/select.shtml"
+ # Adyen enviroment and payment flow to be filled.
+ ACTION_URL = "https://%s.adyen.com/hpp/%s.shtml"
# Returns the URL of the Adyen payment system, adjusted for an Adyen environment.
#
# @param [String] environment The Adyen environment to use. This parameter can be
# left out, in which case the 'current' environment will be used.
# @return [String] The absolute URL of the Adyen payment system that can be used
# for payment forms or redirects.
# @see Adyen::Form.environment
# @see Adyen::Form.redirect_url
- def url(environment = nil)
- environment ||= Adyen.configuration.environment
- Adyen::Form::ACTION_URL % environment.to_s
+ def url(environment = nil, payment_flow = nil)
+ environment ||= Adyen.configuration.environment
+ payment_flow ||= Adyen.configuration.payment_flow
+ Adyen::Form::ACTION_URL % [environment.to_s, payment_flow.to_s]
end
######################################################
# POSTING/REDIRECTING TO ADYEN
######################################################