sisow 0.9.9 → 1.0.0

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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sisow (0.9.5)
4
+ sisow (0.9.9)
5
5
  hashie
6
6
  httparty
7
7
 
@@ -0,0 +1,9 @@
1
+ module Sisow
2
+ class PaypalPayment < Sisow::Payment
3
+
4
+ def payment_method
5
+ 'paypalec'
6
+ end
7
+
8
+ end
9
+ end
data/lib/sisow/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sisow
2
- VERSION = "0.9.9"
2
+ VERSION = "1.0.0"
3
3
  end
data/lib/sisow.rb CHANGED
@@ -11,6 +11,7 @@ require 'sisow/payment'
11
11
  require 'sisow/payment/ideal_payment'
12
12
  require 'sisow/payment/bancontact_payment'
13
13
  require 'sisow/payment/sofort_payment'
14
+ require 'sisow/payment/paypal_payment'
14
15
  require 'sisow/merchant'
15
16
  require 'sisow/api/request'
16
17
  require 'sisow/api/request/directory_request'
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+
3
+ describe Sisow::PaypalPayment do
4
+
5
+ before :each do
6
+ @payment = Sisow::PaypalPayment.new(
7
+ :purchase_id => 'Order 123',
8
+ :issuer_id => '99',
9
+ :description => 'Payment description',
10
+ :entrance_code => 'entrancecode',
11
+ :return_url => 'http://example.com/return',
12
+ :cancel_url => 'http://example.com/cancel',
13
+ :callback_url => 'http://example.com/callback',
14
+ :notify_url => 'http://example.com/notify',
15
+ :amount => 1299
16
+ )
17
+ end
18
+
19
+ it "should have the 'paypal' payment method" do
20
+ @payment.payment_method.should == 'paypalec'
21
+ end
22
+
23
+ it "should request a payment URL with the Sisow API" do
24
+ VCR.use_cassette("paypal_payment") do
25
+ @payment.payment_url.should =~ /https:\/\/www\.sisow\.nl\/Sisow\/iDeal\/Simulator\.aspx/
26
+ end
27
+ end
28
+
29
+ it "should contain a transaction ID from Sisow" do
30
+ VCR.use_cassette("paypal_payment") do
31
+ @payment.transaction_id.should =~ /TEST\d{11}/
32
+ end
33
+ end
34
+
35
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sisow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-13 00:00:00.000000000 Z
12
+ date: 2012-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -152,6 +152,7 @@ files:
152
152
  - lib/sisow/payment.rb
153
153
  - lib/sisow/payment/bancontact_payment.rb
154
154
  - lib/sisow/payment/ideal_payment.rb
155
+ - lib/sisow/payment/paypal_payment.rb
155
156
  - lib/sisow/payment/sofort_payment.rb
156
157
  - lib/sisow/ping.rb
157
158
  - lib/sisow/version.rb
@@ -166,6 +167,7 @@ files:
166
167
  - spec/models/issuer_spec.rb
167
168
  - spec/models/merchant_spec.rb
168
169
  - spec/models/payment_spec.rb
170
+ - spec/models/paypal_payment_spec.rb
169
171
  - spec/models/ping_spec.rb
170
172
  - spec/models/request_spec.rb
171
173
  - spec/models/sisow_spec.rb
@@ -207,6 +209,7 @@ test_files:
207
209
  - spec/models/issuer_spec.rb
208
210
  - spec/models/merchant_spec.rb
209
211
  - spec/models/payment_spec.rb
212
+ - spec/models/paypal_payment_spec.rb
210
213
  - spec/models/ping_spec.rb
211
214
  - spec/models/request_spec.rb
212
215
  - spec/models/sisow_spec.rb