![]() |
|
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| PHP/HTML/CSS/JavaScript and Servers Pick up tips and exchange info on the technical side of having a web presence. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi, My name is Luther, I am new to this forum and I'm not sure whether I posted in the right section.
Anyway, I wanted to ask if you guys could help me figure out how to include the shipping cost and adding it to the total price of the items purchased in the Paypal. Firstly, I used the Beginning PHP and MySQL E-commerce book to build my e-commerce website. I have completed till the Storing customer orders and decided to use Paypal as my primary payment method. Here is my Paypal form code (include/config.php): // PayPal configuration define('PAYPAL_URL', 'https://www.paypal.com/xclick/business=sajeev_rai@hotmail.com'); define('PAYPAL_CURRENCY_CODE', 'USD'); define('PAYPAL_RETURN_URL', 'http://www.example.com'); define('PAYPAL_CANCEL_RETURN_URL', 'http://www.example.com'); Here are the screens: http://www.freeimagehosting.net/imag...8c004417ff.jpg http://www.freeimagehosting.net/imag...c1e747981b.jpg I would appreciate your help. Please let me know if you want to see the rest of my codes. Thanks! Last edited by blinkmadden; 07-08-2009 at 01:08 AM. |
|
|||
|
Hi Luther
You'll need to pass the shipping information to PayPal via a form variable, I found this thread on the PayPal developer forum that explains how to do it. http://www.pdncommunity.com/pdn/boar...essage.id=1321
__________________
Lawrence |
|
|||
|
Here is some PHP code for Paypal I use. Does not include shipping but may help.
Code:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr" name="PayCredit"> <div align="left"> <input type="submit" name="Submit" value="Pay through Secure Server at PayPal"> <input type="hidden" name="cmd" value="<?php print $PPCmd ?>"> <?php if ($PPCmd=="_ext-enter") { ?> <input type="hidden" name="redirect_cmd" value="_xclick"> <?php } ?> <input type="hidden" name="business" value="<?php print $PPMerchantID?>"> <input type="hidden" name="item_name" value="Purchase from <?php print $MerchantName?>"> <input type="hidden" name="item_number" value="<?php print $FullInvoiceRef?>"> <input type="hidden" name="amount" value="<?php print $InvoiceTotalf?>"> <input type="hidden" name="currency_code" value="<?php print $PPCurrency?>"> </form> |
![]() |
| Bookmarks |
| Tags |
| e-commerce, paypal, php, shopping cart |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drop shipping | Just4Girlz | Wholesalers & Dropshippers | 12 | 29-06-2010 08:34 AM |
| zen cart feedback forms | viaterra | Zen Cart & osCommerce | 14 | 07-05-2009 09:07 AM |
| Shipping (Where do you get boxes?) | tomdelonge | The Water Cooler | 1 | 29-04-2009 11:11 AM |
| Shipping Calculator | stacedr | Zen Cart & osCommerce | 3 | 25-04-2009 01:59 PM |
| Shipping Calculator | Twinkle | Zen Cart & osCommerce | 1 | 11-06-2008 09:09 PM |