Page 1 of 1

PayPal Button Code in Widget

PostPosted: July 27th, 2010, 12:54 am
by Brian Hatano
Whenever I put a PayPal Button Code into a Widget, the php is getting passed to the PayPal purchase page...

I don't think this was happening before, but maybe.

I've tried 3 different widgets that allow php, but no luck.

Any ideas on how to get the S2Member PayPal code into a Widget (on a non-S2Member site)?

Thanks!

Re: PayPal Button Code in Widget

PostPosted: July 28th, 2010, 7:14 am
by Jason Caldwell
The Exec-PHP plugin allows for PHP parsing inside a Text Widget.
http://wordpress.org/extend/plugins/exec-php/
( this is what we use )

Re: PayPal Button Code in Widget

PostPosted: July 29th, 2010, 1:48 am
by Brian Hatano
For some reason, the following is showing up under the title of the product in PayPal
S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0:
S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0

Any ideas why?

Re: PayPal Button Code in Widget

PostPosted: August 5th, 2010, 4:03 pm
by Jason Caldwell
Thanks for the great question.

That would indicate to me, that you've used the Full Button Code, instead of the Shortcode format. If you use the Full Button Code, and you insert it into a Post/Page, or somewhere else where PHP code cannot be executed properly, then these PHP Constants will not be evaluated into their actual values, and instead; you will see these on the PayPal checkout form. ( not good ).

Possible solutions:
1. Install the Exec-PHP plugin.
2. Use the Shortcode format instead.
3. Make sure that your Button Code is not getting corrupted by the Visual Editor.

( also see: viewtopic.php?f=4&t=284&p=2664#p2664 )