ideal-mollie 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ - **26 January 2012**: version 0.0.4
4
+ - Changed property `payed` to `paid`
5
+
3
6
  - **26 January 2012**: version 0.0.3
4
7
  - Added `Bank`, `Order` and `OrderResult`. Should be easier then hashes.
5
8
  - Added example to the README
data/README.md CHANGED
@@ -34,12 +34,13 @@ git clone --depth 1 git://github.com/manuelvanrijn/ideal-mollie.git ideal-mollie
34
34
 
35
35
  Add the following config parameters to your environment config file
36
36
 
37
- ```yaml
37
+ ```
38
38
  config.ideal_mollie.partner_id = 123456
39
39
  config.ideal_mollie.report_url = "http://example.org/report"
40
40
  config.ideal_mollie.return_url = "http://example.org/return"
41
41
  config.ideal_mollie.test_mode = false
42
42
  ```
43
+
43
44
  ## Rails Example
44
45
 
45
46
  Below you will find a simple `TransactionController` and a view to display the bank selectbox. Note that this is just a very basic example.
@@ -75,23 +76,23 @@ class TransactionsController < ApplicationController
75
76
  transaction_id = params[:transaction_id]
76
77
  response = IdealMollie.check_order(transaction_id)
77
78
 
78
- if response.payed
79
- # TODO: store the result information for the payed payment
79
+ if response.paid
80
+ # TODO: store the result information for the paid payment
80
81
  # For example:
81
82
  # my_order = MyOrder.find_by_transaction_id(transaction_id)
82
- # my_order.payed = true
83
- # my_order.payed_on = Time.now
83
+ # my_order.paid = true
84
+ # my_order.paid_on = Time.now
84
85
  # my_order.customer_name = response.customer_name
85
86
  # my_order.customer_account = response.customer_account
86
87
  # my_order.customer_city = response.customer_city
87
88
  # my_order.save
88
89
  else
89
90
  # canceled or re-checking?
90
- if my_order.payed.nil?
91
+ if my_order.paid.nil?
91
92
  # TODO: store the result information for the canceled payment
92
93
  # For example:
93
94
  # my_order = MyOrder.find_by_transaction_id(transaction_id)
94
- # my_order.payed = false
95
+ # my_order.paid = false
95
96
  # my_order.save
96
97
  end
97
98
  end
@@ -102,7 +103,7 @@ class TransactionsController < ApplicationController
102
103
  # TODO show the result
103
104
  # For example:
104
105
  # my_order = MyOrderObject.find(id)
105
- #if @my_order.payed
106
+ #if @my_order.paid
106
107
  render :text => "Thank you for your payment."
107
108
  else
108
109
  render :text => "Transaction has been cancelled or couldn't complete"
data/lib/ideal-mollie.rb CHANGED
@@ -66,7 +66,7 @@ module IdealMollie
66
66
  # @example
67
67
  # IdealMollie.check_order("4b99662febb42ce6f889d9c57f5cf3fa")
68
68
  #
69
- # @note Once a transaction is payed, only the next time you verify the
69
+ # @note Once a transaction is paid, only the next time you verify the
70
70
  # transaction will the value of +payed+ be +true+.
71
71
  # Else it will be +false+.
72
72
  #
@@ -4,7 +4,7 @@ module IdealMollie
4
4
  #
5
5
  # @example
6
6
  # Bank.new({
7
- # :bank_id => "0031"
7
+ # :bank_id => "0031",
8
8
  # :bank_name => "ABN AMRO"
9
9
  # })
10
10
  class Bank
@@ -4,10 +4,10 @@ module IdealMollie
4
4
  #
5
5
  # @example
6
6
  # Order.new({
7
- # :transaction_id => "c9f93e5c2bd6c1e7c5bee5c5580c6f83"
7
+ # :transaction_id => "c9f93e5c2bd6c1e7c5bee5c5580c6f83",
8
8
  # :amount => "1000",
9
- # :currency => "EUR"
10
- # :url => "https://www.abnamro.nl/nl/ideal/identification.do?randomizedstring=8433910909&trxid=30000217841224"
9
+ # :currency => "EUR",
10
+ # :url => "https://www.abnamro.nl/nl/ideal/identification.do?randomizedstring=8433910909&trxid=30000217841224",
11
11
  # :message => "Your iDEAL-payment has successfully been setup. Your customer should visit the given URL to make the payment"
12
12
  # })
13
13
  #
@@ -18,8 +18,8 @@ module IdealMollie
18
18
  # :status => "Expired"
19
19
  # })
20
20
  class OrderResult < Order
21
- # @return [Boolean] Order was payed.
22
- attr_accessor :payed
21
+ # @return [Boolean] Order was paid.
22
+ attr_accessor :paid
23
23
  # @return [String] The name of the customer.
24
24
  attr_accessor :customer_name
25
25
  # @return [String] The bankaccount number of the customer.
@@ -38,7 +38,7 @@ module IdealMollie
38
38
 
39
39
  super(values)
40
40
 
41
- @payed = values["payed"] == "true" ? true : false if values.has_key?("payed")
41
+ @paid = values["payed"] == "true" ? true : false if values.has_key?("payed")
42
42
  @status = values["status"].to_s if values.has_key?("status")
43
43
 
44
44
  if values.has_key?("consumer")
@@ -1,4 +1,4 @@
1
1
  module IdealMollie
2
2
  # Version number of IdealMollie
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
@@ -50,19 +50,19 @@ describe IdealMollie do
50
50
  order_result.transaction_id.should eq "c9f93e5c2bd6c1e7c5bee5c5580c6f83"
51
51
  order_result.amount.should eq 1000
52
52
  order_result.currency.should eq "EUR"
53
- order_result.payed.should eq false
53
+ order_result.paid.should eq false
54
54
  order_result.message.should eq "This iDEAL-order wasn't payed for, or was already checked by you. (We give payed=true only once, for your protection)"
55
55
  order_result.status.should eq "CheckedBefore"
56
56
  end
57
57
  end
58
58
 
59
- it "should mark the OrderResult as payed and contain the customer information when called by mollie" do
59
+ it "should mark the OrderResult as paid and contain the customer information when called by mollie" do
60
60
  VCR.use_cassette("check_order") do
61
61
  order_result = IdealMollie.check_order("482d599bbcc7795727650330ad65fe9b")
62
62
  order_result.transaction_id.should eq "482d599bbcc7795727650330ad65fe9b"
63
63
  order_result.amount.should eq 1000
64
64
  order_result.currency.should eq "EUR"
65
- order_result.payed.should eq true
65
+ order_result.paid.should eq true
66
66
  order_result.message.should eq "This iDEAL-order has successfuly been payed for, and this is the first time you check it."
67
67
 
68
68
  order_result.customer_name.should eq "Hr J Janssen"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ideal-mollie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-26 00:00:00.000000000 Z
12
+ date: 2012-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &12831420 !ruby/object:Gem::Requirement
16
+ requirement: &17571080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *12831420
24
+ version_requirements: *17571080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: vcr
27
- requirement: &12830360 !ruby/object:Gem::Requirement
27
+ requirement: &17585420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *12830360
35
+ version_requirements: *17585420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: fakeweb
38
- requirement: &12829240 !ruby/object:Gem::Requirement
38
+ requirement: &17584460 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *12829240
46
+ version_requirements: *17584460
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: yard
49
- requirement: &12828120 !ruby/object:Gem::Requirement
49
+ requirement: &17583660 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *12828120
57
+ version_requirements: *17583660
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: redcarpet
60
- requirement: &12826860 !ruby/object:Gem::Requirement
60
+ requirement: &17582880 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *12826860
68
+ version_requirements: *17582880
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
- requirement: &12825560 !ruby/object:Gem::Requirement
71
+ requirement: &17582100 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *12825560
79
+ version_requirements: *17582100
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rake
82
- requirement: &12824660 !ruby/object:Gem::Requirement
82
+ requirement: &17581020 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 0.9.0
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *12824660
90
+ version_requirements: *17581020
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: faraday
93
- requirement: &12837640 !ruby/object:Gem::Requirement
93
+ requirement: &17579760 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 0.7.6
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *12837640
101
+ version_requirements: *17579760
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: faraday_middleware
104
- requirement: &12836900 !ruby/object:Gem::Requirement
104
+ requirement: &17578880 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 0.8.1
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *12836900
112
+ version_requirements: *17578880
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: multi_xml
115
- requirement: &12834660 !ruby/object:Gem::Requirement
115
+ requirement: &17593740 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 0.4.1
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *12834660
123
+ version_requirements: *17593740
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: nokogiri
126
- requirement: &12848640 !ruby/object:Gem::Requirement
126
+ requirement: &17592060 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,7 +131,7 @@ dependencies:
131
131
  version: 1.5.0
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *12848640
134
+ version_requirements: *17592060
135
135
  description: A simple Ruby implementation for handeling iDeal transactions with the
136
136
  Mollie API
137
137
  email:
@@ -180,7 +180,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
180
180
  version: '0'
181
181
  segments:
182
182
  - 0
183
- hash: -3816386497103677641
183
+ hash: -2711657379205421306
184
184
  required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  none: false
186
186
  requirements:
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  segments:
191
191
  - 0
192
- hash: -3816386497103677641
192
+ hash: -2711657379205421306
193
193
  requirements: []
194
194
  rubyforge_project: ideal-mollie
195
195
  rubygems_version: 1.8.11