Sha256: 8c714968a0114ac324a19259fbccdef0d4afa28a467b03ad7cfe708e35665795
Contents?: true
Size: 826 Bytes
Versions: 1
Compression:
Stored size: 826 Bytes
Contents
require "mollie/api/client" module Spree class Gateway::Mollie < Gateway preference :partner_id, :string def provider_class ::Mollie::API::Client end def payment_source_class nil end def method_type "mollie" end def provider @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 provider.payment.create( amount: amount, description: "TODO something here", method: Mollie::API::Object::Method::BANKTRANSFER, redirectUrl: "TODO redirect url here" ) end def cancel response end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spree_mollie-0.0.5 | app/models/spree/gateway/mollie.rb |