Advertisement:

Author Topic: Paypal "subscription" button  (Read 2487 times)

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,120
  • Gender: Male
    • Kindred-999 on GitHub
Re: Paypal "subscription" button
« Reply #20 on: January 20, 2017, 02:39:15 PM »
Code: (replace that with this) [Select]
echo '</form>';

if ($context['user']['is_logged'])
echo '
             
       <form action="https://www.paypal.com/cgi-bin/webscr [nofollow]" method="post" target="_top" style="padding-top: 50px;">
       <input type="hidden" name="cmd" value="_s-xclick">
       <input type="hidden" name="hosted_button_id" value="*************">
       <input type="image" src="http://www [nofollow].********************/Website%20Integrated%20Pictures/subscribeCC_LG.png" 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 [nofollow]" width="1" height="1">
       </form>';

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Rogerd

  • Semi-Newbie
  • *
  • Posts: 39
Re: Paypal "subscription" button
« Reply #21 on: January 20, 2017, 02:52:20 PM »
The paypal button has disappeared again (cannot be viewed by admin or members) using that code.

Offline Chen Zhen

  • Sophist Member
  • *****
  • Posts: 1,028
  • Gender: Male
  • If you're going through hell, keep going!
    • Underdog-01 on GitHub
    • WebDev.ca
Re: Paypal "subscription" button
« Reply #22 on: January 20, 2017, 03:44:01 PM »

What Kindred just posted should work.

This is more or less the same but corrected for XHTML (assuming we are working with the file prior to you editing it in this thread):
Code: [Select]
echo '
</form>', $context['user']['is_logged'] ? '
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top" style="padding-top: 50px;">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="T6AJ5VJND97YJ" />
<input type="image" src="http://www.rogers-relics-uk.com/Website%20Integrated%20Pictures/subscribeCC_LG.png" style="border:0;" name="submit" alt="PayPal  The safer, easier way to pay online!" />
<img alt="" style="border:0;width: 1px;height: 1px;" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" />
</form>' : '';

Offline Rogerd

  • Semi-Newbie
  • *
  • Posts: 39
Re: Paypal "subscription" button
« Reply #23 on: January 20, 2017, 04:18:43 PM »
You are a genius, that worked a treat, thank you Chen Zhen and all others who tried to help me, sorry for all the hassle though lol

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,120
  • Gender: Male
    • Kindred-999 on GitHub
Re: Paypal "subscription" button
« Reply #24 on: January 20, 2017, 09:47:21 PM »
If that worked, then what I posted would have worked... 
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Rogerd

  • Semi-Newbie
  • *
  • Posts: 39
Re: Paypal "subscription" button
« Reply #25 on: January 21, 2017, 04:12:07 AM »
If that worked, then what I posted would have worked... 

I'm afraid I don't know enough about coding to argue with you kindred lol, but the button couldn't be seen by anybody after pasting in your code, but never mind as I'm happy it's now working after pulling most of my hair out, thank's again all.

Offline SaltedWeb

  • Full Member
  • ***
  • Posts: 618
  • Why do we use the Internet...Hayes 1200 Thats Why
Re: Paypal "subscription" button
« Reply #26 on: November 29, 2017, 11:40:49 PM »
I know this topic is old, but you could have your paypal button forward to a page thats not seen by guests via permissions.
You could then even give a small explanations on the page.  If you have a portal of some kind they usually have pages built in making what I said easier. Just thought in case anyone else was wanting it, would put it out if it was not already obvious to try.

SW


Multi-Linking, like a Boss.