sage_pay 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/sage_pay/server/transaction_notification.rb +8 -0
- data/lib/sage_pay.rb +1 -1
- data/sage_pay.gemspec +1 -1
- data/spec/sage_pay_spec.rb +2 -2
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -177,6 +177,14 @@ module SagePay
|
|
177
177
|
def valid_signature?
|
178
178
|
@calculated_hash == vps_signature
|
179
179
|
end
|
180
|
+
|
181
|
+
def response(redirect_url)
|
182
|
+
if valid_signature?
|
183
|
+
SagePay::Server::TransactionNotificationResponse.new(:status => :ok, :redirect_url => redirect_url)
|
184
|
+
else
|
185
|
+
SagePay::Server::TransactionNotificationResponse.new(:status => :invalid, :redirect_url => redirect_url, :status_detail => "Signature did not match our expectations")
|
186
|
+
end.response
|
187
|
+
end
|
180
188
|
end
|
181
189
|
end
|
182
190
|
end
|
data/lib/sage_pay.rb
CHANGED
data/sage_pay.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
## If your rubyforge_project name is different, then edit it and comment out
|
8
8
|
## the sub! line in the Rakefile
|
9
9
|
s.name = 'sage_pay'
|
10
|
-
s.version = '0.2.
|
10
|
+
s.version = '0.2.4'
|
11
11
|
s.date = '2010-04-25'
|
12
12
|
s.rubyforge_project = 'sage_pay'
|
13
13
|
|
data/spec/sage_pay_spec.rb
CHANGED