Reputation: 141
I have set up a query string to pass info through to paypal and all work fine apart from the address override feature. It will not automatically update the delivery address with the new one posted from the form.
I want to be able to override for both existing and new accounts
The code is as follows:
$queryString = "?cmd=_xclick";
$queryString .= "&upload=1";
$queryString .= "&charset=utf-8";
$queryString .= "¤cy_code=GBP";
$queryString .= "&[email protected]";
$queryString .= "&return=http://groupon.english-sofas.co.uk/english-groupon/groupon-success.php";
$queryString .= "¬ify_url=http://groupon.english-sofas.co.uk/english-groupon/paypal-groupon-ipn.php";
$queryString .= "&item_name= $itemname";
$queryString .= "&item_number= $id";
$queryString .= "&amount=$delivery";
$queryString .= "&custom=$grouponcode";
$queryString .= "&address_override=true";
$queryString .= "&first_name=$fname";
$queryString .= "&last_name=$lname";
$queryString .= "&address_street=$add1";
$queryString .= "&address_city=$city";
$queryString .= "&address_zip=$post";
$queryString .= "&address_country=$country";
$paypalstring = "https://sandbox.paypal.com/cgi-bin/web-scr" . $queryString;
Upvotes: 0
Views: 3977
Reputation: 332
If you want the forms input not to be overriden with the client's account value, then you have to post address_override=0 ! not true (nor 1)
Upvotes: 0
Reputation: 5630
You have to use address_override=1 instead of address_override=true and the field names address1/city/zip/country instead of address_street/address_city/address_zip/address_country
Upvotes: 1
Reputation: 19356
I'm not sure where you found "address_street", "address_city", but these are not correct.
The correct parameters are listed on "HTML Variables for Filling Out PayPal Checkout Pages Automatically" in https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables
Upvotes: 2