Paypal integration issue on my custom cart

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neovantage
    New Member
    • Aug 2008
    • 245

    Paypal integration issue on my custom cart

    Hi experts,
    I am integrating paypal in my custom cart.

    I am facing a issue in which it tells

    "Your shopping cart is empty. Return to your merchant’s site to continue shopping."

    Here is my code which i am using on my website page

    Code:
    <input type="hidden" name="business" value="neovan_1220700005_biz@gmail.com" />
    <input type="hidden" name="cmd" value="_cart" /> 
    <input type="hidden" name="upload" value="1" /> 
    <input type="hidden" name="return" value="http://www.fs-clothing.com/checkout-success" />
     <input type="hidden" name="cancel_return" value="http://www.fs-clothing.com/checkout-error.php" />
    <input type="hidden" name="rm" value="1" />
    <input type="hidden" name="currency_code" id="currency_code" value="<?php if($_SESSION['cur']=="pkr"){ echo "PKR";}else if($_SESSION['cur']=="gbp"){ echo "GBP";}?>" />
     <input type="hidden" name="lc" value="GB" />
    <input type="hidden" name="bn" value="toolkit-php" />
    <input type="hidden" name="no_shipping" value="1" />
    PHP Code
    Code:
    $str="";
    $str=$str."invoice=".$invoice."&add=".$add."&business=".$business."&cmd=".$cmd."&return=".$return."&cancel_return=".$cancel_return."&rm=".$rm."&currency_code=".$currency_code."&lc=".$lc."&bn=".$bn."&no_shipping=".$no_shipping;
    
    $itn=1;
    for ($i=0; $i<$total_pro; $i++){
    $str=$str."&item_name_$itn=".$prod_name[$i]."&amount_$itn=".$prod_price[$i]."&quantity_$itn=".$prod_quantity[$i];
    				$itn=$itn+1;
    			}
    redirect("https://www.sandbox.paypal.com/cgi-bin/webscr".$str);
    My string Output is

    "
    invoice=FSC-617-66669&add=&busi ness=neovan_122 0700005_biz@gma il.com&cmd=_car t&return=http ://www.fs-clothing.com/checkout-success&cancel_ return=http://www.fs-clothing.com/checkout-error.php&rm=1& currency_code=G BP&lc=GB&bn=too lkit-php&no_shipping =1&item_name_1= PRAWN STAR PINK&amount_1=6 .99&quantity_1= 1&item_name_2=K ILLER KA BHAI THRILLER&amount _2=6.29&quantit y_2=1
    "

    Can some one guide me where i am having an error and how can i fixed it. I will be really very grateful to you people.

    Thanks in Advance
  • neovantage
    New Member
    • Aug 2008
    • 245

    #2
    I have solved my problem. I was passing parameters through get method due to which it was not upload my custom cart products on Paypal Cart. I used Post method and it is working fine now.

    Thanks everyone

    Comment

    Working...