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 https://www.paypal.com/us/cgi-bin/?cmd=p/xcl/rec/ewp-code 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)....as the Readme file indicates a version of 1.4.2. I went to Bouncy Castle's site - http://www.bouncycastle.org/latest_releases.html - to download the latest versions of the following jars : bcmail-jdk16-146.jar bcpg-jdk16-146.jar bcprov-jdk16-146.jar bctest-jdk16-146.jar I then went to http://www.oracle.com/technetwork/java/javase/downloads/index.html 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 ClientSide.java 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\ClientSide.java:98: warning: [deprecation] addSigner(jav a.security.PrivateKey,java.security.cert.X509Certificate,java.lang.String) in org.bouncycastle.cms.CMSSignedDataGenerator has been deprecated signedGenerator.addSigner( privateKey, certificate, CMSSignedDataGenerator.DIGEST_SHA1 ); ^ .\palmb\servlets\paypal\ClientSide.java:101: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList certList.add(certificate); ^ .\palmb\servlets\paypal\ClientSide.java:103: warning: [deprecation] addCertificatesAndCRLs(java.security.cert.CertStore) in org.bouncycastle.cms.CMSSignedGenerator has been deprecated signedGenerator.addCertificatesAndCRLs(certStore); ^ .\palmb\servlets\paypal\ClientSide.java:110: 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\ClientSide.java:115: warning: [deprecation] addKeyTransRecipient(java.security.cert.X509Certificate) in org.bouncycastle.cms.CMSEnvelopedGenerator has been deprecated envGenerator.addKeyTransRecipient(payPalCert); ^ .\palmb\servlets\paypal\ClientSide.java:116: 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.
... View more