Example #1
0
            ?>
</label>
								<input class="input" id="CVV"
								       <?php 
            if ($gateway != "stripe" && $gateway != "braintree") {
                ?>
name="CVV"<?php 
            }
            ?>
								       type="text" size="4" value="<?php 
            if (!empty($_REQUEST['CVV'])) {
                echo esc_attr($_REQUEST['CVV']);
            }
            ?>
" class=" <?php 
            echo pmpro_getClassForField("CVV");
            ?>
"
								       <?php 
            if ($gateway == "braintree") {
                ?>
data-encrypted-name="cvv"<?php 
            }
            ?>
 />
								<small>(<a href="javascript:void(0);"
								           onclick="javascript:window.open('<?php 
            echo pmpro_https_filter(PMPRO_URL);
            ?>
/pages/popup-cvv.html','cvv','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=600, height=475');"><?php 
            _ex("what's this?", 'link to CVV help', 'vibe');
</a>)</small>
					</div>
					<?php 
    }
    ?>

					<?php 
    if ($pmpro_show_discount_code) {
        ?>
					<div class="pmpro_payment-discount-code">
						<label for="discount_code"><?php 
        _e('Discount Code', 'pmpro');
        ?>
</label>
						<input class="input <?php 
        echo pmpro_getClassForField("discount_code");
        ?>
" id="discount_code" name="discount_code" type="text" size="20" value="<?php 
        echo esc_attr($discount_code);
        ?>
" />
						<input type="button" id="discount_code_button" name="discount_code_button" value="<?php 
        _e('Apply', 'pmpro');
        ?>
" />
						<p id="discount_code_message" class="pmpro_message" style="display: none;"></p>
					</div>
					<?php 
    }
    ?>
Example #3
0
    function displayAtCheckout()
    {
        global $current_user;
        //value passed yet?
        if (isset($_REQUEST[$this->name])) {
            $value = $_REQUEST[$this->name];
        } elseif (isset($_SESSION[$this->name])) {
            //file or value?
            if (is_array($_SESSION[$this->name])) {
                $_FILES[$this->name] = $_SESSION[$this->name];
                $this->file = $_SESSION[$this->name]['name'];
                $value = $_SESSION[$this->name]['name'];
            } else {
                $value = $_SESSION[$this->name];
            }
        } elseif (!empty($current_user->ID) && metadata_exists("user", $current_user->ID, $this->name)) {
            $meta = get_user_meta($current_user->ID, $this->name, true);
            if (is_array($meta) && !empty($meta['filename'])) {
                $this->file = get_user_meta($current_user->ID, $this->name, true);
                $value = $this->file['filename'];
            } else {
                $value = $meta;
            }
        } elseif (!empty($this->value)) {
            $value = $this->value;
        } else {
            $value = "";
        }
        //update class value
        $this->class .= " " . pmpro_getClassForField($this->name);
        ?>
			<div id="<?php 
        echo $this->id;
        ?>
_div" <?php 
        if (!empty($this->divclass)) {
            echo 'class="' . $this->divclass . '"';
        }
        ?>
>
				<?php 
        if (!empty($this->showmainlabel)) {
            ?>
					<label for="<?php 
            echo esc_attr($this->name);
            ?>
"><?php 
            echo $this->label;
            ?>
</label>
					<?php 
            if (!empty($this->required) && !empty($this->showrequired) && $this->showrequired === 'label') {
                ?>
<span class="pmpro_asterisk"> *</span><?php 
            }
            ?>
					<?php 
            $this->display($value);
            ?>
				<?php 
        } else {
            ?>
					<div class="leftmar">
						<?php 
            $this->display($value);
            ?>
					</div>
				<?php 
        }
        ?>
				
				<?php 
        if (!empty($this->hint)) {
            ?>
					<div class="leftmar"><small class="lite"><?php 
            echo $this->hint;
            ?>
</small></div>
				<?php 
        }
        ?>
			</div>	
			<?php 
        $this->getDependenciesJS();
    }
    /**
     * Use our own payment fields at checkout. (Remove the name attributes and set some data-encrypted-name attributes.)
     * @since 1.8
     */
    static function pmpro_include_payment_information_fields($include)
    {
        //global vars
        global $pmpro_requirebilling, $pmpro_show_discount_code, $discount_code, $CardType, $AccountNumber, $ExpirationMonth, $ExpirationYear;
        //get accepted credit cards
        $pmpro_accepted_credit_cards = pmpro_getOption("accepted_credit_cards");
        $pmpro_accepted_credit_cards = explode(",", $pmpro_accepted_credit_cards);
        $pmpro_accepted_credit_cards_string = pmpro_implodeToEnglish($pmpro_accepted_credit_cards);
        //include ours
        ?>
			<table id="pmpro_payment_information_fields" class="pmpro_checkout top1em" width="100%" cellpadding="0" cellspacing="0" border="0" <?php 
        if (!$pmpro_requirebilling || apply_filters("pmpro_hide_payment_information_fields", false)) {
            ?>
style="display: none;"<?php 
        }
        ?>
>
			<thead>
				<tr>
					<th>
						<span class="pmpro_thead-name"><?php 
        _e('Payment Information', 'pmpro');
        ?>
</span>
						<span class="pmpro_thead-msg"><?php 
        printf(__('We Accept %s', 'pmpro'), $pmpro_accepted_credit_cards_string);
        ?>
</span>
					</th>
				</tr>
			</thead>
			<tbody>                    
				<tr valign="top">		
					<td>	
						<?php 
        $sslseal = pmpro_getOption("sslseal");
        if ($sslseal) {
            ?>
								<div class="pmpro_sslseal"><?php 
            echo stripslashes($sslseal);
            ?>
</div>
							<?php 
        }
        ?>
						<?php 
        $pmpro_include_cardtype_field = apply_filters('pmpro_include_cardtype_field', true);
        if ($pmpro_include_cardtype_field) {
            ?>
							<div class="pmpro_payment-card-type">
								<label for="CardType"><?php 
            _e('Card Type', 'pmpro');
            ?>
</label>
								<select id="CardType" name="CardType" class=" <?php 
            echo pmpro_getClassForField("CardType");
            ?>
">
									<?php 
            foreach ($pmpro_accepted_credit_cards as $cc) {
                ?>
										<option value="<?php 
                echo $cc;
                ?>
" <?php 
                if ($CardType == $cc) {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $cc;
                ?>
</option>
									<?php 
            }
            ?>
												
								</select> 
							</div>
						<?php 
        }
        ?>
					
						<div class="pmpro_payment-account-number">
							<label for="AccountNumber"><?php 
        _e('Card Number', 'pmpro');
        ?>
</label>
							<input id="AccountNumber" name="AccountNumber" class="input <?php 
        echo pmpro_getClassForField("AccountNumber");
        ?>
" type="text" size="25" value="<?php 
        echo esc_attr($AccountNumber);
        ?>
" data-encrypted-name="number" autocomplete="off" /> 
						</div>
					
						<div class="pmpro_payment-expiration">
							<label for="ExpirationMonth"><?php 
        _e('Expiration Date', 'pmpro');
        ?>
</label>
							<select id="ExpirationMonth" name="ExpirationMonth" class=" <?php 
        echo pmpro_getClassForField("ExpirationMonth");
        ?>
">
								<option value="01" <?php 
        if ($ExpirationMonth == "01") {
            ?>
selected="selected"<?php 
        }
        ?>
>01</option>
								<option value="02" <?php 
        if ($ExpirationMonth == "02") {
            ?>
selected="selected"<?php 
        }
        ?>
>02</option>
								<option value="03" <?php 
        if ($ExpirationMonth == "03") {
            ?>
selected="selected"<?php 
        }
        ?>
>03</option>
								<option value="04" <?php 
        if ($ExpirationMonth == "04") {
            ?>
selected="selected"<?php 
        }
        ?>
>04</option>
								<option value="05" <?php 
        if ($ExpirationMonth == "05") {
            ?>
selected="selected"<?php 
        }
        ?>
>05</option>
								<option value="06" <?php 
        if ($ExpirationMonth == "06") {
            ?>
selected="selected"<?php 
        }
        ?>
>06</option>
								<option value="07" <?php 
        if ($ExpirationMonth == "07") {
            ?>
selected="selected"<?php 
        }
        ?>
>07</option>
								<option value="08" <?php 
        if ($ExpirationMonth == "08") {
            ?>
selected="selected"<?php 
        }
        ?>
>08</option>
								<option value="09" <?php 
        if ($ExpirationMonth == "09") {
            ?>
selected="selected"<?php 
        }
        ?>
>09</option>
								<option value="10" <?php 
        if ($ExpirationMonth == "10") {
            ?>
selected="selected"<?php 
        }
        ?>
>10</option>
								<option value="11" <?php 
        if ($ExpirationMonth == "11") {
            ?>
selected="selected"<?php 
        }
        ?>
>11</option>
								<option value="12" <?php 
        if ($ExpirationMonth == "12") {
            ?>
selected="selected"<?php 
        }
        ?>
>12</option>
							</select>/<select id="ExpirationYear" name="ExpirationYear" class=" <?php 
        echo pmpro_getClassForField("ExpirationYear");
        ?>
">
								<?php 
        for ($i = date_i18n("Y"); $i < date_i18n("Y") + 10; $i++) {
            ?>
									<option value="<?php 
            echo $i;
            ?>
" <?php 
            if ($ExpirationYear == $i) {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo $i;
            ?>
</option>
								<?php 
        }
        ?>
							</select> 					
						</div>
					
						<?php 
        $pmpro_show_cvv = apply_filters("pmpro_show_cvv", true);
        if ($pmpro_show_cvv) {
            ?>
						<div class="pmpro_payment-cvv">
							<label for="CVV"><?php 
            _e('CVV', 'pmpro');
            ?>
</label>
							<input class="input" id="CVV" name="cvv" type="text" size="4" value="<?php 
            if (!empty($_REQUEST['CVV'])) {
                echo esc_attr($_REQUEST['CVV']);
            }
            ?>
" class=" <?php 
            echo pmpro_getClassForField("CVV");
            ?>
" data-encrypted-name="cvv" />  <small>(<a href="javascript:void(0);" onclick="javascript:window.open('<?php 
            echo pmpro_https_filter(PMPRO_URL);
            ?>
/pages/popup-cvv.html','cvv','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=600, height=475');"><?php 
            _e("what's this?", 'pmpro');
            ?>
</a>)</small>
						</div>
						<?php 
        }
        ?>
						
						<?php 
        if ($pmpro_show_discount_code) {
            ?>
						<div class="pmpro_payment-discount-code">
							<label for="discount_code"><?php 
            _e('Discount Code', 'pmpro');
            ?>
</label>
							<input class="input <?php 
            echo pmpro_getClassForField("discount_code");
            ?>
" id="discount_code" name="discount_code" type="text" size="20" value="<?php 
            echo esc_attr($discount_code);
            ?>
" />
							<input type="button" id="discount_code_button" name="discount_code_button" value="<?php 
            _e('Apply', 'pmpro');
            ?>
" />
							<p id="discount_code_message" class="pmpro_message" style="display: none;"></p>
						</div>
						<?php 
        }
        ?>
						
					</td>			
				</tr>
			</tbody>
			</table>
			<?php 
        //don't include the default
        return false;
    }
    /**
     * Use our own payment fields at checkout. (Remove the name attributes.)		
     * @since 1.8
     */
    static function pmpro_include_payment_information_fields($include)
    {
        //global vars
        global $pmpro_requirebilling, $pmpro_show_discount_code, $discount_code, $CardType, $AccountNumber, $ExpirationMonth, $ExpirationYear;
        //get accepted credit cards
        $pmpro_accepted_credit_cards = pmpro_getOption("accepted_credit_cards");
        $pmpro_accepted_credit_cards = explode(",", $pmpro_accepted_credit_cards);
        $pmpro_accepted_credit_cards_string = pmpro_implodeToEnglish($pmpro_accepted_credit_cards);
        //include ours
        ?>
			<table id="pmpro_payment_information_fields" class="pmpro_checkout top1em" width="100%" cellpadding="0" cellspacing="0" border="0" <?php 
        if (!$pmpro_requirebilling || apply_filters("pmpro_hide_payment_information_fields", false)) {
            ?>
style="display: none;"<?php 
        }
        ?>
>
			<thead>
				<tr>
					<th><span class="pmpro_thead-msg"><?php 
        printf(__('We Accept %s', 'pmpro'), $pmpro_accepted_credit_cards_string);
        ?>
</span><?php 
        _e('Payment Information', 'pmpro');
        ?>
</th>
				</tr>
			</thead>
			<tbody>
				<tr valign="top">
					<td>
						<?php 
        $sslseal = pmpro_getOption("sslseal");
        if ($sslseal) {
            ?>
								<div class="pmpro_sslseal"><?php 
            echo stripslashes($sslseal);
            ?>
</div>
							<?php 
        }
        ?>
						<?php 
        $pmpro_include_cardtype_field = apply_filters('pmpro_include_cardtype_field', false);
        if ($pmpro_include_cardtype_field) {
            ?>
							<div class="pmpro_payment-card-type">
								<label for="CardType"><?php 
            _e('Card Type', 'pmpro');
            ?>
</label>
								<select id="CardType" class=" <?php 
            echo pmpro_getClassForField("CardType");
            ?>
">
									<?php 
            foreach ($pmpro_accepted_credit_cards as $cc) {
                ?>
										<option value="<?php 
                echo $cc;
                ?>
" <?php 
                if ($CardType == $cc) {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo $cc;
                ?>
</option>
									<?php 
            }
            ?>
								</select>
							</div>
						<?php 
        } else {
            ?>
							<input type="hidden" id="CardType" name="CardType" value="<?php 
            echo esc_attr($CardType);
            ?>
" />
							<script>
								<!--
								jQuery(document).ready(function() {
										jQuery('#AccountNumber').validateCreditCard(function(result) {
											var cardtypenames = {
												"amex":"American Express",
												"diners_club_carte_blanche":"Diners Club Carte Blanche",
												"diners_club_international":"Diners Club International",
												"discover":"Discover",
												"jcb":"JCB",
												"laser":"Laser",
												"maestro":"Maestro",
												"mastercard":"Mastercard",
												"visa":"Visa",
												"visa_electron":"Visa Electron"
											}

											if(result.card_type)
												jQuery('#CardType').val(cardtypenames[result.card_type.name]);
											else
												jQuery('#CardType').val('Unknown Card Type');
										});
								});
								-->
							</script>
							<?php 
        }
        ?>

						<div class="pmpro_payment-account-number">
							<label for="AccountNumber"><?php 
        _e('Card Number', 'pmpro');
        ?>
</label>
							<input id="AccountNumber" class="input <?php 
        echo pmpro_getClassForField("AccountNumber");
        ?>
" type="text" size="25" value="<?php 
        echo esc_attr($AccountNumber);
        ?>
" autocomplete="off" />
						</div>

						<div class="pmpro_payment-expiration">
							<label for="ExpirationMonth"><?php 
        _e('Expiration Date', 'pmpro');
        ?>
</label>
							<select id="ExpirationMonth" class=" <?php 
        echo pmpro_getClassForField("ExpirationMonth");
        ?>
">
								<option value="01" <?php 
        if ($ExpirationMonth == "01") {
            ?>
selected="selected"<?php 
        }
        ?>
>01</option>
								<option value="02" <?php 
        if ($ExpirationMonth == "02") {
            ?>
selected="selected"<?php 
        }
        ?>
>02</option>
								<option value="03" <?php 
        if ($ExpirationMonth == "03") {
            ?>
selected="selected"<?php 
        }
        ?>
>03</option>
								<option value="04" <?php 
        if ($ExpirationMonth == "04") {
            ?>
selected="selected"<?php 
        }
        ?>
>04</option>
								<option value="05" <?php 
        if ($ExpirationMonth == "05") {
            ?>
selected="selected"<?php 
        }
        ?>
>05</option>
								<option value="06" <?php 
        if ($ExpirationMonth == "06") {
            ?>
selected="selected"<?php 
        }
        ?>
>06</option>
								<option value="07" <?php 
        if ($ExpirationMonth == "07") {
            ?>
selected="selected"<?php 
        }
        ?>
>07</option>
								<option value="08" <?php 
        if ($ExpirationMonth == "08") {
            ?>
selected="selected"<?php 
        }
        ?>
>08</option>
								<option value="09" <?php 
        if ($ExpirationMonth == "09") {
            ?>
selected="selected"<?php 
        }
        ?>
>09</option>
								<option value="10" <?php 
        if ($ExpirationMonth == "10") {
            ?>
selected="selected"<?php 
        }
        ?>
>10</option>
								<option value="11" <?php 
        if ($ExpirationMonth == "11") {
            ?>
selected="selected"<?php 
        }
        ?>
>11</option>
								<option value="12" <?php 
        if ($ExpirationMonth == "12") {
            ?>
selected="selected"<?php 
        }
        ?>
>12</option>
							</select>/<select id="ExpirationYear" class=" <?php 
        echo pmpro_getClassForField("ExpirationYear");
        ?>
">
								<?php 
        for ($i = date("Y"); $i < date("Y") + 10; $i++) {
            ?>
									<option value="<?php 
            echo $i;
            ?>
" <?php 
            if ($ExpirationYear == $i) {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo $i;
            ?>
</option>
								<?php 
        }
        ?>
							</select>
						</div>

						<?php 
        $pmpro_show_cvv = apply_filters("pmpro_show_cvv", true);
        if ($pmpro_show_cvv) {
            ?>
						<div class="pmpro_payment-cvv">
							<label for="CVV"><?php 
            _ex('CVV', 'Credit card security code, CVV/CCV/CVV2', 'pmpro');
            ?>
</label>
							<input class="input" id="CVV" type="text" size="4" value="<?php 
            if (!empty($_REQUEST['CVV'])) {
                echo esc_attr($_REQUEST['CVV']);
            }
            ?>
" class=" <?php 
            echo pmpro_getClassForField("CVV");
            ?>
" />  <small>(<a href="javascript:void(0);" onclick="javascript:window.open('<?php 
            echo pmpro_https_filter(PMPRO_URL);
            ?>
/pages/popup-cvv.html','cvv','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=600, height=475');"><?php 
            _ex("what's this?", 'link to CVV help', 'pmpro');
            ?>
</a>)</small>
						</div>
						<?php 
        }
        ?>

						<?php 
        if ($pmpro_show_discount_code) {
            ?>
						<div class="pmpro_payment-discount-code">
							<label for="discount_code"><?php 
            _e('Discount Code', 'pmpro');
            ?>
</label>
							<input class="input <?php 
            echo pmpro_getClassForField("discount_code");
            ?>
" id="discount_code" name="discount_code" type="text" size="20" value="<?php 
            echo esc_attr($discount_code);
            ?>
" />
							<input type="button" id="discount_code_button" name="discount_code_button" value="<?php 
            _e('Apply', 'pmpro');
            ?>
" />
							<p id="discount_code_message" class="pmpro_message" style="display: none;"></p>
						</div>
						<?php 
        }
        ?>

					</td>
				</tr>
			</tbody>
			</table>
			<?php 
        //don't include the default
        return false;
    }
function pmproan2c_pmpro_checkout_after_email()
{
    global $pmpro_required_user_fields;
    $pmpro_required_user_fields["first_name"] = "";
    $pmpro_required_user_fields["last_name"] = "";
    $pmpro_required_user_fields["country"] = "";
    $pmpro_required_user_fields["state"] = "";
    $pmpro_required_user_fields["city"] = "";
    $pmpro_required_user_fields["address"] = "";
    $pmpro_required_user_fields["zipcode"] = "";
    $pmpro_required_user_fields["phone"] = "";
    $first_name = get_field_value("first_name");
    $last_name = get_field_value("last_name");
    $country = get_field_value("country");
    $state = get_field_value("state");
    $city = get_field_value("city");
    $address = get_field_value("address");
    $zipcode = get_field_value("zipcode");
    $phone = get_field_value("phone");
    $country_code = get_field_value("country_code");
    if ($phone) {
        $phoneUtil = \libphonenumber\PhoneNumberUtil::getInstance();
        try {
            $numberProto = $phoneUtil->parse($phone, strtoupper($country_code));
            $phone = $phoneUtil->format($numberProto, \libphonenumber\PhoneNumberFormat::INTERNATIONAL);
        } catch (\libphonenumber\NumberParseException $e) {
            //var_dump($e);
        }
    }
    ?>

	<div>
		<label for="first_name">First Name</label>
		<input
			id="first_name"
			name="first_name"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('first_name');
    ?>
"
			size="30"
			value="<?php 
    echo $first_name;
    ?>
" />
	</div>

	<div>
		<label for="last_name">Last Name</label>
		<input
			id="last_name"
			name="last_name"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('last_name');
    ?>
"
			size="30"
			value="<?php 
    echo $last_name;
    ?>
" />
	</div>

	<div>
		<label for="country">Country</label>
		<select
			id="country"
			name="country"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('country');
    ?>
">
			<?php 
    echo get_countries($country);
    ?>
		</select>
	</div>

	<div>
		<label for="state">State</label>
		<input
			id="state"
			name="state"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('state');
    ?>
"
			size="30"
			value="<?php 
    echo $state;
    ?>
" />
	</div>

	<div>
		<label for="city">City</label>
		<input
			id="city"
			name="city"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('city');
    ?>
"
			size="30"
			value="<?php 
    echo $city;
    ?>
" />
	</div>

	<div>
		<label for="address">Street</label>
		<input
			id="address"
			name="address"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('address');
    ?>
"
			size="30"
			value="<?php 
    echo $address;
    ?>
" />
	</div>

	<div>
		<label for="zipcode">Zip Code</label>
		<input
			id="zipcode"
			name="zipcode"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('zipcode');
    ?>
"
			size="30"
			value="<?php 
    echo $zipcode;
    ?>
" />
	</div>

	<div>
		<label for="phone">Phone Number</label>
		<input
			id="phone"
			name="phone"
			type="text"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('phone');
    ?>
"
			size="30"
			value="<?php 
    echo $phone;
    ?>
" />
	</div> 

	<input
		id="country_code"
		name="country_code"
		type="hidden"
		value="<?php 
    echo $country_code;
    ?>
" />

	<div class="<?php 
    echo pmpro_getClassForField('agree');
    ?>
 pmpro_checkbox" style="clear: both;">
		<input
			type="checkbox"
			name="agree"
			class="input pmpro_required <?php 
    echo pmpro_getClassForField('agree');
    ?>
">
			I agree to <a href="javascript:void(0)" data-toggle="modal" data-target="#myModal">Terms and Conditions</a>
	</div>

	<?php 
}
Example #7
0
					$pmpro_show_cvv = apply_filters("pmpro_show_cvv", true);
					if($pmpro_show_cvv)
					{
				?>
				<div>
					<label for="CVV">CVV</label>
					<input class="input" id="CVV" <?php if($gateway != "stripe" && $gateway != "braintree") { ?>name="CVV"<?php } ?> type="text" size="4" value="<?php if(!empty($_REQUEST['CVV'])) { echo esc_attr($_REQUEST['CVV']); }?>" class=" <?php echo pmpro_getClassForField("CVV");?>" <?php if($gateway == "braintree") { ?>data-encrypted-name="cvv"<?php } ?> />  <small>(<a href="javascript:void(0);" onclick="javascript:window.open('<?php echo pmpro_https_filter(PMPRO_URL)?>/pages/popup-cvv.html','cvv','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=600, height=475');">what's this?</a>)</small>
				</div>
				<?php
					}
				?>
				
				<?php if($pmpro_show_discount_code) { ?>
				<div>
					<label for="discount_code">Discount Code</label>
					<input class="input <?php echo pmpro_getClassForField("discount_code");?>" id="discount_code" name="discount_code" type="text" size="20" value="<?php echo esc_attr($discount_code)?>" />
					<input type="button" id="discount_code_button" name="discount_code_button" value="Apply" />
					<p id="discount_code_message" class="pmpro_message" style="display: none;"></p>
				</div>
				<?php } ?>
				
			</td>			
		</tr>
	</tbody>
	</table>	
	<script>
		//checking a discount code
		jQuery('#discount_code_button').click(function() {
			var code = jQuery('#discount_code').val();
			var level_id = jQuery('#level').val();
												
					<?php 
if (pmpro_getCurrencyPosition() == "right") {
    echo $pmpro_currency_symbol;
}
?>
				</td>
			</tr>						
			
			<tr>
				<th scope="row" valign="top"><label for="order_notes"><?php 
_e('Order Notes', 'pmpro');
?>
:</label></th>
				<td>
					<textarea name="order_notes" id="order_notes" rows="5" cols="80" class="<?php 
echo pmpro_getClassForField("order_notes");
?>
"><?php 
echo esc_textarea($order_notes);
?>
</textarea>
				</td>
			</tr>			
		</tbody>
		</table>
		<div>
			<input type="hidden" name="action" value="add_member" />
			<?php 
submit_button('Add Member');
?>
		</div>
function pmprorh_register_form_shortcode($atts, $content = null, $code = "")
{
    // $atts    ::= array of attributes
    // $content ::= text within enclosing form of shortcode element
    // $code    ::= the shortcode found, when == callback name
    // examples: [pmprorh_register_form]
    /*
    extract(shortcode_atts(array(
    	'level' => NULL
    ), $atts));
    */
    if (!empty($_REQUEST['wp-submit'])) {
        $user_login = $_REQUEST['user_login'];
        $user_email = $_REQUEST['user_email'];
    } else {
        $user_login = "";
        $user_email = "";
    }
    global $current_user, $pmpro_msg, $pmpro_msgt, $pmprorh_options;
    ob_start();
    ?>
	
<form name="registerform" id="registerform" action="" method="post">
	<?php 
    if ($pmpro_msg) {
        ?>
		<div id="pmpro_message" class="pmpro_message <?php 
        echo $pmpro_msgt;
        ?>
"><?php 
        echo $pmpro_msg;
        ?>
</div>
	<?php 
    } else {
        ?>
		<div id="pmpro_message" class="pmpro_message" style="display: none;"></div>
	<?php 
    }
    ?>
	
	<?php 
    if (empty($pmprorh_options['use_email_for_login'])) {
        ?>
	<div id="div_user_login">
		<label>Username</label>
		<input type="text" name="user_login" id="user_login" class="input" value="<?php 
        echo esc_attr($user_login);
        ?>
" size="25" /> <span class="required">* Required</span>
	</div>
	<?php 
    }
    ?>
	<div id="div_user_email">
		<label>E-mail</label>
		<input type="text" name="user_email" id="user_email" class="input" value="<?php 
    echo esc_attr($user_email);
    ?>
" size="25" /> <span class="required">* Required</span>
	</div>
	<?php 
    do_action("pmprorh_after_email");
    ?>
	<div class="pmpro_hidden">
        	<label for="fullname"><?php 
    _e('Full Name', 'pmpro');
    ?>
</label>
        	<input id="fullname" name="fullname" type="text" class="input <?php 
    echo pmpro_getClassForField("fullname");
    ?>
" size="30" value="" /> <strong><?php 
    _e('LEAVE THIS BLANK', 'pmpro');
    ?>
</strong>
    	</div>
	<div id="div_pass1">
		<label>Password</label>
		<input autocomplete="off" name="pass1" id="pass1" size="25" class="input" value="" type="password" /> <span class="required">* Required</span>
	</div>
	<?php 
    $pmpro_checkout_confirm_password = apply_filters("pmpro_checkout_confirm_password", true);
    if ($pmpro_checkout_confirm_password) {
        ?>
		<div id="div_pass2">
			<label>Confirm Password</label>
			<input autocomplete="off" name="pass2" id="pass2" size="25" class="input" value="" type="password" /> <span class="required">* Required</span>
		</div>   
		<?php 
    }
    ?>
	
	<?php 
    do_action("pmprorh_after_password");
    ?>
    
    <?php 
    do_action("pmprorh_register_form");
    ?>
	
	<br class="clear" />
	<div class="submit">
		<label>&nbsp;</label>
		<input type="submit" name="wp-submit" id="wp-submit" value="Register" tabindex="100" />
	</div>
</form>

<p id="nav">
<a href="<?php 
    echo home_url("wp-login.php");
    ?>
">Log in</a> |
<a href="<?php 
    echo home_url("/wp-login.php?action=lostpassword");
    ?>
" title="Password Lost and Found">Lost your password?</a>
</p>

<p class="top1em required">* Required Field</p>
	<?php 
    $temp_content = ob_get_contents();
    ob_end_clean();
    return $temp_content;
}
function pmproio_pmpro_checkout_boxes()
{
    global $pmpro_level, $current_user, $pmpro_review;
    if (pmproio_isInviteLevel($pmpro_level->id)) {
        if (!empty($_REQUEST['invite_code'])) {
            $invite_code = $_REQUEST['invite_code'];
        } elseif (!empty($_SESSION['invite_code'])) {
            $invite_code = $_SESSION['invite_code'];
        } elseif (is_user_logged_in()) {
            $invite_code = $current_user->pmpro_invite_code_at_signup;
        } else {
            $invite_code = "";
        }
        if (empty($pmpro_review)) {
            ?>
		<table class="pmpro_checkout top1em" width="100%" cellpadding="0" cellspacing="0" border="0">
			<thead>
				<tr>
					<th><?php 
            _e('Invite Code', 'pmpro');
            ?>
</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>
						<label for="invite_code"><?php 
            _e('Invite Code', 'pmpro');
            ?>
</label>
						<input id="invite_code" name="invite_code" type="text" class="input <?php 
            echo pmpro_getClassForField("invite_code");
            ?>
" size="20" value="<?php 
            echo esc_attr($invite_code);
            ?>
" />
						<span class="pmpro_asterisk"> *</span>
					</td>
				</tr>
			</tbody>
		</table>
		<?php 
        }
    }
}