我有一个经典的 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/