jonathantron-paypal 3.0.0pre2 → 3.0.0pre3

Sign up to get free protection for your applications and to get access to all the features.
@@ -150,7 +150,7 @@ module Paypal
150
150
  # Sign the data with our key/certificate pair
151
151
  signed = OpenSSL::PKCS7::sign(business_cert, business_key, data, [], OpenSSL::PKCS7::BINARY)
152
152
  # Encrypt the signed data with Paypal's public certificate.
153
- encrypted = OpenSSL::PKCS7::encrypt([paypal_cert], signed.to_der, OpenSSL::Cipher::Cipher::new("DES3"), OpenSSL::PKCS7::BINARY)
153
+ encrypted = OpenSSL::PKCS7::encrypt([paypal_cert], signed.to_der, OpenSSL::Cipher::Cipher::new("DES3"), OpenSSL::PKCS7::BINARY).to_s.gsub("\n", "")
154
154
 
155
155
  # The command for encrypted forms is always '_s-xclick'; the real command is in the encrypted data.
156
156
  buttons << %Q{<input type="hidden" name="cmd" value="_s-xclick" />}
@@ -1,3 +1,3 @@
1
1
  module Paypal
2
- VERSION = "3.0.0pre2"
2
+ VERSION = "3.0.0pre3"
3
3
  end
@@ -42,6 +42,7 @@ describe Paypal::Helpers::Common do
42
42
  end
43
43
  it "should include cmd with encrypted datas" do
44
44
  @result.should have_css("input[type=hidden][name=encrypted][value*=PKCS7]")
45
+ @result.should_not have_css("input[type=hidden][name=encrypted][value*='\n']")
45
46
  end
46
47
  end
47
48
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 0
8
- - 0pre2
9
- version: 3.0.0pre2
8
+ - 0pre3
9
+ version: 3.0.0pre3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jonathan Tron