andyd34 Posted June 7, 2016 Share Posted June 7, 2016 (edited) I've created a subscription button with paypal but some of the fields are returning empty. Can anyone help <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="business" value="$pp_email"> <input type="hidden" name="lc" value="GB"> <input type="hidden" name="item_name" value="Subscription"> <input type="hidden" name="return" value="http://www.my-return_url.com/subscription"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="src" value="1"> <input type="hidden" name="a3" value="1"> <input type="hidden" name="p3" value="1"> <input type="hidden" name="t3" value="M"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribe_SM.gif:NonHostedGuest"> <input type="hidden" name="cm" value="$name"> <input type="hidden" name="item_number" value="$customer"> <input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_subscribe_SM.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"> </form>' This is whats being returned subscription = tx = 68466971BY041625Cst = Completedamt = 1.00cc = GBPcm = item_number = sig = Tvb7DaFD7C6R8PHOu5eFRBhazK994HtId3dRSm+Eqxx8cDx/ffPlvoWr/mM4ggyvowopl1EeHH1e8ySzT6udeWnOEYXpKUlpux7Hnr+OsERofZup9POpl26CPuKxgF6UaK4H/SvxuWCPvga0rzMJExUY8Pnw3flQkPcTgyz1IOg= Edited June 7, 2016 by andyd34 Quote Link to comment Share on other sites More sharing options...
soycharliente Posted June 21, 2016 Share Posted June 21, 2016 I don't think you're showing enough code for us to really be able to help you. I'm going to make a HUGE assumption since I see a single quote at the very end of your HTML. Is all of this HTML output a single string with your PHP variables referenced inside?If that's the case, your syntax for referencing variables inside of quotes is incorrect. $output = 'My name is: ' . $name; $output = "My name is: " . $name; $output = "My name is: {$name}"; If you're using single quotes, you must concatenate the variable. If you're using double quotes, you can either concatenate or wrap the variable inside of braces. There are more/other options when you include concepts like heredoc and nowdoc syntax. If this doesn't help, you're probably going to need to show more code. It may help you to read over the manual page for strings since it references how to call variables. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.