Jump to content

PayPal Subscriptio Button


andyd34

Recommended Posts

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 = 68466971BY041625C
st = Completed
amt = 1.00
cc = GBP
cm = 
item_number = 
sig = Tvb7DaFD7C6R8PHOu5eFRBhazK994HtId3dRSm+Eqxx8cDx/ffPlvoWr/mM4ggyvowopl1EeHH1e8ySzT6udeWnOEYXpKUlpux7Hnr+OsERofZup9POpl26CPuKxgF6UaK4H/SvxuWCPvga0rzMJExUY8Pnw3flQkPcTgyz1IOg=
Edited by andyd34
Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.