简体   繁体   中英

encrypt paypal buy now button html form

I've a classic paypal buynow button form in html. I need to encrypt the form to hide the parameters like amount or seller email data...

<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>

I've my private key and public certificate generated with openssl, and I've also the cert_Id of paypal and the relative paypal_public_certificate, but I'm not able at all to encrypt my html form, I've only found this command line on paypal site:

" PPEncrypt CertFile PrivKeyFile PPCertFile InputFile OutputFile "

Ther reference page for these information is on the paypal site at the address: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/encryptedwebpayments/

but I don't know how to use it...

does anyone know how to encrypt the form using the command line provided by paypal, a kind of step by step guide if it's possible?

many regards helping me

The command line " PPEncrypt CertFile PrivKeyFile PPCertFile InputFile OutputFile " breaks down to the following components:

  • PPEncrypt - PayPal's encryption algorithm
  • CertFile - The pathname to your own public certificate
  • PKCS12File - The pathname to the PKCS12-format of your own public certificate
  • PPCertFile - The pathname to a copy of the PayPal public certificate
  • Password - The passphrase to the PKCS12-format of your own public certificate
  • InputFile - The pathname to file containing the non-encrypted Website Payments HTML Form variables
  • OutputFile - A file name for the encrypted output [Sandbox] The optional word Sandbox that lets you test payment buttons in the PayPal Sandbox that you protected with Encrypted Website Payments

However, you may want to opt for a button hosted by PayPal , as hosting means that you won't have to re-generate the certificates each time the form parameters are updated.

Hope this helps! :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM