is it possible to use any html encrypter to encrypt paypal html code?
I have an html pay now button (buy now) i have to host it on my own server and remove the protection in order for it to do what i want it to do, (a programmer who works at paypal told me what i have to do, so i can't argue with him)
now that the button works just how i want it to work, I need to encrypt it, I've been googling for a about 2 weeks or so, and i found many ways to get the job done, but i want the best and simplest way to encrypt it, because i'm new to the paypal world so i don't want to follow a tutorial that would take me a month to understand
does the standard html encrypt, do the job? I doubt that but i have to ask it anyway. If there's a simple way to do it in the server side, I'll be so happy
What do I mean by simple?
I don't mind following a long step by step tutorial to get it done, as long as it is a step by step tutorial
EDIT
Here's the code of my button (i have changed it a bit but you can see everything you need to know)
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="KU515658J">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="amount" value="5">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynow_SM.gif:NonHosted">
<table>
<tr><td><input type="hidden" name="on0" value="example">example</td></tr><tr><td><input type="text" name="os0" maxlength="200"></td></tr>
</table>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynow_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
As I said I had to remove the code protection so now you can see the value, using firebug or开发者_如何学Python google chrome inspect element tool, or whatever and all you need is to change it, it doesn't take a hacker to do it
<input type="hidden" name="amount" value="5">
By the way my website is in php
If you can make an API call using PHP/cURL, use the Button Manager API
You can call the 'create button' API and tell PayPal to make an encrypted button for you with all the variables and values you want.
- Button Manager API
Otherwise, use Encrypted Website Payments
This will use your server's resources to encrypt the button, and you will need to find a way to code a solution to encrypt the PayPal button before generating it (also requiring PHP or other server side scripting languages).
- Encrypted Website Payments
Do you need to encrypt the button HTML, or the data it sends?
In relation to the former: there will always be around HTML encryption; you can't actually encrypt HTML in a secure way - someone will always find a way round your encryption as HTML has to be parseable by the browser.
In the latter case, PayPal uses https://
and SSL when sending data to it's server, so that's (nearly) as safe as it gets. The data is encrypted so packet sniffers have a hard time figuring out what's going on. If you look at the PayPal form code, you'll see that not a lot of information is sent, the most vulnerable being an ID that is verified by PayPal anyway.
PayPal and the like put a lot of work into security. You shouldn't be worrying about "encrypting" your HTML.
You have a syntax error in this piece of code <td><input type="hidden" name="on0" value="example button"</td>
- you need a >
after "example button"
. In relation to being able to change the value, you should check on the PayPal side of things to see if PayPal validates the value server-side. If it doesn't, there isn't a way to make this any more secure and is a huge issue on PayPal's part.
精彩评论