SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Dec 2005
    Posts
    267
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Paypal Checkout Code NOT working

    Hi Friends,

    I am stuck with a paypal checkout code, which seems to be ok but when tested doesn't work.
    I am using custom shopping cart and trying to pass CART VALUES to paypal to show order summary. I am sending all items, unit price, quanity BUT want to send AGGREGATE shipping price plus hading charge for whole shopping cart.

    Following are the code;

    Code:
    <form name='Payment' action='https://www.paypal.com/cgi-bin/webscr' method='post'>
    <input type='hidden' name='business' value='ABC@XYZ.COM'>
    
    <input type='hidden' name='cart_order_id' value='67'>
    
    <input type='hidden' name='first_name' value='ABC'>
    
    <input type='hidden' name='address1' value='234324 324'>
    
    <input type='hidden' name='city' value='eewr'>
    
    <input type='hidden' name='state' value=''>
    
    <input type='hidden' name='zip' value=''>
    
    <input type='hidden' name='country' value='India'>
    
    <input type='hidden' name='email' value='hio@gmail.com'>
    
    <input type='hidden' name='night_ phone_a' value='453543'>
    
    
    
    
    <input type='hidden' name='cmd' value='_cart'>
    
    <input type='hidden' name='upload' value='1'>
    
    
    <input type='hidden' name='item_number_1' value='24'>
    
    <input type='hidden' name='item_name_1' value='Nepal Army'>
    
    <input type='hidden' name='quantity_1' value='2'>
    
    <input type='hidden' name='amount_1' value='35.99'>
    
    
    <input type='hidden' name='item_number_2' value='23'>
    
    <input type='hidden' name='item_name_2' value='Jungle Khukuri - Unpolisehd'>
    
    <input type='hidden' name='quantity_2' value='1'>
    
    <input type='hidden' name='amount_2' value='36.99'>
    
    
    <input type='hidden' name='item_number_3' value='68'>
    
    <input type='hidden' name='item_name_3' value='Long 18 Khukuri'>
    
    <input type='hidden' name='quantity_3' value='1'>
    
    <input type='hidden' name='amount_3' value='89.99'>
    
    <input type='hidden' name='shipping' value='47.00'>
    
    <input type='hidden' name='handling_ cart' value='7.83'>
    
    </form>
    
    <script language='javascript'>
    document.Payment.submit();
    </script>
    Despite Shipping and Handling charge mentioned.
    On the Paypal Order Summary, there is NO Shipping & Handling Charge shown.



    Your order summary
    DescriptionsAmount

    Nepal Army
    Nepal Army $71.98
    Item number: 24
    Item price: $35.99
    Quantity: 2


    Jungle Khukuri - Unpolisehd
    Jungle Khukuri - Unpolisehd $36.99
    Item number: 23
    Item price: $36.99
    Quantity: 1

    Long 18 Khukuri
    Long 18 Khukuri$89.99
    Item number: 68
    Item price: $89.99
    Quantity: 1

    Item total $198.96

    Total $198.96 USD

    Why is shipping and handling charges NOT APPEARING ?
    musicNmovies.com - Ultimate Bollywood Entertainment.
    Latest Bollywood Movies | Bollywood Infotainment | Short Movies
    TellyFever - Biggest Indian Television Portal

  2. #2
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The name 'shipping' in the <input> might be treated as a "pass through" variable and value.

    What I normally do to add the shipping charges to the cart data sent to Paypal is have something like

    HTML Code:
    <input type="hidden" name="item_name_X" value="Shipping cost:" />
    <input type="hidden" name="amount_X" value="39.99" />
    <input type="hidden" name="quantity_X" value="1" />
    where X is a counter value and incremented by 1 for each item in the cart.

  3. #3
    SitePoint Addict
    Join Date
    Dec 2005
    Posts
    267
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks webdev for the help
    musicNmovies.com - Ultimate Bollywood Entertainment.
    Latest Bollywood Movies | Bollywood Infotainment | Short Movies
    TellyFever - Biggest Indian Television Portal


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •