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.

Pro form asks for CC # when Payapl selected

Home Forums Community Forum Pro form asks for CC # when Payapl selected

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

Topic Author Topic
Posted: Tuesday Aug 7th, 2012 at 4:39 pm #21393

I have s2 pro and have created forms for level 1 membership. Currently, I am only going to accept paypal payments (so I do not have paypal pro), yet I am using the pro form for checkout. I removed “visa,mastercard,amex,discover,maestro,solo” from the “accept” portion of the shortcode.

It works fine when I am signed in as a free user, however, when signed out and Paypal is selected as the payment form, it still asks for the CC info.

The link to one of the payment forms is http://www.brazosnow.com/membership/quarterly

Just a sidenote, I have not activated SSL yet, but do not think it should affect the checkout. Any suggestions on why it still asks for CC info when signed out and Paypal being the only option? Thanks

List Of Topic Replies

Viewing 10 replies - 1 through 10 (of 10 total)
Author Replies
Author Replies
Posted: Wednesday Aug 8th, 2012 at 8:28 am #21491
Raam Dev
Username: Raam
Staff Member

Hi Henry,

The problem is that the s2Member JavaScript is not loading. If you look at the page source, you’ll see this line near the top:

<script type="text/javascript" src="http://brazosnow.com/bn-media/plugins/s2member/s2member-o.php?ws_plugin__s2member_js_w_globals=1&amp;qcABC=1&amp;ver=120703-120703-1255790375"></script>

If you try to visit that URL, you’ll get a 404 error. You should get all the s2Member JavaScript.

Please see Knowledge Base » Mod Security, Random 503/403 Errors for possible solutions. You may also want to get in touch your web host to see if they can help you with this.

Posted: Wednesday Aug 8th, 2012 at 7:02 pm #21558

I have not seen any 404 errors. The page loads just fine, its just that when logged out, the credit card info section does not change when PayPal is selected.

Posted: Wednesday Aug 8th, 2012 at 7:37 pm #21562

Ok I found the 404 error as you stated. I am using w3 total cache. Could this plugin be causing it?

Posted: Wednesday Aug 8th, 2012 at 7:57 pm #21579

Additionally, the 404 error only occurs when logged out.

Posted: Thursday Aug 9th, 2012 at 7:59 am #21616
Raam Dev
Username: Raam
Staff Member

Hi Henry,

Yes, the W3TC plugin might be causing this. Have you tried disabling it and testing again? Also, have you tried the suggestions recommended in the knowledge base article I linked to above?

Posted: Thursday Aug 9th, 2012 at 8:24 pm #21669

It appears that my security plugin (Better WP Security) is causing it. When I deactivated it, the problem stopped. Any ideas what the plugin might be doing or anything I need to adjust to it, to prevent this from happening?

Posted: Friday Aug 10th, 2012 at 7:39 am #21700

This is part of a conversation I had with Jason some months ago regarding JavaScript conflicts.

Cristián: I still don’t understand how the JS conflicts work… If the library is the same in both plugins, why is there a conflict? Same var names?

Jason Caldwell: Well, I call it a conflict. Sometimes it’s a conflict in jQuery because of a bad plugin, which attempts to load jQuery on it’s own, instead of doing it the WP way. Or sometimes, it just a bad plugin that causes a JavaScript error, which may result in all JavaScript failing (the nature of JavaScript). Not really a “conflict” in that case, really an error due to a bad plugin/theme.

Jason Caldwell: I’ve also see some conflicts between frameworks. That’s rare, but there are some plugins that use the ProtoType framework, and combined with another framework like MooTools, there is a possibility for a conflict to arise. Rare though, and it’s usually attributed to the way their loaded (i.e. by a bad plugin/theme).

Cristián: Does WP load JQuery already? If so, why do plugins load it too?

Jason Caldwell: Yea, WP already loads it. But some plugin authors don’t know that, or they just hard code it into their plugin not realizing that. Other times they’ll try to include a dependency on jQuery, but they name it wrong, and WordPress gets confused.

Cristián: Does s2Member load it again or uses WP’s?

Jason Caldwell: Hmm, not really, because in the Dashboard, it’s already loaded by WordPress. s2Member enques scripts that is uses, which rely on jQuery being present. In the call to wp_enqueue_script(), s2Member will list jQuery as a dependency, which forces WP to load it, though it’s already loaded in the Dashboard anyway. That’s the proper way to handle it.

On the front-end of a site, s2Member will load jQuery if it’s not already loaded, but again, using the same technique. A call to wp_enqueue_script() with a dependency on jQuery forces WP to load jQuery. If 10 plugins all do it this way (i.e. the right way), WordPress loads jQuery in the proper order and only one time.

Cristián: Ah, got it. I understand WP has a QC team, don’t they check this?

Jason Caldwell: Not in my experience. They look mostly for security issues and really bad code. They usually don’t catch minute details like this.

Cristián: I see. Well, they do look at how the db is used, iirc.

Cristián: I see, but these details do cause trouble for the users. Maybe it’d be good to write an article about JS conflicts as you explained above and post it in the forums, and then show it to the QC guys for consideration to include in their quality checklist.

Jason Caldwell: Yea, that’s a good idea. On the WP side though, they’re aware of this problem, and that’s why they created the wp_enqueue_script() wp_enqueue_style() functions. Although, I wish this were more prominent in this article: http://codex.wordpress.org/Writing_a_Plugin#Plugin_Development_Suggestions

It is mentioned, but it’s all the way at the bottom:

Try not to echo [hilite code]

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.