Learning and trying to use PayPal.
I have a PHP and MySQL based products website where the PayPal Add to cart button is used. I have dynamic number of products so that I could not use saved buttons. I found using unencrypted buttons are unsafe since users could change the value before checkout.
In their documentation they have asked some certificates, private key and all. To be honest I have no idea about these and didn't understand their documentation completely.
But my website uses SSL. Is there any way that I can encrypt the buttons inside by website using PHP? Since I use a shared hosting I fear I could not follow the procedure PayPal suggests.
If there is no solution based on my problem definition what other procedure I have to follow?
This is a bit lengthy procedure. But easy.
Download OpenSSL and install. Link to download OpenSSL.
Generate your private key and public certificate as mentioned in the PayPal.com documentation.
Now upload your public certificate to PayPal.com
Download the PayPal public certificate from their website. (usually it will be with extension .txt and rename by yourself to .pem)
Now upload all the 3 .pem files to your website using FTP or file manager.
Ad you do not need any Java or Windows software as PayPal.com suggested. You can do it with PHP itself. A sample is here.
NOTE: Private key and Public certificate will be stored as my-prvkey.pem and pubcert.pem inside openssl/bin folder. (Do not use as my?pubcert.pem as described there. Many times it will throw error.)