Solved

One Page Cart PHP google checkout/paypal

Posted on 2011-02-26
3
661 Views
Last Modified: 2012-05-11
Hi,

I would like to have a one page cart for a single product. This should integrate with google check out and paypal. Anyone have a simple example or tutorial. If code is required would like to do this with php.

Thanks.

W
0
Comment
Question by:wilflife
  • 2
3 Comments
 
LVL 5

Expert Comment

by:onemadeye
ID: 34988024
For a single product, why do you need a shopping cart anyway?
Why dont you just simply put BUY NOW buttons ?
0
 

Author Comment

by:wilflife
ID: 34999719
Buy now and then jump to paypal? Surely i need to pass a parameter IE number price quantity?
0
 
LVL 5

Accepted Solution

by:
onemadeye earned 500 total points
ID: 35000567
Oh, I see that you mean it for clients to be able to enter quantity where the default BUY NOW button will set 1 for quantity.

Actually, you can see basic codes from PayPal here .. it is for Sample HTML Code for a Buy Now Button that Prompts for Quantities
Clients then will be able to set quantities on the PayPal checkout page.

Or, if you want client to enter quantities on your site but later they can update quantities on PayPal checkout page too, then use this (slightly modified from their above codes).
Sample HTML Code for a Buy Now Button that Prompts for Quantities both on your site and on the PayPal checkout page
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="herschelgomez@xyzzyu.com">
<!-- Specify a Buy Now button. -->
<input type="hidden" name="cmd" value="_xclick">
<!-- Specify details about the item that buyers will purchase. -->
<input type="hidden" name="item_name" value="Hot Sauce-12 oz. Bottle">
<input type="hidden" name="amount" value="5.95">
<input type="hidden" name="currency_code" value="USD">
<!-- Prompt buyers to enter their desired quantities. -->
Enter Quantity: <input type="text" name="quantity" value="1">
<input type="hidden" name="undefined_quantity" value="1"> 
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online"><img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now