Showing results for 
Search instead for 
Did you mean: 

Having problems with Paypal Java SDK for Encrypted Website Payments


Having problems with Paypal Java SDK for Encrypted Website Payments

I've really been struggling to get working code, good examples...and most importantly, good documentation on how to use Paypal's Java SDK for Encrypting Website Payments.


I went to and downloaded the Paypal Java SDK. Within the zip, there is a ReadMe.txt file with instructions for setup. You can tell that this file, and its components, haven't been updated along with the current version of Java (which is 1.6, update 26) the Readme file indicates a version of 1.4.2.


I went to Bouncy Castle's site - - to download the latest versions of the following jars :







I then went to to download the

Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files


I put all the JARS in the appropriate folders, updated the classpath and then tried to compile the class that came with the Paypal Java SDK.


The compiler tells me that there are deprecated classes, showing me the following errors after recompiling with -Xlint.


.\palmb\servlets\paypal\ warning: [deprecation] addSigner(jav,,java.lang.String) in org.bouncycastle.cms.CMSSignedDataGenerator has been deprecated
                signedGenerator.addSigner( privateKey, certificate, CMSSignedDataGenerator.DIGEST_SHA1 );
.\palmb\servlets\paypal\ warning: [unchecked] unchecked call
 to add(E) as a member of the raw type java.util.ArrayList
.\palmb\servlets\paypal\ warning: [deprecation] addCertificatesAndCRLs( in org.bouncycastle.cms.CMSSignedGenerator has been deprecated
.\palmb\servlets\paypal\ warning: [deprecation] generate(org.bouncycastle.cms.CMSProcessable,boolean,java.lang.String) in org.bouncycastle.cms.CMSSignedDataGenerator has been deprecated
                CMSSignedData signedData = signedGenerator.generate(cmsByteArray, true, "BC");
.\palmb\servlets\paypal\ warning: [deprecation] addKeyTransRecipient( in org.bouncycastle.cms.CMSEnvelopedGenerator has been deprecated  envGenerator.addKeyTransRecipient(payPalCert);
.\palmb\servlets\paypal\ warning: [deprecation] generate(org.bouncycastle.cms.CMSProcessable,java.lang.String,java.lang.String) in org.bouncycastle.cms.CMSEnvelopedDataGenerator has been deprecated
                CMSEnvelopedData envData = envGenerator.generate( new CMSProcessableByteArray(signed),
6 warnings



I have Java 1.6 running on my machine. Why hasn't Paypal upgraded their Java SDK??


So then, what are my options at this point? I need help.


Re: Having problems with Paypal Java SDK for Encrypted Website Payments



Doesn't anybody have any help they can provide to my problem?

Volunteer Advisor

Re: Having problems with Paypal Java SDK for Encrypted Website Payments

Hello Katura,


You have very good questions, however PayPal does have a Developer Forum that would be able to better answer your questions. Here is a direct link. I hope this will help.


Smiley HappyMisty