Solved

Create an encrytped PayPal button

Posted on 2014-04-09
5
248 Views
Last Modified: 2016-03-24
I must be brain dead. I found this paypal code for sending the items of a shopping cart to paypal.  Works great, but one problem.  See where it says you should be using an encrypted button?  I tried making a new button at paypal, but it always asks me to enter a price.


Important: The example button code shown below is unencrypted for illustrative purposes only. In reality, you must always use encrypted or hosted buttons in your web pages to prevent malicious users from tampering with the code. See Securing Your PayPal Payments Standard Buttons for instructions.

HTML for Passing Individual Item Detail to PayPal

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="seller@dezignerfotos.com">
<input type="hidden" name="item_name_1" value="Item Name 1">
<input type="hidden" name="amount_1" value="1.00">
<input type="hidden" name="shipping_1" value="1.75">
<input type="hidden" name="item_name_2" value="Item Name 2">
<input type="hidden" name="amount_2" value="2.00">
<input type="hidden" name="shipping_2" value="2.50">
<input type="submit" value="PayPal">
</form>

Open in new window

0
Comment
Question by:rrhandle8
  • 3
  • 2
5 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39990837
That's right, one Button for each item with a specific price.  To use a different price and description each time, you would have to use Paypal Express Checkout which is a pretty complicated procedure involving multiple pages.
0
 

Author Comment

by:rrhandle8
ID: 39992328
I have a shopping cart script.  I can read the contents, and put together form like the one above.  Click the button, and I end up at PayPal with all the individual items listed there.  Exactly what I want.  My concern is the "Important" selection in my first post.  It says you should be using an encrypted button.  Do you see the problem?
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39992618
The only problem is that you are not using Paypal's recommended methods.  They really don't want you putting things in a shopping cart that way (unencrypted) because other people can view and steal your code.  The Express Checkout obscures all the details so they can't be seen but it's a lot more work.
0
 

Author Comment

by:rrhandle8
ID: 39992706
OK.  It looks like you are saying I have to use the Express Checkout to do this the way I want.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39992719
No, you have to use Express Checkout to do it the way that Paypal wants.  What you are doing is a whole lot easier than Express Checkout.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question