Use BillingIntegration#provider method to create instance of provider_class

This commit is contained in:
Brian Quinn 2010-01-25 15:21:41 +00:00
parent 9592c545a3
commit 69da0ef978
1 changed files with 2 additions and 3 deletions

View File

@ -287,10 +287,9 @@ module Spree::PaypalExpress
def paypal_gateway
integration = BillingIntegration.find(params[:integration_id]) if params.key? :integration_id
integration ||= BillingIntegration.current
gw_opts = integration.options
requires!(gw_opts, :login, :password, :signature)
gateway = integration.provider_class.new(gw_opts)
gateway = integration.provider
end
end