Solved

One Page Cart PHP google checkout/paypal

Posted on 2011-02-26
3
665 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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).

839 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