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/business=username@hotmail.com');
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/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. Btw, I used Xampp to integrate the website. Thanks!