blinkmadden Posted August 15, 2009 Share Posted August 15, 2009 Hi, My name is Luther, I am new to this forum. Could you guys 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. Then, I have completed till the storing customer orders and decided to use Paypal as my primary payment method. I am having trouble in adding the shipping cost to the total amount that the customer is about to pay when they check out. All thoughts are welcome. Here is my Paypal form code (include/config.php): // PayPal configuration define('PAYPAL_URL', 'https://www.paypal.com/xclick/[email protected]'); define('PAYPAL_CURRENCY_CODE', 'USD'); define('PAYPAL_RETURN_URL', 'http://localhost/tshirtshop/'); define('PAYPAL_CANCEL_RETURN_URL', 'http://localhost/tshirtshop/'); Here is the paypal redirect link (presentation/checkout_info.php) // This will contain the PayPal link $redirect = PAYPAL_URL . '&item_name=TShirtShop Order ' . urlencode('#') . $order_id . '&item_number=' . $order_id . '&amount=' . $this->mTotalAmount . '¤cy_code=' . PAYPAL_CURRENCY_CODE . '&return=' . PAYPAL_RETURN_URL . '&cancel_return=' . PAYPAL_CANCEL_RETURN_URL; // Redirection to the payment page header('Location: ' . $redirect); Here are the screens: http://www.freeimagehosting.net/image.php?8c004417ff.jpg http://www.freeimagehosting.net/image.php?c1e747981b.jpg I would appreciate your help. Please let me know if you want to see the rest of my codes. Btw, I used Xampp to integrate the website. Thanks! Link to comment https://forums.phpfreaks.com/topic/170339-php-and-mysql-e-commerce-help/ Share on other sites More sharing options...
kipper Posted November 19, 2009 Share Posted November 19, 2009 In case you haven't already done so make shipping the last item. '&item_name_3'='Shipping' . '&amount_3'='9.95 . '&quantity_3'=>'1' It will show in the cart as shipping. I believe the paypal shipping doesn't work for carts. Link to comment https://forums.phpfreaks.com/topic/170339-php-and-mysql-e-commerce-help/#findComment-960608 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.