Source Code Documentation


s2member-pro\includes\templates\forms\authnet-checkout-form.php


  1. <?php
  2. if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
  3. exit("Do not access this file directly.");
  4. ?>
  5.  
  6. <form id="s2member-pro-authnet-checkout-form" class="s2member-pro-authnet-form s2member-pro-authnet-checkout-form" method="post" action="%%action%%">
  7.  
  8. <!-- Response Section ( this is auto-filled after form submission ). -->
  9. <div id="s2member-pro-authnet-checkout-form-response-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-checkout-form-section s2member-pro-authnet-form-response-section s2member-pro-authnet-checkout-form-response-section">
  10. <div id="s2member-pro-authnet-checkout-form-response-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-response-div s2member-pro-authnet-checkout-form-response-div">
  11. %%response%%
  12. </div>
  13. <div style="clear:both;"></div>
  14. </div>
  15.  
  16. <!-- Checkout Description ( this is the desc="" attribute from your Shortcode ). -->
  17. <div id="s2member-pro-authnet-checkout-form-description-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-checkout-form-section s2member-pro-authnet-form-description-section s2member-pro-authnet-checkout-form-description-section">
  18. <div id="s2member-pro-authnet-checkout-form-description-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-description-div s2member-pro-authnet-checkout-form-description-div">
  19. %%description%%
  20. </div>
  21. <div style="clear:both;"></div>
  22. </div>
  23.  
  24. <!-- Coupon Code ( this will ONLY be displayed if your Shortcode has this attribute: accept_coupons="1" ). -->
  25. <div id="s2member-pro-authnet-checkout-form-coupon-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-checkout-form-section s2member-pro-authnet-form-coupon-section s2member-pro-authnet-checkout-form-coupon-section">
  26. <div id="s2member-pro-authnet-checkout-form-coupon-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-checkout-form-section-title s2member-pro-authnet-form-coupon-section-title s2member-pro-authnet-checkout-form-coupon-section-title">
  27. <?php echo _x ("Coupon Code", "s2member-front", "s2member"); ?>
  28. </div>
  29. <div id="s2member-pro-authnet-checkout-form-coupon-response-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-coupon-response-div s2member-pro-authnet-checkout-form-coupon-response-div">
  30. %%coupon_response%% <!-- A Coupon response ( w/Discounts ) will be displayed here; based on the Coupon Code that was entered. -->
  31. </div>
  32. <div id="s2member-pro-authnet-checkout-form-coupon-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-coupon-div s2member-pro-authnet-checkout-form-coupon-div">
  33. <label for="s2member-pro-authnet-checkout-coupon" id="s2member-pro-authnet-checkout-form-coupon-label" class="s2member-pro-authnet-form-coupon-label s2member-pro-authnet-checkout-form-coupon-label">
  34. <span><?php echo _x ("Have a Coupon Code? ( please enter it here )", "s2member-front", "s2member"); ?></span><br />
  35. <input type="text" maxlength="100" autocomplete="off" name="s2member_pro_authnet_checkout[coupon]" id="s2member-pro-authnet-checkout-coupon" class="s2member-pro-authnet-coupon s2member-pro-authnet-checkout-coupon" value="%%coupon_value%%" tabindex="1" />
  36. </label>
  37. <input type="button" id="s2member-pro-authnet-checkout-coupon-apply" class="s2member-pro-authnet-coupon-apply s2member-pro-authnet-checkout-coupon-apply" value="<?php echo esc_attr (_x ("Apply Coupon", "s2member-front", "s2member")); ?>" tabindex="-1" />
  38. </div>
  39. <div style="clear:both;"></div>
  40. </div>
  41.  
  42. <!-- Registration Details ( Name, Email, Username, Password ). -->
  43. <!-- Some of this information will be prefilled automatically when/if a User/Member is already logged-in. -->
  44. <!-- Name fields will NOT be hidden automatically here; even if your Registration/Profile Field options dictate this behavior. -->
  45. <div id="s2member-pro-authnet-checkout-form-registration-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-checkout-form-section s2member-pro-authnet-form-registration-section s2member-pro-authnet-checkout-form-registration-section">
  46. <div id="s2member-pro-authnet-checkout-form-registration-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-checkout-form-section-title s2member-pro-authnet-form-registration-section-title s2member-pro-authnet-checkout-form-registration-section-title">
  47. <?php echo _x ("Create Profile", "s2member-front", "s2member"); ?>
  48. </div>
  49. <div id="s2member-pro-authnet-checkout-form-first-name-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-first-name-div s2member-pro-authnet-checkout-form-first-name-div">
  50. <label for="s2member-pro-authnet-checkout-first-name" id="s2member-pro-authnet-checkout-form-first-name-label" class="s2member-pro-authnet-form-first-name-label s2member-pro-authnet-checkout-form-first-name-label">
  51. <span><?php echo _x ("First Name", "s2member-front", "s2member"); ?> *</span><br />
  52. <input type="text" aria-required="true" maxlength="50" autocomplete="off" name="s2member_pro_authnet_checkout[first_name]" id="s2member-pro-authnet-checkout-first-name" class="s2member-pro-authnet-first-name s2member-pro-authnet-checkout-first-name" value="%%first_name_value%%" tabindex="10" />
  53. </label>
  54. </div>
  55. <div id="s2member-pro-authnet-checkout-form-last-name-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-last-name-div s2member-pro-authnet-checkout-form-last-name-div">
  56. <label for="s2member-pro-authnet-checkout-last-name" id="s2member-pro-authnet-checkout-form-last-name-label" class="s2member-pro-authnet-form-last-name-label s2member-pro-authnet-checkout-form-last-name-label">
  57. <span><?php echo _x ("Last Name", "s2member-front", "s2member"); ?> *</span><br />
  58. <input type="text" aria-required="true" maxlength="50" autocomplete="off" name="s2member_pro_authnet_checkout[last_name]" id="s2member-pro-authnet-checkout-last-name" class="s2member-pro-authnet-last-name s2member-pro-authnet-checkout-last-name" value="%%last_name_value%%" tabindex="20" />
  59. </label>
  60. </div>
  61. <div id="s2member-pro-authnet-checkout-form-email-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-email-div s2member-pro-authnet-checkout-form-email-div">
  62. <label for="s2member-pro-authnet-checkout-email" id="s2member-pro-authnet-checkout-form-email-label" class="s2member-pro-authnet-form-email-label s2member-pro-authnet-checkout-form-email-label">
  63. <span><?php echo _x ("Email Address", "s2member-front", "s2member"); ?> *</span><br />
  64. <input type="text" aria-required="true" data-expected="email" maxlength="100" autocomplete="off" name="s2member_pro_authnet_checkout[email]" id="s2member-pro-authnet-checkout-email" class="s2member-pro-authnet-email s2member-pro-authnet-checkout-email" value="%%email_value%%" tabindex="30" />
  65. </label>
  66. </div>
  67. <div id="s2member-pro-authnet-checkout-form-username-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-username-div s2member-pro-authnet-checkout-form-username-div">
  68. <label for="s2member-pro-authnet-checkout-username" id="s2member-pro-authnet-checkout-form-username-label" class="s2member-pro-authnet-form-username-label s2member-pro-authnet-checkout-form-username-label">
  69. <span><?php echo _x ("Username ( lowercase letters and/or numbers )", "s2member-front", "s2member"); ?> *</span><br />
  70. <input type="text" aria-required="true" maxlength="60" autocomplete="off" name="s2member_pro_authnet_checkout[username]" id="s2member-pro-authnet-checkout-username" class="s2member-pro-authnet-username s2member-pro-authnet-checkout-username" value="%%username_value%%" tabindex="40" />
  71. </label>
  72. </div>
  73. <div id="s2member-pro-authnet-checkout-form-password-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-password-div s2member-pro-authnet-checkout-form-password-div">
  74. <label for="s2member-pro-authnet-checkout-password1" id="s2member-pro-authnet-checkout-form-password-label" class="s2member-pro-authnet-form-password-label s2member-pro-authnet-checkout-form-password-label">
  75. <span><?php echo _x ("Password ( type this twice please )", "s2member-front", "s2member"); ?> *</span><br />
  76. <input type="password" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_authnet_checkout[password1]" id="s2member-pro-authnet-checkout-password1" class="s2member-pro-authnet-password1 s2member-pro-authnet-checkout-password1" value="%%password1_value%%" tabindex="50" />
  77. </label>
  78. <input type="password" maxlength="100" autocomplete="off" name="s2member_pro_authnet_checkout[password2]" id="s2member-pro-authnet-checkout-password2" class="s2member-pro-authnet-password2 s2member-pro-authnet-checkout-password2" value="%%password2_value%%" tabindex="60" />
  79. <div id="s2member-pro-authnet-checkout-form-password-strength" class="ws-plugin--s2member-password-strength s2member-pro-authnet-form-password-strength s2member-pro-authnet-checkout-form-password-strength"><em><?php echo _x ("password strength indicator", "s2member-front", "s2member"); ?></em></div>
  80. </div>
  81. <div style="clear:both;"></div>
  82. </div>
  83.  
  84. <!-- Custom Fields ( Custom Registration/Profile Fields will appear here, when/if they've been configured ). -->
  85. <!-- Custom Fields will NOT be displayed to existing Users/Members that are already logged-in. s2Member assumes this information has already been collected in that case. -->
  86. %%custom_fields%%
  87.  
  88. <!-- Billing Method ( Customers can use a Credit/Debit card only ). -->
  89. <div id="s2member-pro-authnet-checkout-form-billing-method-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-checkout-form-section s2member-pro-authnet-form-billing-method-section s2member-pro-authnet-checkout-form-billing-method-section">
  90. <div id="s2member-pro-authnet-checkout-form-billing-method-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-checkout-form-section-title s2member-pro-authnet-form-billing-method-section-title s2member-pro-authnet-checkout-form-billing-method-section-title">
  91. <?php echo _x ("Billing Method", "s2member-front", "s2member"); ?>
  92. </div>
  93. <div id="s2member-pro-authnet-checkout-form-card-type-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-card-type-div s2member-pro-authnet-checkout-form-card-type-div">
  94. %%card_type_options%%
  95. </div>
  96. <div id="s2member-pro-authnet-checkout-form-card-number-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-card-number-div s2member-pro-authnet-checkout-form-card-number-div">
  97. <label for="s2member-pro-authnet-checkout-card-number" id="s2member-pro-authnet-checkout-form-card-number-label" class="s2member-pro-authnet-form-card-number-label s2member-pro-authnet-checkout-form-card-number-label">
  98. <span><?php echo _x ("Card Number ( no dashes or spaces )", "s2member-front", "s2member"); ?> *</span><br />
  99. <input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_authnet_checkout[card_number]" id="s2member-pro-authnet-checkout-card-number" class="s2member-pro-authnet-card-number s2member-pro-authnet-checkout-card-number" value="%%card_number_value%%" tabindex="210" />
  100. </label>
  101. </div>
  102. <div id="s2member-pro-authnet-checkout-form-card-expiration-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-card-expiration-div s2member-pro-authnet-checkout-form-card-expiration-div">
  103. <label for="s2member-pro-authnet-checkout-card-expiration" id="s2member-pro-authnet-checkout-form-card-expiration-label" class="s2member-pro-authnet-form-card-expiration-label s2member-pro-authnet-checkout-form-card-expiration-label">
  104. <span><?php echo _x ("Card Expiration Date ( mm/yyyy )", "s2member-front", "s2member"); ?> *</span><br />
  105. <input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_authnet_checkout[card_expiration]" id="s2member-pro-authnet-checkout-card-expiration" class="s2member-pro-authnet-card-expiration s2member-pro-authnet-checkout-card-expiration" value="%%card_expiration_value%%" tabindex="220" />
  106. </label>
  107. </div>
  108. <div id="s2member-pro-authnet-checkout-form-card-verification-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-card-verification-div s2member-pro-authnet-checkout-form-card-verification-div">
  109. <label for="s2member-pro-authnet-checkout-card-verification" id="s2member-pro-authnet-checkout-form-card-verification-label" class="s2member-pro-authnet-form-card-verification-label s2member-pro-authnet-checkout-form-card-verification-label">
  110. <span><?php echo _x ("Card Verification Code ( 3-4 digits )", "s2member-front", "s2member"); ?> * <a href="http://en.wikipedia.org/wiki/Card_security_code" target="_blank" tabindex="-1" rel="external nofollow"><?php echo _x ("need help?", "s2member-front", "s2member"); ?></a></span><br />
  111. <input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_authnet_checkout[card_verification]" id="s2member-pro-authnet-checkout-card-verification" class="s2member-pro-authnet-card-verification s2member-pro-authnet-checkout-card-verification" value="%%card_verification_value%%" tabindex="230" />
  112. </label>
  113. </div>
  114. <!-- This is displayed only when Maestro®/Solo® cards are selected as the Payment Method. -->
  115. <div id="s2member-pro-authnet-checkout-form-card-start-date-issue-number-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-card-start-date-issue-number-div s2member-pro-authnet-checkout-form-card-start-date-issue-number-div">
  116. <label for="s2member-pro-authnet-checkout-card-start-date-issue-number" id="s2member-pro-authnet-checkout-form-card-start-date-issue-number-label" class="s2member-pro-authnet-form-card-start-date-issue-number-label s2member-pro-authnet-checkout-form-card-start-date-issue-number-label">
  117. <span><?php echo _x ("Card Start Date ( mm/yyyy ), or Issue Number", "s2member-front", "s2member"); ?> *</span><br />
  118. <input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_authnet_checkout[card_start_date_issue_number]" id="s2member-pro-authnet-checkout-card-start-date-issue-number" class="s2member-pro-authnet-card-start-date-issue-number s2member-pro-authnet-checkout-card-start-date-issue-number" value="%%card_start_date_issue_number_value%%" tabindex="240" />
  119. </label>
  120. </div>
  121. <div style="clear:both;"></div>
  122. </div>
  123.  
  124. <!-- Billing Address ( hidden dynamically when/if no Payment Method is selected yet ). -->
  125. <div id="s2member-pro-authnet-checkout-form-billing-address-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-checkout-form-section s2member-pro-authnet-form-billing-address-section s2member-pro-authnet-checkout-form-billing-address-section">
  126. <div id="s2member-pro-authnet-checkout-form-billing-address-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-checkout-form-section-title s2member-pro-authnet-form-billing-address-section-title s2member-pro-authnet-checkout-form-billing-address-section-title">
  127. <?php echo _x ("Billing Address", "s2member-front", "s2member"); ?>
  128. </div>
  129. <div id="s2member-pro-authnet-checkout-form-street-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-street-div s2member-pro-authnet-checkout-form-street-div">
  130. <label for="s2member-pro-authnet-checkout-street" id="s2member-pro-authnet-checkout-form-street-label" class="s2member-pro-authnet-form-street-label s2member-pro-authnet-checkout-form-street-label">
  131. <span><?php echo _x ("Street Address", "s2member-front", "s2member"); ?> *</span><br />
  132. <input type="text" aria-required="true" maxlength="60" autocomplete="off" name="s2member_pro_authnet_checkout[street]" id="s2member-pro-authnet-checkout-street" class="s2member-pro-authnet-street s2member-pro-authnet-checkout-street" value="%%street_value%%" tabindex="300" />
  133. </label>
  134. </div>
  135. <div id="s2member-pro-authnet-checkout-form-city-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-city-div s2member-pro-authnet-checkout-form-city-div">
  136. <label for="s2member-pro-authnet-checkout-city" id="s2member-pro-authnet-checkout-form-city-label" class="s2member-pro-authnet-form-city-label s2member-pro-authnet-checkout-form-city-label">
  137. <span><?php echo _x ("City / Town", "s2member-front", "s2member"); ?> *</span><br />
  138. <input type="text" aria-required="true" maxlength="40" autocomplete="off" name="s2member_pro_authnet_checkout[city]" id="s2member-pro-authnet-checkout-city" class="s2member-pro-authnet-city s2member-pro-authnet-checkout-city" value="%%city_value%%" tabindex="310" />
  139. </label>
  140. </div>
  141. <div id="s2member-pro-authnet-checkout-form-state-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-state-div s2member-pro-authnet-checkout-form-state-div">
  142. <label for="s2member-pro-authnet-checkout-state" id="s2member-pro-authnet-checkout-form-state-label" class="s2member-pro-authnet-form-state-label s2member-pro-authnet-checkout-form-state-label">
  143. <span><?php echo _x ("State / Province", "s2member-front", "s2member"); ?> *</span><br />
  144. <input type="text" aria-required="true" maxlength="40" autocomplete="off" name="s2member_pro_authnet_checkout[state]" id="s2member-pro-authnet-checkout-state" class="s2member-pro-authnet-state s2member-pro-authnet-checkout-state" value="%%state_value%%" tabindex="320" />
  145. </label>
  146. </div>
  147. <div id="s2member-pro-authnet-checkout-form-country-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-country-div s2member-pro-authnet-checkout-form-country-div">
  148. <label for="s2member-pro-authnet-checkout-country" id="s2member-pro-authnet-checkout-form-country-label" class="s2member-pro-authnet-form-country-label s2member-pro-authnet-checkout-form-country-label">
  149. <span><?php echo _x ("Country", "s2member-front", "s2member"); ?> *</span><br />
  150. <select aria-required="true" name="s2member_pro_authnet_checkout[country]" id="s2member-pro-authnet-checkout-country" class="s2member-pro-authnet-country s2member-pro-authnet-checkout-country" tabindex="330">
  151. %%country_options%%
  152. </select>
  153. </label>
  154. </div>
  155. <div id="s2member-pro-authnet-checkout-form-zip-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-zip-div s2member-pro-authnet-checkout-form-zip-div">
  156. <label for="s2member-pro-authnet-checkout-zip" id="s2member-pro-authnet-checkout-form-zip-label" class="s2member-pro-authnet-form-zip-label s2member-pro-authnet-checkout-form-zip-label">
  157. <span><?php echo _x ("Postal / Zip Code", "s2member-front", "s2member"); ?> *</span><br />
  158. <input type="text" aria-required="true" maxlength="20" autocomplete="off" name="s2member_pro_authnet_checkout[zip]" id="s2member-pro-authnet-checkout-zip" class="s2member-pro-authnet-zip s2member-pro-authnet-checkout-zip" value="%%zip_value%%" tabindex="340" />
  159. </label>
  160. </div>
  161. <div id="s2member-pro-authnet-checkout-form-ajax-tax-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-ajax-tax-div s2member-pro-authnet-checkout-form-ajax-tax-div">
  162. <!-- Sales Tax will be displayed here via Ajax; based on state, country, and/or zip code range. -->
  163. </div>
  164. <div style="clear:both;"></div>
  165. </div>
  166.  
  167. <!-- Captcha ( A reCaptcha section, with a required security code will appear here; if captcha="1" ). -->
  168. %%captcha%%
  169.  
  170. <!-- Checkout Now ( this holds the submit button, and also some dynamic hidden input variables ). -->
  171. <div id="s2member-pro-authnet-checkout-form-submission-section" class="s2member-pro-authnet-form-section s2member-pro-authnet-checkout-form-section s2member-pro-authnet-form-submission-section s2member-pro-authnet-checkout-form-submission-section">
  172. <div id="s2member-pro-authnet-checkout-form-submission-section-title" class="s2member-pro-authnet-form-section-title s2member-pro-authnet-checkout-form-section-title s2member-pro-authnet-checkout-form-submission-section-title">
  173. <?php echo _x ("Checkout Now", "s2member-front", "s2member"); ?>
  174. </div>
  175. %%opt_in%% <!-- s2Member will fill this when/if there are list servers integrated, and the Opt-In Box is turned on. -->
  176. <div id="s2member-pro-authnet-checkout-form-submit-div" class="s2member-pro-authnet-form-div s2member-pro-authnet-checkout-form-div s2member-pro-authnet-form-submit-div s2member-pro-authnet-checkout-form-submit-div">
  177. %%hidden_inputs%% <!-- Auto-filled by the s2Member software. Do NOT remove this under any circumstance. -->
  178. <input type="submit" id="s2member-pro-authnet-checkout-submit" class="s2member-pro-authnet-submit s2member-pro-authnet-checkout-submit" value="<?php echo esc_attr (_x ("Submit Form", "s2member-front", "s2member")); ?>" tabindex="600" />
  179. </div>
  180. <div style="clear:both;"></div>
  181. </div>
  182. </form>

s2member-pro\includes\templates\forms\authnet-checkout-form.php

Source Code Documentation