Class: ActiveMerchant::Billing::Integrations::Webpay::Middleware
- Inherits:
-
Object
- Object
- ActiveMerchant::Billing::Integrations::Webpay::Middleware
- Defined in:
- lib/active_merchant/billing/integrations/webpay/middleware.rb
Defined Under Namespace
Classes: CGIExecutionError
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app) ⇒ Middleware
Returns a new instance of Middleware.
6 7 8 |
# File 'lib/active_merchant/billing/integrations/webpay/middleware.rb', line 6 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/active_merchant/billing/integrations/webpay/middleware.rb', line 10 def call(env) case env['PATH_INFO'] when '/webpay/pay' process(env, payment_cgi_path) when '/webpay/result' process(env, result_cgi_path) else @app.call env end end |