Page 1 of 1

Using Paypal button shortcode instead of button code snipp..

PostPosted: September 29th, 2011, 8:47 am
by RachelC
Paypal Buttons for Level #1 Access
Button Code Generator for Level #1 Access
Your plugin suggests using the Wordpress Shortcode instead of the Resulting PayPal Button Code. If I'm having trouble with the shortcode working (customers get blank page), should I try using the long <form> version? Is this less secure?

Re: Using Paypal button shortcode instead of button code sni

PostPosted: September 29th, 2011, 9:50 am
by Eduan
I believe it's just that it's more complicated...
That's all. But if you do try it just put the code on the HTML Editor and don't go back to the Visual Editor before posting it, going back to the Visual Editor would corrupt the code.

Re: Using Paypal button shortcode instead of button code sni

PostPosted: September 29th, 2011, 10:52 am
by RachelC
That's helpful to know... thanks, Eduan.
When I create the button code in s2member, it only gives me the shortcode. The <form> version doesn't show up... but the next time I log in, there's <form> coding there..
http://s378727962.onlinehome.us/venting ... t-code.png

Re: Using Paypal button shortcode instead of button code sni

PostPosted: October 1st, 2011, 4:13 am
by Cristián Lávaque
That's odd, you should have the long code in that box of the generator. The reason why it's not there may be what causes the blank page for your customers too.

Could you check if the file /wp-content/plugins/s2member/includes/templates/buttons/paypal-checkout-button.php has any errors? If so, you could re-upload it.

Re: Using Paypal button shortcode instead of button code sni

PostPosted: October 1st, 2011, 6:30 am
by RachelC
This file has the original 0.01 USD info that the button generator starts with. Isn't it suppose to have $20 per year CAD info in it?
What about the paypal-ccaps-checkout-button.php file or the paypal-sp-checkout-button.php files? They have the 0.01 info as well. I'm guessing some step is missing when I make a button with s2Member PP Button generator... I can send you the files if you like... maybe this has been the problem.

Re: Using Paypal button shortcode instead of button code sni

PostPosted: October 2nd, 2011, 3:47 am
by Cristián Lávaque
Could you post the file here?

Ah, regarding the problem you have, have you tried deactivating other plugins to see if the problem goes away? Maybe there's a plugin conflict causing it.

Re: Using Paypal button shortcode instead of button code sni

PostPosted: October 2nd, 2011, 7:52 am
by RachelC
To answer your question, I turned off all other plugins (except your show id plugin) and still had issues with button.
When I return to the button generator, there is a long code (reverted back to 0.01 payment. When I recreate my button, I see the $20 a year info in the long code. I cut and pasted it to save it... just not sure if I can use it on the payment page (instead of the short code)

Here's the file you asked for. None of the values ($20 a year) from the shortcode are in this file.
I can add the values manually, and replace in the 'buttons' folder on the server if this is what you want me to do.
This forum system won't let me attach a php file, so here's the paypal-checkout-button.php info:

Code: Select all
<?php
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
    exit(
"Do not access this file directly.");
?>

<form action="https://%%endpoint%%/cgi-bin/webscr" method="post">
 <input type="hidden" name="business" value="%%paypal_business%%" />
 <input type="hidden" name="cmd" value="_xclick-subscriptions" />
 <!-- <?php echo _x ("Instant Payment Notification & Return Page Details""s2member-admin""s2member"); ?> -->
 <input type="hidden" name="notify_url" value="%%notify_url%%" />
 <input type="hidden" name="cancel_return" value="%%cancel_return%%" />
 <input type="hidden" name="return" value="%%return%%" />
 <input type="hidden" name="rm" value="2" />
 <!-- <?php echo _x ("Configures Basic Checkout Fields""s2member-admin""s2member"); ?> -->
 <input type="hidden" name="lc" value="" />
 <input type="hidden" name="no_shipping" value="1" />
 <input type="hidden" name="no_note" value="1" />
 <input type="hidden" name="custom" value="%%custom%%" />
 <input type="hidden" name="currency_code" value="USD" />
 <input type="hidden" name="page_style" value="paypal" />
 <input type="hidden" name="charset" value="utf-8" />
 <input type="hidden" name="item_name" value="%%level_label%% / <?php echo esc_attr (_x ("Description and pricing details here.""s2member-admin""s2member")); ?>" />
 <input type="hidden" name="item_number" value="%%level%%" />
 <!-- <?php echo _x ("Configures s2Member's Unique Invoice ID/Code""s2member-admin""s2member"); ?>  -->
 <input type="hidden" name="invoice" value="<?php echo "<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>"?>" />
 <!-- <?php echo _x ("Identifies/Updates An Existing User/Member ( when/if applicable )""s2member-admin""s2member"); ?>  -->
 <input type="hidden" name="on0" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>"?>" />
 <input type="hidden" name="os0" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>"?>" />
 <!-- <?php echo _x ("Identifies The Customer's IP Address For Tracking""s2member-admin""s2member"); ?> -->
 <input type="hidden" name="on1" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>"?>" />
 <input type="hidden" name="os1" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>"?>" />
 <!-- <?php echo _x ("Controls Modify Behavior At PayPal¬Æ Checkout""s2member-admin""s2member"); ?> -->
 <input type="hidden" name="modify" value="0" />
 <!-- <?php echo _x ("Customizes Prices, Payments & Billing Cycle""s2member-admin""s2member"); ?> -->
 <!--<input type="hidden" name="amount" value="0.01" />-->
 <input type="hidden" name="src" value="1" />
 <input type="hidden" name="srt" value="" />
 <input type="hidden" name="sra" value="1" />
 <input type="hidden" name="a1" value="0.00" />
 <input type="hidden" name="p1" value="0" />
 <input type="hidden" name="t1" value="D" />
 <input type="hidden" name="a3" value="0.01" />
 <input type="hidden" name="p3" value="1" />
 <input type="hidden" name="t3" value="M" />
 <!-- <?php echo _x ("Displays The PayPal¬Æ Image Button""s2member-admin""s2member"); ?> -->
 <input type="image" src="https://www.paypal.com/<?php echo esc_attr (_x ("en_US""s2member-front paypal-button-lang-code""s2member")); ?>/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal¬Æ" />
</form>


Help me Obiwan... you're my only hope...
R

Re: Using Paypal button shortcode instead of button code sni

PostPosted: October 2nd, 2011, 3:58 pm
by Cristián Lávaque
OK, let me see if I understand correctly. Now your generator does output a long code with the values you entered? Before it was blank, but in your last message it seems that's not the case anymore. Was that because you deactivated the other plugins?

Your file seems fine. It's the template for the code you generate, not the one you generated.

Re: Using Paypal button shortcode instead of button code sni

PostPosted: October 2nd, 2011, 4:19 pm
by RachelC
When I first go into the button generator, (Paypal Buttons >> Paypal buttons for Level #1 access) there's nothing in the bottom. I generate a short code and close it. Then if I go back into the Paypal buttons for Level #1 access, there IS a long code. Weird huh?
The button was on the site and worked for a few times, then PP tells me a '2' was added to the code - and that's why it wouldn't work... unfortunately, they're not very helpful with 3rd party software...

I can't deactivate the other plugins again until after Tuesday (Monday a free day) so will let you know then. When I can, I will deactivate: Contact Form 7, Google Analytics Dashboard, Google Analytics for Wordpress, Recent Tweets and your WP Show IDs... then s2Member will be the only plugin activated. Hopefully it all will work then.

I've placed the s2Member shortcode button on a hidden page for now...
http://s378727962.onlinehome.us/venting/?page_id=899
Thanks for helping, Christian.

Re: Using Paypal button shortcode instead of button code sni

PostPosted: October 3rd, 2011, 2:06 am
by Cristián Lávaque
Got it on the generator's behavior with the long code. Yeah, weird.

Now, tell me again why it is that you aren't using the shortcode?

About PayPal telling you the button has an added 2 in the code, it may be because a parsing problem of the page. It is possible that another plugin or the theme is causing that. When you test removing the other plugins, also test changing the theme to the default TwentyEleven or TwentyTen, please.

Re: Using Paypal button shortcode instead of button code sni

PostPosted: October 3rd, 2011, 7:04 am
by RachelC
If you go to the beginning of this thread... I posed this question...
"If I'm having trouble with the shortcode working (customers get blank page), should I try using the long <form> version? Is this less secure?"

This is a live site with subscribers already. It's a free day and we're tracking hits... and I can't change the template. They'll fire me! (the theme is Magazine Basic 2.7.3, by the way)

I can disable the plugins tomorrow and see if the shortcode button works (it's on a page now but it's hidden)
http://s378727962.onlinehome.us/venting/?page_id=899
Or I could just create a whole new site and test that. Maybe I'll make a mirrored site for trying out different things. Stay tuned...
Thanks again.
Rachel

Re: Using Paypal button shortcode instead of button code sni

PostPosted: October 4th, 2011, 2:17 am
by Cristián Lávaque
OK, got it on the theme, I thought you could do a quick change to test and then change back to the current theme.

You could try the TrueEdit plugin, disabling all the content filters except do_shortcode and see if then the shortcode works. https://wordpress.org/extend/plugins/trueedit/

If that doesn't work, you can try the Raw HTML plugin and put the button's full code inside the [raw][/raw] tags. https://wordpress.org/extend/plugins/raw-html/

Let me know if that helps. :)