latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Encrypted Buttons not working

Home Forums Community Forum Encrypted Buttons not working

This topic contains 9 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 3 months ago.

Topic Author Topic
Posted: Thursday Oct 4th, 2012 at 8:45 am #27432
Mark Smith
Username: aim2know

The button generator short code does not work. When using the php generated code I get an error message from paypal saying that the button has to be encrypted, which I have selected already, and my site has an SSL certificate. I did use the knowledge base to generate buttons for subscription, and we will be testing those today. My problem know is that I need to upgrade FREE members to PAID members without them losing everything they have created in their original profile. I don’t want to have to do this manually as it will create a MAJOR problem on a new product launch.

I have two questions: 1. Why can’t you make it so the button generator works? 2. What is the manual method for doing this so that I can upgrade a user even if I have to manually create the button at PayPal?

This is the link to the existing workaround page:
http://www.s2member.com/kb/using-paypal-created-buttons/

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Thursday Oct 4th, 2012 at 5:53 pm #27484

Hi Mark.

1. Why can’t you make it so the button generator works?

The generator works normally, and so does the shortcode. If you’re having trouble, then it’s something specific to your installation. I’ll help you find what the problem may be.

First we’ll check for a JavaScript conflict, since this is what was found to affect the generator in the past. To test the theme, change it temporarily to the default TwentyEleven and try if the problem continues. To test other plugins, deactivate them one by one, testing after each if the problem continues. Once you found the culprit, it can be fixed or replaced.

Now, if you got as far as PayPal, then should I assume that you could use the generator, but the code didn’t work? In that case, you may have a parsing problem or a content filtering problem, also most probably caused by the theme or a plugin. Test as above, but checking the page where the button is instead of the generator.

2. What is the manual method for doing this so that I can upgrade a user even if I have to manually create the button at PayPal?

The PayPal created button works for new registrations only, existing accounts can’t be upgraded with it because it lacks the user info s2Member adds to the button in those cases, to relate the order to that account. The s2Member button generator needs to be used so it works properly.

Please let me know how it goes with the tests I explained above. :)

Posted: Friday Oct 5th, 2012 at 7:33 am #27564
Mark Smith
Username: aim2know

This is the same issue I had the first time. Switching to 2011 does allow the shortcode to work, BUT the php generated code gives the same error message. I am not a programmer but I am a problem solver and to me this seems like a huge clue. If you know that the JavaScript conflict does exist, please tell me the details and I will have my guy look at it.

Thanks! -Doc

Posted: Friday Oct 5th, 2012 at 7:47 am #27568

Great. :)

When you switched the theme and you say it worked, what were you testing? The generator in admin or the shortcode in a page?

The JavaScript problems are usually caused by the theme/plugin not adding its JS to WP correctly. It needs to be done with [hilite mono]wp_enqueue_script[/hilite]. http://codex.wordpress.org/Function_Reference/wp_enqueue_script

If you use the HTML code for the button, then you need to have a PHP execution plugin, because there’s a bit of PHP there. Or you can replace those PHP bits with the shortcode equivalents. [hilite path]Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants[/hilite]

Posted: Friday Oct 5th, 2012 at 8:30 am #27570
Mark Smith
Username: aim2know

Cristian, thank you for the quick reply.

Here are the clues:

I generated a button for upgrade from free to a special category of recurring membership (to give a discount basically). I generated the button. While in admin in my theme, clicking the sample that appears on the screen generated the paypal error that the button has to be encrypted.

Then I copied both the shortcode and the php to a test page, seperated by space.

In 2011, both buttons appear, and the shortcode button goes through and executes at paypal. The php generated button appears BUT gives the error message of needing an encoded button at paypal.

Reverting to my theme the shortcode generated button does not appear, but there seems to be white space on the page allotted for it because the button below it from the php stays in the same place on the page, still appears, and still gives the same paypal error of needing to be an encoded button. We are trying to launch today. Please help. -Doc

Posted: Friday Oct 5th, 2012 at 8:31 am #27571
Mark Smith
Username: aim2know

When you say PHP execution plugin, can you give me a suggestion?

Posted: Friday Oct 5th, 2012 at 12:11 pm #27585
Eduan
Username: Eduan
Moderator

Hello Mark,

I think he may literally mean the PHP Execution plugin, which allows you to have PHP in your posts and pages.

Hope this helps. :)

Posted: Friday Oct 5th, 2012 at 6:53 pm #27612
Mark Smith
Username: aim2know

I have tried that one and one other. I regenerated the buttons and have exactly the same issue. I do not believe it is with the theme only because the buttons generated by the PHP code in the generator also does not work in 2011. This is broken, we are live, and it is becoming challenging. Please help if you can.

Mark

Posted: Friday Oct 5th, 2012 at 6:54 pm #27613
Mark Smith
Username: aim2know

Can you please indicate which are the “PHP bits” and what their equivalent is in the shortcode area so I can try to get this working? Thanks!

Posted: Friday Oct 5th, 2012 at 11:18 pm #27623

In 2011, both buttons appear, and the shortcode button goes through and executes at paypal. The php generated button appears BUT gives the error message of needing an encoded button at paypal.

Good, then the shortcode works well. The full code may then be giving you that error because you enabled button encryption over at PayPal, so sending the data unencrypted causes that.

The shortcode will output an encrypted button if you enabled that in your options, so that worked well. [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Encryption[/hilite]

Don’t worry about the PHP bits in the full code then, since you shouldn’t be using the full code anyway. Unless you want to disable encryption.

Viewing 9 replies - 1 through 9 (of 9 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.