sisow 0.9.0 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
- lib/sisow.yml
5
+ spec/sisow.yml
6
6
  coverage/
7
7
  spec/vcr_cassettes
8
+ .rvmrc
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
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
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in sisow.gemspec
4
4
  gemspec
5
+
6
+ group :test do
7
+ gem 'rake'
8
+ end
data/README.rdoc CHANGED
@@ -1,4 +1,5 @@
1
1
  = Sisow
2
+ {<img src="https://secure.travis-ci.org/marceldegraaf/sisow.png" />}[http://travis-ci.org/marceldegraaf/sisow]
2
3
 
3
4
  *NOTE* This gem is work in progress. I'm planning to have it ready somewhere in March.
4
5
 
@@ -22,7 +23,7 @@ And update your bundle with <tt>bundle install</tt>
22
23
 
23
24
  To be able to use the gem, you must first configure it. If you're on Rails, insert the following code in <tt>config/initializers/sisow.rb</tt>:
24
25
 
25
- Sisow.setup do |config|
26
+ Sisow.configure do |config|
26
27
  config.merchant_key = 'your-merchant-key'
27
28
  config.merchant_id = 'your-merchant-id'
28
29
 
@@ -57,7 +58,7 @@ Setting up a payment looks like this:
57
58
  :issuer_id => '99', # the issuer id from the previous step
58
59
  :description => 'Acme Inc. payment', # description of this payment
59
60
  :amount => 1299, # amount in Euro in cents
60
- :entrance_code => 'foobar-foxtrot', # a verification code you can choose. Cannot contain spaces
61
+ :entrance_code => 'foobarfoxtrot', # internal verification code of your choice
61
62
  :return_url => 'http://example.com', # where the user is sent after the payment
62
63
  :cancel_url => 'http://example.com', # where the user is sent when he cancels the payment
63
64
  :callback_url => 'http://example.com', # where a failed (not cancelled) payment will be reported
data/Rakefile CHANGED
@@ -1,2 +1,11 @@
1
1
  require 'bundler'
2
+ require 'rspec/core/rake_task'
3
+
2
4
  Bundler::GemHelper.install_tasks
5
+
6
+ desc 'Default: run specs.'
7
+ task :default => :spec
8
+
9
+ desc "Run specs"
10
+ RSpec::Core::RakeTask.new do |t|
11
+ end
@@ -7,7 +7,7 @@ module Sisow
7
7
  end
8
8
 
9
9
  def params
10
- default_params
10
+ {}
11
11
  end
12
12
 
13
13
  def clean(response)
@@ -25,7 +25,6 @@ module Sisow
25
25
  def default_params
26
26
  {
27
27
  :merchantid => Sisow.configuration.merchant_id,
28
- :merchantkey => Sisow.configuration.merchant_key,
29
28
  :test => Sisow.configuration.test_mode_enabled?? test_mode_param : nil
30
29
  }
31
30
  end
@@ -38,7 +37,7 @@ module Sisow
38
37
  private
39
38
 
40
39
  def can_perform?
41
- !Sisow.configuration.merchant_id.empty? && !Sisow.configuration.merchant_key.empty?
40
+ !(Sisow.configuration.merchant_id.nil? || Sisow.configuration.merchant_id.empty?) && !(Sisow.configuration.merchant_key.nil? || Sisow.configuration.merchant_key.empty?)
42
41
  end
43
42
 
44
43
  def uri
@@ -29,5 +29,13 @@ module Sisow
29
29
  @debug_mode == true
30
30
  end
31
31
 
32
+ def merchant_key=(merchant_key)
33
+ @merchant_key = merchant_key.to_s
34
+ end
35
+
36
+ def merchant_id=(merchant_id)
37
+ @merchant_id = merchant_id.to_s
38
+ end
39
+
32
40
  end
33
41
  end
data/lib/sisow/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sisow
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.3"
3
3
  end
@@ -21,5 +21,15 @@ describe Sisow::Configuration do
21
21
  @configuration.debug_mode_enabled?.should == true
22
22
  end
23
23
 
24
+ it "should always save merchant_key as string" do
25
+ @configuration.merchant_key = 123
26
+ @configuration.merchant_key.should == '123'
27
+ end
28
+
29
+ it "should always save merchant_id as string" do
30
+ @configuration.merchant_id = 123
31
+ @configuration.merchant_id.should == '123'
32
+ end
33
+
24
34
 
25
35
  end
@@ -1,2 +1,5 @@
1
- merchant_id: '1234567890'
2
- merchant_key: '1234567890abcdefg1234567890'
1
+ #
2
+ # These credentials belong to a testing account in Sisow
3
+ #
4
+ merchant_id: '2537407799'
5
+ merchant_key: '0f9b49d384b4836c543f76d23a923e2cd2cfaec6'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sisow
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.0
5
+ version: 0.9.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Marcel de Graaf
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-03-10 00:00:00 +01:00
13
+ date: 2012-03-16 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -90,6 +90,7 @@ extra_rdoc_files: []
90
90
 
91
91
  files:
92
92
  - .gitignore
93
+ - .travis.yml
93
94
  - Gemfile
94
95
  - README.rdoc
95
96
  - Rakefile
@@ -125,7 +126,6 @@ files:
125
126
  - spec/models/sisow_spec.rb
126
127
  - spec/models/sofort_payment_spec.rb
127
128
  - spec/models/transaction_request_spec.rb
128
- - spec/sisow.yml
129
129
  - spec/sisow.yml.example
130
130
  - spec/spec_helper.rb
131
131
  - spec/vcr_setup.rb
@@ -171,7 +171,6 @@ test_files:
171
171
  - spec/models/sisow_spec.rb
172
172
  - spec/models/sofort_payment_spec.rb
173
173
  - spec/models/transaction_request_spec.rb
174
- - spec/sisow.yml
175
174
  - spec/sisow.yml.example
176
175
  - spec/spec_helper.rb
177
176
  - spec/vcr_setup.rb
data/spec/sisow.yml DELETED
@@ -1,2 +0,0 @@
1
- merchant_id: '2537388949'
2
- merchant_key: '4553175f82004fcbf9d0582466a1e731a4357b21'