Skip to content

Commit

Permalink
Added ePay gateway.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspernj authored and Jeff Dutil committed Feb 18, 2015
1 parent 32894d4 commit fdd92a6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/models/spree/gateway/epay.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module Spree
class Gateway::Epay < Gateway
preference :login, :string
preference :password, :string

def provider_class
ActiveMerchant::Billing::EpayGateway
end
end
end
1 change: 1 addition & 0 deletions lib/spree_gateway/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Engine < Rails::Engine
app.config.spree.payment_methods << Spree::Gateway::CardSave
app.config.spree.payment_methods << Spree::Gateway::CyberSource
app.config.spree.payment_methods << Spree::Gateway::DataCash
app.config.spree.payment_methods << Spree::Gateway::Epay
app.config.spree.payment_methods << Spree::Gateway::Eway
app.config.spree.payment_methods << Spree::Gateway::Linkpoint
app.config.spree.payment_methods << Spree::Gateway::Maxipago
Expand Down
11 changes: 11 additions & 0 deletions spec/models/gateway/epay_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require 'spec_helper'

describe Spree::Gateway::Epay do
let(:gateway) { described_class.create!(name: 'Epay') }

context '.provider_class' do
it 'is a Epay gateway' do
expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::EpayGateway
end
end
end

0 comments on commit fdd92a6

Please sign in to comment.