dbalatero-remit 0.0.2.5 → 0.0.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,9 +3,12 @@ require 'openssl/digest'
3
3
 
4
4
  module Remit
5
5
  # Encapsulates the logic for IPN request validation and attribute retrieval.
6
+ #
7
+ # Note: if your responses from Amazon are not validating, please
8
+ # pass the 'version' parameter to your original CBUI request.
6
9
  class IpnRequest
7
10
  # Signature key name used by AmazonFPS IPNs
8
- SIGNATURE_KEY = 'awsSignature'
11
+ SIGNATURE_KEY = 'signature'
9
12
 
10
13
  # +params+ should be your controllers request parameters.
11
14
  def initialize(params, secret_key)
@@ -4,7 +4,6 @@ describe 'an IPN request' do
4
4
  before(:each) do
5
5
  @request_params = {
6
6
  "action" => "notice",
7
- "awsSignature" => "DA7ZbuQaBDt2/+Mty9XweJyqI1E=",
8
7
  "buyerName" => "Fps Buyer",
9
8
  "callerReference" => "4-8-1-3.5",
10
9
  "controller" => "amazon_fps/ipn",
@@ -12,12 +11,14 @@ describe 'an IPN request' do
12
11
  "paymentMethod" => "CC",
13
12
  "recipientEmail" => "recipient@email.url",
14
13
  "recipientName" => "Fps Business",
14
+ "signature" => "DA7ZbuQaBDt2/+Mty9XweJyqI1E=",
15
15
  "status" => "SUCCESS",
16
16
  "transactionAmount" => "USD 3.50",
17
17
  "transactionDate" => "1224687134",
18
18
  "transactionId" => "13KIGL9RC25853BGPPOS2VSKBKF2JERR3HO"
19
19
  }
20
- @request = Remit::IpnRequest.new(@request_params, 'THISISMYTESTKEY')
20
+ @test_key = 'THISISMYTESTKEY'
21
+ @request = Remit::IpnRequest.new(@request_params, @test_key)
21
22
  end
22
23
 
23
24
  it 'should be a valid request' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbalatero-remit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.5
4
+ version: 0.0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Hunt