app/models/spree/gateway/mollie.rb in spree_mollie-0.0.4 vs app/models/spree/gateway/mollie.rb in spree_mollie-0.0.5
- old
+ new
@@ -14,16 +14,13 @@
def method_type
"mollie"
end
def provider
- unless @mollie
- @mollie = ::Mollie::API::Client.new(preferred_partner_id)
- #@mollie.setApiKey preferred_partner_id
- end
- return @mollie
+ @mollie ||= ::Mollie::API::Client.new(preferred_partner_id)
end
+ #check if needed otherwise remove it
def purchase(amount, express_checkout, gateway_options={})
puts amount.inspect
puts express_checkout.inspect
puts gateway_options.inspect