douzi9211 2014-01-07 14:07
浏览 41
已采纳

如何在共享服务器网站中创建加密的paypal按钮?

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?

  • 写回答

1条回答 默认 最新

  • duanlongling5308 2014-01-07 17:31
    关注

    This is a bit lengthy procedure. But easy.

    1. Download OpenSSL and install. Link to download OpenSSL.

    2. Generate your private key and public certificate as mentioned in the PayPal.com documentation.

    3. Now upload your public certificate to PayPal.com

    4. Download the PayPal public certificate from their website. (usually it will be with extension .txt and rename by yourself to .pem)

    5. Now upload all the 3 .pem files to your website using FTP or file manager.

    6. 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.)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度