s2Member v110815
Source Code: s2member-pro\includes\separates\gateways\paypal\paypal-min.js
Docs updated: August 15, 2011, 4:20 pm
Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member-pro\includes\separates\gateways\paypal\paypal-min.js jQuery(document).ready(function(y){var d,p,i,l,o,H,w,v={"aria-required":"true"},a={"aria-required":"false"},z={disabled:"disabled"},h={"aria-required":"false",disabled:"disabled"};w=new Image(),w.src='?php echo $vars [ "i" ] ; ?/ajax-loader.gif';if((d=y("form#s2member-pro-paypal-cancellation-form")).length===1){var K="div#s2member-pro-paypal-cancellation-form-captcha-section",m="div#s2member-pro-paypal-cancellation-form-submission-section",u=y(m+" input#s2member-pro-paypal-cancellation-submit");ws_plugin__s2member_animateProcessing(u,"reset"),u.removeAttr("disabled");d.submit(function(){var Q=this,O="",N="",R="";var P=y(K+" input#recaptcha_response_field");y(":input",Q).each(function(){var S=y.trim(y(this).attr("id")).replace(/-[0-9]+$/g,"");if(S&&(O=y.trim(y('label[for="'+S+'"]',Q).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(N=ws_plugin__s2member_validationErrors(O,this,Q)){R+=N+"\n\n"}}});if(R=y.trim(R)){alert("— Oops, you missed something: —\n\n"+R);return false}else{if(P.length&&!P.val()){alert("— Oops, you missed something: —\n\nSecurity Code missing. Please try again.");return false}}u.attr(z),ws_plugin__s2member_animateProcessing(u);return true})}else{if((p=y("form#s2member-pro-paypal-update-form")).length===1){var s,t="div#s2member-pro-paypal-update-form-billing-method-section",E="div#s2member-pro-paypal-update-form-billing-address-section",k=t+' input[name="s2member_pro_paypal_update[card_type]"]',K="div#s2member-pro-paypal-update-form-captcha-section",m="div#s2member-pro-paypal-update-form-submission-section",u=y(m+" input#s2member-pro-paypal-update-submit");ws_plugin__s2member_animateProcessing(u,"reset"),u.removeAttr("disabled");(s=function(N){var O=y(k+":checked").val();if(y.inArray(O,["Visa","MasterCard","Amex","Discover"])!==-1){y(t+" div.s2member-pro-paypal-update-form-div").show();y(t+" div.s2member-pro-paypal-update-form-div :input").attr(v);y(t+" div#s2member-pro-paypal-update-form-card-start-date-issue-number-div").hide();y(t+" div#s2member-pro-paypal-update-form-card-start-date-issue-number-div :input").attr(a);y(E+" div.s2member-pro-paypal-update-form-div").show();y(E+" div.s2member-pro-paypal-update-form-div :input").attr(v);y(E).show(),(N)?y(t+" input#s2member-pro-paypal-update-card-number").focus():null}else{if(y.inArray(O,["Maestro","Solo"])!==-1){y(t+" div.s2member-pro-paypal-update-form-div").show();y(t+" div.s2member-pro-paypal-update-form-div :input").attr(v);y(E+" div.s2member-pro-paypal-update-form-div").show();y(E+" div.s2member-pro-paypal-update-form-div :input").attr(v);y(E).show(),(N)?y(t+" input#s2member-pro-paypal-update-card-number").focus():null}else{if(!O){y(t+" div.s2member-pro-paypal-update-form-div").hide();y(t+" div.s2member-pro-paypal-update-form-div :input").attr(a);y(t+" div#s2member-pro-paypal-update-form-card-type-div").show();y(t+" div#s2member-pro-paypal-update-form-card-type-div :input").attr(v);y(E+" div.s2member-pro-paypal-update-form-div").hide();y(E+" div.s2member-pro-paypal-update-form-div :input").attr(a);y(E).hide(),(N)?y(m+" input#s2member-pro-paypal-update-submit").focus():null}}}})();y(k).click(s).change(s);p.submit(function(){var Q=this,O="",N="",R="";var P=y(K+" input#recaptcha_response_field");if(!y(k+":checked").val()){alert("Please choose a Billing Method.");return false}y(":input",Q).each(function(){var S=y.trim(y(this).attr("id")).replace(/-[0-9]+$/g,"");if(S&&(O=y.trim(y('label[for="'+S+'"]',Q).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(N=ws_plugin__s2member_validationErrors(O,this,Q)){R+=N+"\n\n"}}});if(R=y.trim(R)){alert("— Oops, you missed something: —\n\n"+R);return false}else{if(P.length&&!P.val()){alert("— Oops, you missed something: —\n\nSecurity Code missing. Please try again.");return false}}u.attr(z),ws_plugin__s2member_animateProcessing(u);return true})}else{if((i=y("form#s2member-pro-paypal-registration-form")).length===1){var I,q,J="div#s2member-pro-paypal-registration-form-registration-section",K="div#s2member-pro-paypal-registration-form-captcha-section",m="div#s2member-pro-paypal-registration-form-submission-section",u=y(m+" input#s2member-pro-paypal-registration-submit");ws_plugin__s2member_animateProcessing(u,"reset"),u.removeAttr("disabled");(I=function(N){if(y(m+" input#s2member-pro-paypal-registration-names-not-required-or-not-possible").length){y(J+" div#s2member-pro-paypal-registration-form-first-name-div").hide();y(J+" div#s2member-pro-paypal-registration-form-first-name-div :input").attr(h);y(J+" div#s2member-pro-paypal-registration-form-last-name-div").hide();y(J+" div#s2member-pro-paypal-registration-form-last-name-div :input").attr(h)}})();(q=function(N){if(y(m+" input#s2member-pro-paypal-registration-password-not-required-or-not-possible").length){y(J+" div#s2member-pro-paypal-registration-form-password-div").hide();y(J+" div#s2member-pro-paypal-registration-form-password-div :input").attr(h)}})();y(J+" div#s2member-pro-paypal-registration-form-password-div :input").keyup(function(){ws_plugin__s2member_passwordStrength(y(J+" input#s2member-pro-paypal-registration-username"),y(J+" input#s2member-pro-paypal-registration-password1"),y(J+" input#s2member-pro-paypal-registration-password2"),y(J+" div#s2member-pro-paypal-registration-form-password-strength"))});i.submit(function(){var Q=this,O="",N="",T="";var P=y(K+" input#recaptcha_response_field");var S=y(J+' input#s2member-pro-paypal-registration-password1[aria-required="true"]');var R=y(J+" input#s2member-pro-paypal-registration-password2");y(":input",Q).each(function(){var U=y.trim(y(this).attr("id")).replace(/-[0-9]+$/g,"");if(U&&(O=y.trim(y('label[for="'+U+'"]',Q).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(N=ws_plugin__s2member_validationErrors(O,this,Q)){T+=N+"\n\n"}}});if(T=y.trim(T)){alert("— Oops, you missed something: —\n\n"+T);return false}else{if(S.length&&y.trim(S.val())!==y.trim(R.val())){alert("— Oops, you missed something: —\n\nPasswords do not match up. Please try again.");return false}else{if(P.length&&!P.val()){alert("— Oops, you missed something: —\n\nSecurity Code missing. Please try again.");return false}}}u.attr(z),ws_plugin__s2member_animateProcessing(u);return true})}else{if((l=y("form#s2member-pro-paypal-sp-checkout-form")).length===1){var C,G,r=true,F,n,e,A,b,B,s,D="div#s2member-pro-paypal-sp-checkout-form-coupon-section",L=D+" input#s2member-pro-paypal-sp-checkout-coupon-apply",J="div#s2member-pro-paypal-sp-checkout-form-registration-section",t="div#s2member-pro-paypal-sp-checkout-form-billing-method-section",k=t+' input[name="s2member_pro_paypal_sp_checkout[card_type]"]',E="div#s2member-pro-paypal-sp-checkout-form-billing-address-section",x=y(E+" div#s2member-pro-paypal-sp-checkout-form-ajax-tax-div"),K="div#s2member-pro-paypal-sp-checkout-form-captcha-section",m="div#s2member-pro-paypal-sp-checkout-form-submission-section",j=m+" input#s2member-pro-paypal-sp-checkout-nonce",c=m+" input#s2member-pro-paypal-sp-checkout-submit";var f='input type="submit" id="s2member-pro-paypal-sp-checkout-submit" class="s2member-pro-paypal-sp-checkout-submit" value="Submit Form" tabindex="310" /';var g='input type="image" src="?php echo $i ; ?/paypal-xco.gif" id="s2member-pro-paypal-sp-checkout-submit" class="s2member-pro-paypal-sp-checkout-submit" value="Submit Form" tabindex="310" /';ws_plugin__s2member_animateProcessing(y(c),"reset"),y(c).removeAttr("disabled"),y(L).removeAttr("disabled");(C=function(N){if(y(m+" input#s2member-pro-paypal-sp-checkout-coupons-not-required-or-not-possible").length){y(D).hide()}else{y(D).show()}})();(G=function(N){if(y(m+" input#s2member-pro-paypal-sp-checkout-tax-not-required-or-not-possible").length){x.hide(),r=false}})();(F=function(O){if(r&&!(O&&O.interval&&document.activeElement.id==="s2member-pro-paypal-sp-checkout-country")){var N=y(m+" input#s2member-pro-paypal-sp-checkout-attr").val();var R=y.trim(y(E+" input#s2member-pro-paypal-sp-checkout-state").val());var S=y(E+" select#s2member-pro-paypal-sp-checkout-country").val();var Q=y.trim(y(E+" input#s2member-pro-paypal-sp-checkout-zip").val());var P=R+"|"+S+"|"+Q;if(R&&S&&Q&&P&&(!b||b!==P)&&(b=P)){(A)?A.abort():null,clearTimeout(e),e=null;x.html('divimg src="?php echo $vars [ "i" ] ; ?/ajax-loader.gif" alt="Calculating Sales Tax..." / calculating sales tax.../div');e=setTimeout(function(){A=y.post('?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( admin_url ( "/admin-ajax.php" ) ) ; ?',{action:"ws_plugin__s2member_pro_paypal_ajax_tax",ws_plugin__s2member_pro_paypal_ajax_tax:'?php echo c_ws_plugin__s2member_utils_strings:: esc_sq (c_ws_plugin__s2member_utils_encryption:: encrypt ( "ws-plugin--s2member-pro-paypal-ajax-tax" ) ) ; ?',"ws_plugin__s2member_pro_paypal_ajax_tax_vars[attr]":N,"ws_plugin__s2member_pro_paypal_ajax_tax_vars[state]":R,"ws_plugin__s2member_pro_paypal_ajax_tax_vars[country]":S,"ws_plugin__s2member_pro_paypal_ajax_tax_vars[zip]":Q},function(T){clearTimeout(e),e=null;try{x.html("divstrongSales Tax"+((T.trial)?" Today":"")+":/strong "+((T.tax_per)?"em"+T.tax_per+"/em ( "+T.cur_symbol+""+T.tax+" )":T.cur_symbol+""+T.tax)+"br /strong— Total"+((T.trial)?" Today":"")+":/strong "+T.cur_symbol+""+T.total+"/div")}catch(U){}},"json")},((O&&O.keyCode)?1000:100))}else{if(!R||!S||!Q||!P){x.html(""),b=null}}}})();n=function(N){setTimeout(function(){F(N)},10)};y(E+" input#s2member-pro-paypal-sp-checkout-state").bind("keyup blur",F).bind("cut paste",n);y(E+" input#s2member-pro-paypal-sp-checkout-zip").bind("keyup blur",F).bind("cut paste",n);y(E+" select#s2member-pro-paypal-sp-checkout-country").bind("change",F);setInterval(function(){F({interval:true})},1000);(B=function(N){if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN){y(J+" input#s2member-pro-paypal-sp-checkout-first-name").each(function(){var O=y(this),P=O.val();(!P)?O.val(S2MEMBER_CURRENT_USER_FIRST_NAME):null});y(J+" input#s2member-pro-paypal-sp-checkout-last-name").each(function(){var O=y(this),P=O.val();(!P)?O.val(S2MEMBER_CURRENT_USER_LAST_NAME):null});y(J+" input#s2member-pro-paypal-sp-checkout-email").each(function(){var O=y(this),P=O.val();(!P)?O.val(S2MEMBER_CURRENT_USER_EMAIL):null})}})();(s=function(N){var O=y(k+":checked").val();if(y.inArray(O,["Visa","MasterCard","Amex","Discover"])!==-1){y(t+" div.s2member-pro-paypal-sp-checkout-form-div").show();y(t+" div.s2member-pro-paypal-sp-checkout-form-div :input").attr(v);y(t+" div#s2member-pro-paypal-sp-checkout-form-card-start-date-issue-number-div").hide();y(t+" div#s2member-pro-paypal-sp-checkout-form-card-start-date-issue-number-div :input").attr(a);y(E+" div.s2member-pro-paypal-sp-checkout-form-div").show();y(E+" div.s2member-pro-paypal-sp-checkout-form-div :input").attr(v);(!r)?x.hide():null;y(E).show(),y(m+" input#s2member-pro-paypal-sp-checkout-submit").replaceWith(f);(N)?y(t+" input#s2member-pro-paypal-sp-checkout-card-number").focus():null}else{if(y.inArray(O,["Maestro","Solo"])!==-1){y(t+" div.s2member-pro-paypal-sp-checkout-form-div").show();y(t+" div.s2member-pro-paypal-sp-checkout-form-div :input").attr(v);y(E+" div.s2member-pro-paypal-sp-checkout-form-div").show();y(E+" div.s2member-pro-paypal-sp-checkout-form-div :input").attr(v);(!r)?x.hide():null;y(E).show(),y(m+" input#s2member-pro-paypal-sp-checkout-submit").replaceWith(f);(N)?y(t+" input#s2member-pro-paypal-sp-checkout-card-number").focus():null}else{if((!O||O==="PayPal")&&r){y(t+" div.s2member-pro-paypal-sp-checkout-form-div").show();y(t+" div.s2member-pro-paypal-sp-checkout-form-div :input").attr(v);y(t+" div#s2member-pro-paypal-sp-checkout-form-card-number-div").hide();y(t+" div#s2member-pro-paypal-sp-checkout-form-card-number-div :input").attr(a);y(t+" div#s2member-pro-paypal-sp-checkout-form-card-expiration-div").hide();y(t+" div#s2member-pro-paypal-sp-checkout-form-card-expiration-div :input").attr(a);y(t+" div#s2member-pro-paypal-sp-checkout-form-card-verification-div").hide();y(t+" div#s2member-pro-paypal-sp-checkout-form-card-verification-div :input").attr(a);y(t+" div#s2member-pro-paypal-sp-checkout-form-card-start-date-issue-number-div").hide();y(t+" div#s2member-pro-paypal-sp-checkout-form-card-start-date-issue-number-div :input").attr(a);y(E+" div.s2member-pro-paypal-sp-checkout-form-div").show();y(E+" div.s2member-pro-paypal-sp-checkout-form-div :input").attr(v);y(E+" div#s2member-pro-paypal-sp-checkout-form-street-div").hide();y(E+" div#s2member-pro-paypal-sp-checkout-form-street-div :input").attr(a);y(E+" div#s2member-pro-paypal-sp-checkout-form-city-div").hide();y(E+" div#s2member-pro-paypal-sp-checkout-form-city-div :input").attr(a);y(E).show(),y(m+" input#s2member-pro-paypal-sp-checkout-submit").replaceWith(g);(N)?y(E+" input#s2member-pro-paypal-sp-checkout-state").focus():null}else{if(!O||O==="PayPal"){y(t+" div.s2member-pro-paypal-sp-checkout-form-div").hide();y(t+" div.s2member-pro-paypal-sp-checkout-form-div :input").attr(a);y(t+" div#s2member-pro-paypal-sp-checkout-form-card-type-div").show();y(t+" div#s2member-pro-paypal-sp-checkout-form-card-type-div :input").attr(v);y(E+" div.s2member-pro-paypal-sp-checkout-form-div").hide();y(E+" div.s2member-pro-paypal-sp-checkout-form-div :input").attr(a);y(E).hide(),y(m+" input#s2member-pro-paypal-sp-checkout-submit").replaceWith(g);(N)?y(m+" input#s2member-pro-paypal-sp-checkout-submit").focus():null}}}}G()})();y(k).click(s).change(s);y(L).click(function(){y(j).val("apply-coupon"),l.submit()});l.submit(function(){if(y(j).val()!=="apply-coupon"){var Q=this,O="",N="",R="";var P=y(K+" input#recaptcha_response_field");if(!y(k+":checked").val()){y(k).val(["PayPal"])}y(":input",Q).each(function(){var S=y.trim(y(this).attr("id")).replace(/-[0-9]+$/g,"");if(S&&(O=y.trim(y('label[for="'+S+'"]',Q).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(N=ws_plugin__s2member_validationErrors(O,this,Q)){R+=N+"\n\n"}}});if(R=y.trim(R)){alert("— Oops, you missed something: —\n\n"+R);return false}else{if(P.length&&!P.val()){alert("— Oops, you missed something: —\n\nSecurity Code missing. Please try again.");return false}}}y(c).attr(z),ws_plugin__s2member_animateProcessing(y(c)),y(L).attr(z);return true})}else{if((o=y("form#s2member-pro-paypal-checkout-form")).length===1){var C,G,r=true,F,n,e,A,b,q,s,B,D="div#s2member-pro-paypal-checkout-form-coupon-section",L=D+" input#s2member-pro-paypal-checkout-coupon-apply",J="div#s2member-pro-paypal-checkout-form-registration-section",M="div#s2member-pro-paypal-checkout-form-custom-fields-section",t="div#s2member-pro-paypal-checkout-form-billing-method-section",k=t+' input[name="s2member_pro_paypal_checkout[card_type]"]',E="div#s2member-pro-paypal-checkout-form-billing-address-section",x=y(E+" div#s2member-pro-paypal-checkout-form-ajax-tax-div"),K="div#s2member-pro-paypal-checkout-form-captcha-section",m="div#s2member-pro-paypal-checkout-form-submission-section",j=m+" input#s2member-pro-paypal-checkout-nonce",c=m+" input#s2member-pro-paypal-checkout-submit";var f='input type="submit" id="s2member-pro-paypal-checkout-submit" class="s2member-pro-paypal-checkout-submit" value="Submit Form" tabindex="410" /';var g='input type="image" src="?php echo $i ; ?/paypal-xco.gif" id="s2member-pro-paypal-checkout-submit" class="s2member-pro-paypal-checkout-submit" value="Submit Form" tabindex="410" /';ws_plugin__s2member_animateProcessing(y(c),"reset"),y(c).removeAttr("disabled"),y(L).removeAttr("disabled");(C=function(N){if(y(m+" input#s2member-pro-paypal-checkout-coupons-not-required-or-not-possible").length){y(D).hide()}else{y(D).show()}})();(G=function(N){if(y(m+" input#s2member-pro-paypal-checkout-tax-not-required-or-not-possible").length){x.hide(),r=false}})();(F=function(O){if(r&&!(O&&O.interval&&document.activeElement.id==="s2member-pro-paypal-checkout-country")){var N=y(m+" input#s2member-pro-paypal-checkout-attr").val();var R=y.trim(y(E+" input#s2member-pro-paypal-checkout-state").val());var S=y(E+" select#s2member-pro-paypal-checkout-country").val();var Q=y.trim(y(E+" input#s2member-pro-paypal-checkout-zip").val());var P=R+"|"+S+"|"+Q;if(R&&S&&Q&&P&&(!b||b!==P)&&(b=P)){(A)?A.abort():null,clearTimeout(e),e=null;x.html('divimg src="?php echo $vars [ "i" ] ; ?/ajax-loader.gif" alt="Calculating Sales Tax..." / calculating sales tax.../div');e=setTimeout(function(){A=y.post('?php echo c_ws_plugin__s2member_utils_strings:: esc_sq ( admin_url ( "/admin-ajax.php" ) ) ; ?',{action:"ws_plugin__s2member_pro_paypal_ajax_tax",ws_plugin__s2member_pro_paypal_ajax_tax:'?php echo c_ws_plugin__s2member_utils_strings:: esc_sq (c_ws_plugin__s2member_utils_encryption:: encrypt ( "ws-plugin--s2member-pro-paypal-ajax-tax" ) ) ; ?',"ws_plugin__s2member_pro_paypal_ajax_tax_vars[attr]":N,"ws_plugin__s2member_pro_paypal_ajax_tax_vars[state]":R,"ws_plugin__s2member_pro_paypal_ajax_tax_vars[country]":S,"ws_plugin__s2member_pro_paypal_ajax_tax_vars[zip]":Q},function(T,V){clearTimeout(e),e=null;try{x.html("divstrongSales Tax"+((T.trial)?" Today":"")+":/strong "+((T.tax_per)?"em"+T.tax_per+"/em ( "+T.cur_symbol+""+T.tax+" )":T.cur_symbol+""+T.tax)+"br /strong— Total"+((T.trial)?" Today":"")+":/strong "+T.cur_symbol+""+T.total+"/div")}catch(U){}},"json")},((O&&O.keyCode)?1000:100))}else{if(!R||!S||!Q||!P){x.html(""),b=null}}}})();n=function(N){setTimeout(function(){F(N)},10)};y(E+" input#s2member-pro-paypal-checkout-state").bind("keyup blur",F).bind("cut paste",n);y(E+" input#s2member-pro-paypal-checkout-zip").bind("keyup blur",F).bind("cut paste",n);y(E+" select#s2member-pro-paypal-checkout-country").bind("change",F);setInterval(function(){F({interval:true})},1000);(q=function(N){if(y(m+" input#s2member-pro-paypal-checkout-password-not-required-or-not-possible").length){y(J+" div#s2member-pro-paypal-checkout-form-password-div").hide();y(J+" div#s2member-pro-paypal-checkout-form-password-div :input").attr(h)}})();(B=function(N){if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN){y(J+" input#s2member-pro-paypal-checkout-first-name").each(function(){var O=y(this),P=O.val();(!P)?O.val(S2MEMBER_CURRENT_USER_FIRST_NAME):null});y(J+" input#s2member-pro-paypal-checkout-last-name").each(function(){var O=y(this),P=O.val();(!P)?O.val(S2MEMBER_CURRENT_USER_LAST_NAME):null});y(J+" input#s2member-pro-paypal-checkout-email").val(S2MEMBER_CURRENT_USER_EMAIL).attr(h);y(J+" input#s2member-pro-paypal-checkout-username").val(S2MEMBER_CURRENT_USER_LOGIN).attr(h);y(J+" div#s2member-pro-paypal-checkout-form-password-div").hide();y(J+" div#s2member-pro-paypal-checkout-form-password-div :input").attr(h);if(y.trim(y(J+" div#s2member-pro-paypal-checkout-form-registration-section-title").html())==="Create Profile"){y(J+" div#s2member-pro-paypal-checkout-form-registration-section-title").html("Your Profile")}y(M).hide(),y(M+" :input").attr(h)}})();(s=function(N){var O=y(k+":checked").val();if(y.inArray(O,["Visa","MasterCard","Amex","Discover"])!==-1){y(t+" div.s2member-pro-paypal-checkout-form-div").show();y(t+" div.s2member-pro-paypal-checkout-form-div :input").attr(v);y(t+" div#s2member-pro-paypal-checkout-form-card-start-date-issue-number-div").hide();y(t+" div#s2member-pro-paypal-checkout-form-card-start-date-issue-number-div :input").attr(a);y(E+" div.s2member-pro-paypal-checkout-form-div").show();y(E+" div.s2member-pro-paypal-checkout-form-div :input").attr(v);(!r)?x.hide():null;y(E).show(),y(m+" input#s2member-pro-paypal-checkout-submit").replaceWith(f);(N)?y(t+" input#s2member-pro-paypal-checkout-card-number").focus():null}else{if(y.inArray(O,["Maestro","Solo"])!==-1){y(t+" div.s2member-pro-paypal-checkout-form-div").show();y(t+" div.s2member-pro-paypal-checkout-form-div :input").attr(v);y(E+" div.s2member-pro-paypal-checkout-form-div").show();y(E+" div.s2member-pro-paypal-checkout-form-div :input").attr(v);(!r)?x.hide():null;y(E).show(),y(m+" input#s2member-pro-paypal-checkout-submit").replaceWith(f);(N)?y(t+" input#s2member-pro-paypal-checkout-card-number").focus():null}else{if((!O||O==="PayPal")&&r){y(t+" div.s2member-pro-paypal-checkout-form-div").show();y(t+" div.s2member-pro-paypal-checkout-form-div :input").attr(v);y(t+" div#s2member-pro-paypal-checkout-form-card-number-div").hide();y(t+" div#s2member-pro-paypal-checkout-form-card-number-div :input").attr(a);y(t+" div#s2member-pro-paypal-checkout-form-card-expiration-div").hide();y(t+" div#s2member-pro-paypal-checkout-form-card-expiration-div :input").attr(a);y(t+" div#s2member-pro-paypal-checkout-form-card-verification-div").hide();y(t+" div#s2member-pro-paypal-checkout-form-card-verification-div :input").attr(a);y(t+" div#s2member-pro-paypal-checkout-form-card-start-date-issue-number-div").hide();y(t+" div#s2member-pro-paypal-checkout-form-card-start-date-issue-number-div :input").attr(a);y(E+" div.s2member-pro-paypal-checkout-form-div").show();y(E+" div.s2member-pro-paypal-checkout-form-div :input").attr(v);y(E+" div#s2member-pro-paypal-checkout-form-street-div").hide();y(E+" div#s2member-pro-paypal-checkout-form-street-div :input").attr(a);y(E+" div#s2member-pro-paypal-checkout-form-city-div").hide();y(E+" div#s2member-pro-paypal-checkout-form-city-div :input").attr(a);y(E).show(),y(m+" input#s2member-pro-paypal-checkout-submit").replaceWith(g);(N)?y(E+" input#s2member-pro-paypal-checkout-state").focus():null}else{if(!O||O==="PayPal"){y(t+" div.s2member-pro-paypal-checkout-form-div").hide();y(t+" div.s2member-pro-paypal-checkout-form-div :input").attr(a);y(t+" div#s2member-pro-paypal-checkout-form-card-type-div").show();y(t+" div#s2member-pro-paypal-checkout-form-card-type-div :input").attr(v);y(E+" div.s2member-pro-paypal-checkout-form-div").hide();y(E+" div.s2member-pro-paypal-checkout-form-div :input").attr(a);y(E).hide(),y(m+" input#s2member-pro-paypal-checkout-submit").replaceWith(g);(N)?y(m+" input#s2member-pro-paypal-checkout-submit").focus():null}}}}})();y(k).click(s).change(s);y(L).click(function(){y(j).val("apply-coupon"),o.submit()});y(J+" div#s2member-pro-paypal-checkout-form-password-div :input").keyup(function(){ws_plugin__s2member_passwordStrength(y(J+" input#s2member-pro-paypal-checkout-username"),y(J+" input#s2member-pro-paypal-checkout-password1"),y(J+" input#s2member-pro-paypal-checkout-password2"),y(J+" div#s2member-pro-paypal-checkout-form-password-strength"))});o.submit(function(){if(y(j).val()!=="apply-coupon"){var Q=this,O="",N="",T="";var P=y(K+" input#recaptcha_response_field");var S=y(J+' input#s2member-pro-paypal-checkout-password1[aria-required="true"]');var R=y(J+" input#s2member-pro-paypal-checkout-password2");if(!y(k+":checked").val()){y(k).val(["PayPal"])}y(":input",Q).each(function(){var U=y.trim(y(this).attr("id")).replace(/-[0-9]+$/g,"");if(U&&(O=y.trim(y('label[for="'+U+'"]',Q).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(N=ws_plugin__s2member_validationErrors(O,this,Q)){T+=N+"\n\n"}}});if(T=y.trim(T)){alert("— Oops, you missed something: —\n\n"+T);return false}else{if(S.length&&y.trim(S.val())!==y.trim(R.val())){alert("— Oops, you missed something: —\n\nPasswords do not match up. Please try again.");return false}else{if(P.length&&!P.val()){alert("— Oops, you missed something: —\n\nSecurity Code missing. Please try again.");return false}}}}y(c).attr(z),ws_plugin__s2member_animateProcessing(y(c)),y(L).attr(z);return true})}}}}}(H=function(){y("div#s2member-pro-paypal-form-response").each(function(){var N=y(this).offset();window.scrollTo(0,N.top-100)})})()}); [ full view ]s2member-pro\includes\separates\gateways\paypal\paypal-min.js Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)Statistics: Posted by System Robot — August 15th, 2011, 3:20 pm
]]>