/**
     * 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("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) {
            $cvv_template = pmpro_loadTemplate('popup-cvv', 'url', 'pages', 'html');
            ?>
						<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($cvv_template);
            ?>
','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;
    }
예제 #2
0
                ?>
><?php 
                echo $i;
                ?>
</option>
								<?php 
            }
            ?>
							</select>
						</div>

						<?php 
            $pmpro_show_cvv = apply_filters("pmpro_show_cvv", true);
            if ($pmpro_show_cvv) {
                if (true == ini_get('allow_url_include')) {
                    $cvv_template = pmpro_loadTemplate('popup-cvv', 'url', 'pages', 'html');
                } else {
                    $cvv_template = plugins_url('paid-memberships-pro/pages/popup-cvv.html', PMPRO_DIR);
                }
                ?>
						<div>
							<label for="CVV"><?php 
                _e('CVV', 'pmpro');
                ?>
</label>
							<input class="input" id="CVV" <?php 
                if ($gateway != "stripe" && $gateway != "braintree") {
                    ?>
name="CVV"<?php 
                }
                ?>
예제 #3
0
 function pmpro_pages_shortcode($atts, $content = null, $code = "")
 {
     global $pmpro_page_name;
     $temp_content = pmpro_loadTemplate($pmpro_page_name, 'local', 'pages');
     /*
     ob_start();
     
     if(file_exists(get_stylesheet_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php"))
     	include(get_stylesheet_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php");
     elseif(file_exists(get_template_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php"))
     	include(get_template_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php");
     else
     	include(PMPRO_DIR . "/pages/" . $pmpro_page_name . ".php");
     
     $temp_content = ob_get_contents();
     //					ob_end_clean();
     */
     return apply_filters("pmpro_pages_shortcode_" . $pmpro_page_name, $temp_content);
 }