Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PAYPAL OVERRIDE


alexy_marier

Recommended Posts

Hi,

 

Here's my problem. I'm using Paypal IPN. When I make a test order, after passing the ?checkout_confirmation.php? page I fall into Paypal page where the shipping and tax are differently calculated. BUT ... I can bypass those using the technique this guys talks about :

 

Hi alexy,

 

It is possible for you to setup your cart to pass the tax variable to PayPal. The tax amount you pass will override the amount set in your Profile. You can also set the shipping override with the instructions below.

 

Even if you are using your Profile-based shipping settings, you may want to set a special shipping for some of your items (e.g. if the item is especially heavy and costs more to ship, if it is a service which does not require shipping charges).

 

Adding a Shipping Override:

 

You will need to add two lines for your shipping override. The first line is the cost to ship the first item. The second line is the cost to ship each additional item.

 

1. Copy and paste the following code into your Add to Cart code between the < form > tags:

 

<input type="hidden" name="shipping" value="0.00">

<input type="hidden" name="shipping2" value="2.00">

 

2. Replace the "shipping" value number in the first line above with the price to ship the first item. (By making the value 0.00, you could run a free shipping promotion on an item.)

 

3. Replace the "shipping2" value number in the first line above with the price to ship each additional item

 

4. The final code for your Add to Cart button (with the two new lines added) should look something like this:

 

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">

<input type="hidden" name="cmd" value="_cart">

<input type="hidden" name="business" value="me@mybiz.com">

<input type="hidden" name="item_name" value="Baseball Cap"

<input type="hidden" name="item_number" value="12345">

<input type="hidden" name="amount" value="15.00">

<input type="hidden" name="shipping" value="0.00">

<input type="hidden" name="shipping2" value="2.00">

<input type="image" src="https://www.paypal.com/images/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">

<input type="hidden" name="add" value="1">

</form>

 

Notes: When you override your Profile Based Shipping for an item in your PayPal Shopping Cart, the override will only apply to the shipping for that item. All other items will be charged shipping according to your Profile Shipping Calculations.

 

Also, you will need to check the box in your Profile to 'allow transaction-based shipping values to override the profile shipping settings' for your override to work.

--

Eric L.

PayPal Developer Technical Support

 

 

So.. anyone knows how to do that ... I've checked checkout_confirmation.php and it's rather complicated to me.

 

Anyonw can help me out?

 

--------------------

 

osCommerce 2.2-MS2

MySQL 3.23.54

PHP Version: 4.3.4 (Zend: 1.3.0)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...