php - 加密 Paypal 立即购买按钮html表单

标签 php html forms encryption paypal

我有一个经典的 html Paypal 立即购买按钮表单。我需要加密表格以隐藏数量或卖家电子邮件数据等参数...

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="+++++++++">
<input type="hidden" name="lc" value="IT">
<input type="hidden" name="on0" value="DESCRIPTION">
<input type="hidden" name="os0" value="PAYMENT OBJECT n.<?php echo $_SESSION["ordernumber"]; ?>">
<input type="hidden" name="item_name" value="PAYMENT ORDER n. <?php echo $_SESSION["ordernumber"]; ?>">
<input type="hidden" name="item_number" value="VSTCB">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="amount" value="<?php echo $topaypal; ?>">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="return" value="www.++++++.com/ok.php">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<input type="image" src="https://www.paypalobjects.com/it_IT/IT/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal è il metodo rapido e sicuro per pagare e farsi pagare online.">
<img alt="" border="0" src="https://www.paypalobjects.com/it_IT/i/scr/pixel.gif" width="1" height="1">
</form>

我的私钥和公共(public)证书是用 openssl 生成的,我还有 paypal 的 cert_Id 和相关的 paypal_public_certificate,但我根本无法加密我的 html 表单,我只找到了这个 Paypal 网站上的命令行:

PPEncrypt CertFile PrivKeyFile PPCertFile InputFile OutputFile

这些信息的引用页面位于 paypal 站点上,地址为: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/encryptedwebpayments/

但是我不知道怎么用...

有谁知道如何使用 paypal 提供的命令行加密表单,如果可能的话,这是一种分步指南?

很多帮助我的问候

最佳答案

命令行“PPEncrypt CertFile PrivKeyFile PPCertFile InputFile OutputFile”分解为以下组件:

  • PPEncrypt - PayPal 的加密算法
  • CertFile - 您自己的公共(public)证书的路径名
  • PKCS12File - 您自己的公共(public)证书的 PKCS12 格式的路径名
  • PPCertFile - PayPal 公共(public)证书副本的路径名
  • 密码 - 您自己的公共(public)证书的 PKCS12 格式的密码
  • InputFile - 包含未加密网站支付 HTML 表单变量的文件的路径名
  • OutputFile - 加密输出的文件名 [沙盒] 可选词沙盒,可让您在使用加密网站支付保护的 PayPal 沙盒中测试支付按钮

但是,您可能希望选择 button hosted by PayPal ,因为托管意味着您不必在每次更新表单参数时都重新生成证书。

希望对您有所帮助! :)

关于php - 加密 Paypal 立即购买按钮html表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45133620/

相关文章:

javascript - 如何将 'selective-input' 设置为 Angular 中的表单字段?

JQuery Mobile - 内联显示 HTML 表单

php - switch 语句多变量赋值不重复

php - 在 mysql-php 中出现语法错误。您的 SQL 语法有误;

javascript - 单击时如何使我更改为另一个图像的图像?

html - 如何发送多个数据(conn :send()) with the new SDK (NodeMCU)

jquery - 将最小字段值保持为 1

php - 填充空提交结果 mysql php

php - register_shutdown_function() 和 set_error_handler() 可以捕获相同的错误吗?

javascript - 重定向视频完成网页