sisow 1.5 → 2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 358f59df3fa296a9dc216a4581968079fa734e35f1c69bbf4da60f73a7858db2
4
+ data.tar.gz: 5bdd565e49e7c436114e6939df4b05c5583ee2c8afaca80dea1c8ba6e965cf33
5
+ SHA512:
6
+ metadata.gz: c737bc3e92c8022fecb49744711fafb5dbde04b738aaa1645f64c452ff30dd51b39c71f042dc6873ba1cba44cacd085029bdc338eb9ec9739ea33af937b8ed2c
7
+ data.tar.gz: 0e87ae935f5911414180f138eb0162767e9b2a1c2e767b58145cc0be197b3fb82cdbd29706fe86ecf2ca6cc154c2da42e44b72927935f8a81296c08d7db7e571
data/.env.example ADDED
@@ -0,0 +1,2 @@
1
+ MERCHANT_ID=
2
+ MERCHANT_KEY=
data/.gitignore CHANGED
@@ -1,7 +1,8 @@
1
1
  *.gem
2
2
  .bundle
3
+ .env
4
+ Gemfile.lock
3
5
  pkg/*
4
- spec/sisow.yml
5
6
  coverage/
6
7
  spec/vcr_cassettes
7
8
  vendor
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.5.0
data/.travis.yml CHANGED
@@ -1,7 +1,3 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.8.7
4
- - 1.9.3
5
- - ree
6
- before_script: cp spec/sisow.yml.example spec/sisow.yml
7
- after_script: rm spec/sisow.yml
3
+ - 2.2.3
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in sisow.gemspec
4
4
  gemspec
data/README.rdoc CHANGED
@@ -44,6 +44,10 @@ To set up a payment, your user needs to choose an issuer (a bank) that will fulf
44
44
  This will return a list of <tt>Sisow::Issuer</tt> objects that have an <tt>id</tt> and a <tt>name</tt>. The <tt>id</tt> is needed
45
45
  to set up the payment in the following step.
46
46
 
47
+ Optionally you can also retrieve a list of issuers by supplying the merchant_id and merchant_key directly to the method.
48
+
49
+ Sisow::Issuer.list(merchant_id: 1, merchant_key: 'abcd')
50
+
47
51
  === Setting up a payment
48
52
 
49
53
  After choosing an issuer, your user must be redirected to the payment page for that issuer. For that to happen, you'll have to
@@ -52,6 +56,8 @@ set up a payment through the Sisow API, after which you'll be given a URL to red
52
56
  Setting up a payment looks like this:
53
57
 
54
58
  payment_attributes = {
59
+ :merchant_id => 1, # optional: set if you don't want to use a global configuration
60
+ :merchant_key => 'abcd', # optional: set if you don't want to use a global configuration
55
61
  :purchase_id => '2012-01-28-33558', # for your own reference
56
62
  :issuer_id => '99', # the issuer id from the previous step
57
63
  :description => 'Acme Inc. payment', # description of this payment
@@ -61,7 +67,7 @@ Setting up a payment looks like this:
61
67
  :cancel_url => 'http://example.com', # where the user is sent when he cancels the payment
62
68
  :callback_url => 'http://example.com', # where a failed (not cancelled) payment will be reported
63
69
  :notify_url => 'http://example.com', # where the payment status will be reported
64
- :locale => 'GB' # for Paypal payments. Only GB and US are currently valid.
70
+ :locale => 'GB' # for Paypal payments. Only GB and US are currently valid.
65
71
  # Any other option (or leaving it out entirely) will default
66
72
  # to a Dutch payment page
67
73
  }
@@ -89,6 +95,8 @@ As documented in the Sisow API documentation, four callbacks are available. When
89
95
  The <tt>Sisow::Api::Callback</tt> can handle these callbacks for you. To initialize such an instance you should provide the following query parameters (which are given by Sisow in the request):
90
96
 
91
97
  callback = Sisow::Api::Callback.new(
98
+ :merchant_id => 1, # optional: set if you don't want to use a global configuration
99
+ :merchant_key => 'abcd', # optional: set if you don't want to use a global configuration
92
100
  :transaction_id => params[:trxid],
93
101
  :entrance_code => params[:ec],
94
102
  :status => params[:status],
@@ -111,7 +119,7 @@ Your contributions are more than welcome. To contribute to this gem, follow thes
111
119
  1. Fork the repository from Github
112
120
  2. Clone your fork on your development machine
113
121
  3. Install the dependencies with <tt>bundle install</tt>
114
- 4. Copy <tt>spec/sisow.yml.example</tt> to <tt>spec/sisow.yml</tt> and enter your own Sisow credentials
122
+ 4. Copy <tt>.env.example</tt> to <tt>.env</tt> and enter your own Sisow credentials
115
123
  5. Verify your clone is working by running <tt>rspec</tt>
116
124
  6. Hack away
117
125
  7. Run the specs with <tt>rspec</tt>
data/lib/sisow.rb CHANGED
@@ -14,6 +14,7 @@ require 'sisow/payment/ideal_payment'
14
14
  require 'sisow/payment/bancontact_payment'
15
15
  require 'sisow/payment/sofort_payment'
16
16
  require 'sisow/payment/paypal_payment'
17
+ require 'sisow/payment/credit_card_payment'
17
18
  require 'sisow/merchant'
18
19
  require 'sisow/api/request'
19
20
  require 'sisow/api/request/directory_request'
@@ -2,6 +2,9 @@ module Sisow
2
2
  module Api
3
3
  class Callback
4
4
 
5
+ attr_writer :merchant_key,
6
+ :merchant_id
7
+
5
8
  attr_accessor :transaction_id,
6
9
  :entrance_code,
7
10
  :status,
@@ -46,10 +49,18 @@ module Sisow
46
49
  @status == 'Reversed'
47
50
  end
48
51
 
52
+ def merchant_id
53
+ @merchant_id || Sisow.configuration.merchant_id
54
+ end
55
+
56
+ def merchant_key
57
+ @merchant_key || Sisow.configuration.merchant_key
58
+ end
59
+
49
60
  private
50
61
 
51
62
  def valid_callback
52
- string = [ @transaction_id, @entrance_code, @status, Sisow.configuration.merchant_id, Sisow.configuration.merchant_key ].join
63
+ string = [ @transaction_id, @entrance_code, @status, merchant_id, merchant_key ].join
53
64
  calculated_sha1 = Digest::SHA1.hexdigest(string)
54
65
 
55
66
  calculated_sha1 == @sha1
@@ -4,10 +4,24 @@ module Sisow
4
4
  module Api
5
5
  class Request
6
6
 
7
- BASE_URI = "http://www.sisow.nl/Sisow/iDeal/RestHandler.ashx"
7
+ BASE_URI = "https://www.sisow.nl/Sisow/iDeal/RestHandler.ashx"
8
8
 
9
- def self.perform
10
- new.perform
9
+ attr_writer :merchant_id,
10
+ :merchant_key
11
+
12
+ def merchant_id
13
+ @merchant_id || Sisow.configuration.merchant_id
14
+ end
15
+
16
+ def merchant_key
17
+ @merchant_key || Sisow.configuration.merchant_key
18
+ end
19
+
20
+ def self.perform(merchant_id: nil, merchant_key: nil)
21
+ new.tap do |r|
22
+ r.merchant_id = merchant_id if merchant_id
23
+ r.merchant_key = merchant_key if merchant_key
24
+ end.perform
11
25
  end
12
26
 
13
27
  def perform
@@ -26,7 +40,7 @@ module Sisow
26
40
 
27
41
  def default_params
28
42
  {
29
- :merchantid => Sisow.configuration.merchant_id,
43
+ :merchantid => merchant_id,
30
44
  :test => Sisow.configuration.test_mode_enabled?? test_mode_param : nil
31
45
  }
32
46
  end
@@ -39,7 +53,7 @@ module Sisow
39
53
  private
40
54
 
41
55
  def can_perform?
42
- !(Sisow.configuration.merchant_id.nil? || Sisow.configuration.merchant_id.empty?) && !(Sisow.configuration.merchant_key.nil? || Sisow.configuration.merchant_key.empty?)
56
+ !(merchant_id.nil? || merchant_id.empty?) && !(merchant_key.nil? || merchant_key.empty?)
43
57
  end
44
58
 
45
59
  def uri
@@ -2,12 +2,6 @@ module Sisow
2
2
  module Api
3
3
  class TransactionRequest < Request
4
4
 
5
- attr_accessor :purchase_id,
6
- :issuer_id,
7
- :description,
8
- :amount,
9
- :payment
10
-
11
5
  def initialize(payment)
12
6
  @payment = payment
13
7
  end
@@ -37,8 +31,8 @@ module Sisow
37
31
  payment.purchase_id,
38
32
  payment.entrance_code,
39
33
  payment.amount,
40
- Sisow.configuration.merchant_id,
41
- Sisow.configuration.merchant_key
34
+ merchant_id,
35
+ merchant_key
42
36
  ].join
43
37
 
44
38
  Digest::SHA1.hexdigest(string)
@@ -94,8 +88,8 @@ module Sisow
94
88
  string = [
95
89
  response.transactionrequest.transaction.trxid,
96
90
  response.transactionrequest.transaction.issuerurl,
97
- Sisow.configuration.merchant_id,
98
- Sisow.configuration.merchant_key
91
+ merchant_id,
92
+ merchant_key
99
93
  ].join
100
94
 
101
95
  calculated_sha1 = Digest::SHA1.hexdigest(string)
data/lib/sisow/issuer.rb CHANGED
@@ -2,8 +2,8 @@ module Sisow
2
2
  class Issuer
3
3
  attr_accessor :id, :name
4
4
 
5
- def self.list
6
- @list ||= find_all_from_api
5
+ def self.list(merchant_id: nil, merchant_key: nil)
6
+ @list ||= find_all_from_api(merchant_id, merchant_key)
7
7
  end
8
8
 
9
9
  def self.find(issuer_id)
@@ -17,8 +17,8 @@ module Sisow
17
17
 
18
18
  private
19
19
 
20
- def self.find_all_from_api
21
- hash = Sisow::Api::DirectoryRequest.perform
20
+ def self.find_all_from_api(merchant_id = nil, merchant_key = nil)
21
+ hash = Sisow::Api::DirectoryRequest.perform(merchant_id: merchant_id, merchant_key: merchant_key)
22
22
 
23
23
  hash.issuer = [ hash.issuer ] unless hash.issuer.is_a?(Array)
24
24
 
data/lib/sisow/payment.rb CHANGED
@@ -1,7 +1,9 @@
1
1
  module Sisow
2
2
  class Payment
3
3
 
4
- attr_accessor :purchase_id,
4
+ attr_accessor :merchant_id,
5
+ :merchant_key,
6
+ :purchase_id,
5
7
  :issuer_id,
6
8
  :description,
7
9
  :amount,
@@ -48,7 +50,10 @@ module Sisow
48
50
  end
49
51
 
50
52
  def request
51
- @request ||= Sisow::Api::TransactionRequest.new(self)
53
+ @request ||= Sisow::Api::TransactionRequest.new(self).tap do |r|
54
+ r.merchant_id = merchant_id if merchant_id
55
+ r.merchant_key = merchant_key if merchant_key
56
+ end
52
57
  end
53
58
 
54
59
  end
@@ -0,0 +1,11 @@
1
+ module Sisow
2
+ class CreditCardPayment < Sisow::Payment
3
+
4
+ attr_accessor :locale
5
+
6
+ def payment_method
7
+ 'creditcard'
8
+ end
9
+
10
+ end
11
+ end
data/lib/sisow/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sisow
2
- VERSION = "1.5"
2
+ VERSION = "2.1"
3
3
  end
data/script/ci CHANGED
@@ -9,6 +9,4 @@ echo "--- Starting continuous integration build"
9
9
 
10
10
  ./script/bundler
11
11
 
12
- cp ./spec/sisow.yml.example ./spec/sisow.yml
13
-
14
12
  run rspec
data/sisow.gemspec CHANGED
@@ -19,14 +19,15 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency 'httpi'
23
- s.add_dependency 'hashie'
24
- s.add_dependency 'crack'
22
+ s.add_dependency 'httpi', '~> 2'
23
+ s.add_dependency 'hashie', '~> 3'
24
+ s.add_dependency 'crack', '~> 0.4'
25
25
 
26
- s.add_development_dependency 'rspec'
27
- s.add_development_dependency 'vcr'
28
- s.add_development_dependency 'fakeweb'
29
- s.add_development_dependency 'simplecov'
30
- s.add_development_dependency 'simplecov-rcov'
26
+ s.add_development_dependency 'rspec', '~> 3'
27
+ s.add_development_dependency 'vcr', '~> 4'
28
+ s.add_development_dependency 'webmock', '~> 3'
29
+ s.add_development_dependency 'simplecov', '~> 0.16'
30
+ s.add_development_dependency 'simplecov-rcov', '~> 0.2'
31
+ s.add_development_dependency 'dotenv', '~> 2'
31
32
 
32
33
  end
@@ -25,7 +25,20 @@ describe Sisow::Api::Callback do
25
25
  end
26
26
 
27
27
  it "should be valid" do
28
+ @callback.valid?.should == true
29
+ lambda { @callback.validate! }.should_not raise_error
30
+ @callback.validate!.should == true
31
+ end
32
+
33
+ it "should be valid with instance configuration" do
34
+ Sisow.configure do |config|
35
+ config.merchant_id = "invalid"
36
+ config.merchant_key = "invalid"
37
+ end
38
+
28
39
  @callback = Sisow::Api::Callback.new(
40
+ :merchant_id => ENV.fetch('MERCHANT_ID'),
41
+ :merchant_key => ENV.fetch('MERCHANT_KEY'),
29
42
  :transaction_id => @transaction_id,
30
43
  :entrance_code => @entrance_code,
31
44
  :status => @status,
@@ -11,6 +11,20 @@ describe Sisow::Issuer do
11
11
  end
12
12
  end
13
13
 
14
+ it "should list all available issuers with instance configuration" do
15
+ Sisow.configure do |config|
16
+ config.merchant_id = "invalid"
17
+ config.merchant_key = "invalid"
18
+ end
19
+
20
+ VCR.use_cassette('issuer') do
21
+ list = Sisow::Issuer.list(merchant_id: ENV.fetch('MERCHANT_ID'), merchant_key: ENV.fetch('MERCHANT_KEY'))
22
+ list.size.should == 1
23
+ list.first.name.should =~ /Sisow Bank/
24
+ list.first.id.should_not be_nil
25
+ end
26
+ end
27
+
14
28
  it "should find an issuer by ID" do
15
29
  VCR.use_cassette('issuer') do
16
30
  issuer = Sisow::Issuer.find(99)
@@ -46,7 +46,7 @@ describe Sisow::Payment do
46
46
  end
47
47
 
48
48
  it "should raise an error when calling payment_method" do
49
- lambda{ @payment.payment_method }.should raise_error
49
+ lambda{ @payment.payment_method }.should raise_error(RuntimeError, "Implement me in a subclass")
50
50
  end
51
51
 
52
52
  it "should raise an error if amount is missing" do
@@ -54,4 +54,16 @@ describe Sisow::Payment do
54
54
  lambda{ @payment.payment_url }.should raise_error(Sisow::Exception, "One of your payment parameters is missing or invalid")
55
55
  end
56
56
 
57
+ describe "with instance configuration" do
58
+ it "should set merchant_id and merchant_key from attributes" do
59
+ @payment.stub(:payment_method).and_return('ideal')
60
+
61
+ @payment.merchant_id = "1234"
62
+ @payment.merchant_key = "4321"
63
+
64
+ @payment.send(:request).merchant_id.should == "1234"
65
+ @payment.send(:request).merchant_key.should == "4321"
66
+ end
67
+ end
68
+
57
69
  end
@@ -4,7 +4,7 @@ describe Sisow::Ping do
4
4
 
5
5
  it "should send a ping message" do
6
6
  VCR.use_cassette('ping') do
7
- Sisow::Ping.send.class.should == String
7
+ Sisow::Ping.send.class.should == REXMLUtiliyNodeString
8
8
  end
9
9
  end
10
10
 
@@ -4,16 +4,16 @@ describe Sisow::Api::Request do
4
4
 
5
5
  before :each do
6
6
  @request = Sisow::Api::Request.new
7
- @request.stub!(:params).and_return(@request.default_params)
8
- @request.stub!(:method).and_return("CheckMerchantRequest")
9
- @request.stub!(:clean).and_return(['ideal'])
10
- @request.stub!(:validate!).and_return(true)
11
- Sisow::Api::Request.stub!(:new).and_return(@request)
7
+ @request.stub(:params).and_return(@request.default_params)
8
+ @request.stub(:method).and_return("CheckMerchantRequest")
9
+ @request.stub(:clean).and_return(['ideal'])
10
+ @request.stub(:validate!).and_return(true)
11
+ Sisow::Api::Request.stub(:new).and_return(@request)
12
12
  end
13
13
 
14
14
  it "should point to the base URI of the Sisow API" do
15
15
  request = Sisow::Api::Request.new
16
- request.send(:base_uri).should == "http://www.sisow.nl/Sisow/iDeal/RestHandler.ashx"
16
+ request.send(:base_uri).should == "https://www.sisow.nl/Sisow/iDeal/RestHandler.ashx"
17
17
  end
18
18
 
19
19
  it "should perform properly" do
@@ -25,7 +25,7 @@ describe Sisow::Api::Request do
25
25
  )
26
26
 
27
27
  params = @request.params.merge!(:sha1 => sha1)
28
- @request.stub!(:params).and_return(params)
28
+ @request.stub(:params).and_return(params)
29
29
 
30
30
  VCR.use_cassette('request') do
31
31
  @request.perform
@@ -38,4 +38,44 @@ describe Sisow::Api::Request do
38
38
  end
39
39
  end
40
40
 
41
+ describe "with instance configuration" do
42
+ it "should perform properly" do
43
+ Sisow.configure do |config|
44
+ config.merchant_id = "invalid"
45
+ config.merchant_key = "invalid"
46
+ end
47
+
48
+ @request = Sisow::Api::Request.new
49
+ @request.merchant_id = ENV.fetch('MERCHANT_ID')
50
+ @request.merchant_key = ENV.fetch('MERCHANT_KEY')
51
+ @request.stub(:params).and_return(@request.default_params)
52
+ @request.stub(:method).and_return("CheckMerchantRequest")
53
+ @request.stub(:clean).and_return(['ideal'])
54
+ @request.stub(:validate!).and_return(true)
55
+
56
+ sha1 = Digest::SHA1.hexdigest(
57
+ [
58
+ ENV.fetch('MERCHANT_ID'),
59
+ ENV.fetch('MERCHANT_KEY')
60
+ ].join
61
+ )
62
+
63
+ params = @request.params.merge!(:sha1 => sha1)
64
+ @request.stub(:params).and_return(params)
65
+
66
+ VCR.use_cassette('request') do
67
+ @request.perform
68
+ end
69
+ end
70
+
71
+ it "should set merchant_id and merchant_key using class method" do
72
+ subject.stub(:perform).and_return(subject)
73
+
74
+ obj = subject.class.perform(merchant_id: "1234", merchant_key: "4321")
75
+
76
+ obj.merchant_id.should == "1234"
77
+ obj.merchant_key.should == "4321"
78
+ end
79
+ end
80
+
41
81
  end
@@ -29,7 +29,7 @@ describe Sisow::Api::TransactionRequest do
29
29
  end
30
30
 
31
31
  it "should remove issuerid from params for Bancontact" do
32
- Sisow.configuration.stub!(:test_mode_enabled?).and_return(false)
32
+ Sisow.configuration.stub(:test_mode_enabled?).and_return(false)
33
33
  payment = Sisow::BancontactPayment.new
34
34
  request = Sisow::Api::TransactionRequest.new(payment)
35
35
 
@@ -44,7 +44,7 @@ describe Sisow::Api::TransactionRequest do
44
44
  end
45
45
 
46
46
  it "should remove issuerid from params for Sofort" do
47
- Sisow.configuration.stub!(:test_mode_enabled?).and_return(false)
47
+ Sisow.configuration.stub(:test_mode_enabled?).and_return(false)
48
48
  payment = Sisow::SofortPayment.new
49
49
  request = Sisow::Api::TransactionRequest.new(payment)
50
50
 
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'dotenv/load'
1
2
  require 'bundler/setup'
2
3
  require 'simplecov'
3
4
  require 'simplecov-rcov'
@@ -12,21 +13,19 @@ end
12
13
 
13
14
  require 'vcr_setup'
14
15
 
15
- require 'rspec/autorun'
16
16
  require 'sisow'
17
17
 
18
18
  RSpec.configure do |config|
19
- config.mock_with :rspec
20
- config.color_enabled = true
19
+ config.mock_with(:rspec) { |c| c.syntax = :should }
20
+ config.color = true
21
21
  config.tty = true
22
22
  config.formatter = :progress
23
+ config.expect_with(:rspec) { |c| c.syntax = :should }
23
24
 
24
25
  config.before(:each) do
25
- hash = YAML.load(File.open('./spec/sisow.yml'))
26
-
27
26
  Sisow.configure do |config|
28
- config.merchant_id = hash['merchant_id']
29
- config.merchant_key = hash['merchant_key']
27
+ config.merchant_id = ENV.fetch('MERCHANT_ID')
28
+ config.merchant_key = ENV.fetch('MERCHANT_KEY')
30
29
  config.test_mode = true
31
30
  config.debug_mode = false
32
31
  end
data/spec/vcr_setup.rb CHANGED
@@ -2,5 +2,5 @@ require 'vcr'
2
2
 
3
3
  VCR.configure do |c|
4
4
  c.cassette_library_dir = './spec/vcr_cassettes'
5
- c.hook_into :fakeweb
5
+ c.hook_into :webmock
6
6
  end
metadata CHANGED
@@ -1,144 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sisow
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.5'
5
- prerelease:
4
+ version: '2.1'
6
5
  platform: ruby
7
6
  authors:
8
7
  - Marcel de Graaf
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-17 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: httpi
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '0'
19
+ version: '2'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '0'
26
+ version: '2'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: hashie
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
- version: '0'
33
+ version: '3'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
- version: '0'
40
+ version: '3'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: crack
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '0'
47
+ version: '0.4'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
- version: '0'
54
+ version: '0.4'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
- version: '0'
61
+ version: '3'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
- version: '0'
68
+ version: '3'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: vcr
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - "~>"
84
74
  - !ruby/object:Gem::Version
85
- version: '0'
75
+ version: '4'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - "~>"
92
81
  - !ruby/object:Gem::Version
93
- version: '0'
82
+ version: '4'
94
83
  - !ruby/object:Gem::Dependency
95
- name: fakeweb
84
+ name: webmock
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - "~>"
100
88
  - !ruby/object:Gem::Version
101
- version: '0'
89
+ version: '3'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - "~>"
108
95
  - !ruby/object:Gem::Version
109
- version: '0'
96
+ version: '3'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: simplecov
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - "~>"
116
102
  - !ruby/object:Gem::Version
117
- version: '0'
103
+ version: '0.16'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - "~>"
124
109
  - !ruby/object:Gem::Version
125
- version: '0'
110
+ version: '0.16'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: simplecov-rcov
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - "~>"
132
116
  - !ruby/object:Gem::Version
133
- version: '0'
117
+ version: '0.2'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - "~>"
140
123
  - !ruby/object:Gem::Version
141
- version: '0'
124
+ version: '0.2'
125
+ - !ruby/object:Gem::Dependency
126
+ name: dotenv
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '2'
142
139
  description: This gem implements the REST API of the Sisow payment provider.
143
140
  email:
144
141
  - mail@marceldegraaf.net
@@ -146,12 +143,11 @@ executables: []
146
143
  extensions: []
147
144
  extra_rdoc_files: []
148
145
  files:
149
- - .gitignore
150
- - .rbenv-version
151
- - .rvmrc
152
- - .travis.yml
146
+ - ".env.example"
147
+ - ".gitignore"
148
+ - ".ruby-version"
149
+ - ".travis.yml"
153
150
  - Gemfile
154
- - Gemfile.lock
155
151
  - README.rdoc
156
152
  - Rakefile
157
153
  - lib/sisow.rb
@@ -168,6 +164,7 @@ files:
168
164
  - lib/sisow/merchant.rb
169
165
  - lib/sisow/payment.rb
170
166
  - lib/sisow/payment/bancontact_payment.rb
167
+ - lib/sisow/payment/credit_card_payment.rb
171
168
  - lib/sisow/payment/ideal_payment.rb
172
169
  - lib/sisow/payment/paypal_payment.rb
173
170
  - lib/sisow/payment/sofort_payment.rb
@@ -190,32 +187,30 @@ files:
190
187
  - spec/models/sisow_spec.rb
191
188
  - spec/models/sofort_payment_spec.rb
192
189
  - spec/models/transaction_request_spec.rb
193
- - spec/sisow.yml.example
194
190
  - spec/spec_helper.rb
195
191
  - spec/vcr_setup.rb
196
192
  homepage: http://github.com/marceldegraaf/sisow
197
193
  licenses: []
194
+ metadata: {}
198
195
  post_install_message:
199
196
  rdoc_options: []
200
197
  require_paths:
201
198
  - lib
202
199
  required_ruby_version: !ruby/object:Gem::Requirement
203
- none: false
204
200
  requirements:
205
- - - ! '>='
201
+ - - ">="
206
202
  - !ruby/object:Gem::Version
207
203
  version: '0'
208
204
  required_rubygems_version: !ruby/object:Gem::Requirement
209
- none: false
210
205
  requirements:
211
- - - ! '>='
206
+ - - ">="
212
207
  - !ruby/object:Gem::Version
213
208
  version: '0'
214
209
  requirements: []
215
210
  rubyforge_project: sisow
216
- rubygems_version: 1.8.23
211
+ rubygems_version: 2.7.3
217
212
  signing_key:
218
- specification_version: 3
213
+ specification_version: 4
219
214
  summary: Rails gem for payments through Sisow.
220
215
  test_files:
221
216
  - spec/models/bancontact_payment_spec.rb
@@ -232,7 +227,5 @@ test_files:
232
227
  - spec/models/sisow_spec.rb
233
228
  - spec/models/sofort_payment_spec.rb
234
229
  - spec/models/transaction_request_spec.rb
235
- - spec/sisow.yml.example
236
230
  - spec/spec_helper.rb
237
231
  - spec/vcr_setup.rb
238
- has_rdoc:
data/.rbenv-version DELETED
@@ -1 +0,0 @@
1
- 1.9.3-p194
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm 1.9.3-p194@sisow
data/Gemfile.lock DELETED
@@ -1,47 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sisow (1.4)
5
- crack
6
- hashie
7
- httpi
8
-
9
- GEM
10
- remote: http://rubygems.org/
11
- specs:
12
- crack (0.3.2)
13
- diff-lcs (1.1.3)
14
- fakeweb (1.3.0)
15
- hashie (1.2.0)
16
- httpi (2.0.0)
17
- rack
18
- multi_json (1.3.5)
19
- rack (1.4.4)
20
- rake (0.9.2.2)
21
- rspec (2.10.0)
22
- rspec-core (~> 2.10.0)
23
- rspec-expectations (~> 2.10.0)
24
- rspec-mocks (~> 2.10.0)
25
- rspec-core (2.10.0)
26
- rspec-expectations (2.10.0)
27
- diff-lcs (~> 1.1.3)
28
- rspec-mocks (2.10.1)
29
- simplecov (0.6.4)
30
- multi_json (~> 1.0)
31
- simplecov-html (~> 0.5.3)
32
- simplecov-html (0.5.3)
33
- simplecov-rcov (0.2.3)
34
- simplecov (>= 0.4.1)
35
- vcr (2.1.1)
36
-
37
- PLATFORMS
38
- ruby
39
-
40
- DEPENDENCIES
41
- fakeweb
42
- rake
43
- rspec
44
- simplecov
45
- simplecov-rcov
46
- sisow!
47
- vcr
@@ -1,5 +0,0 @@
1
- #
2
- # These credentials belong to a testing account in Sisow
3
- #
4
- merchant_id: '2537407799'
5
- merchant_key: '0f9b49d384b4836c543f76d23a923e2cd2cfaec6'