예제 #1
0
function web_invoice_show_cc_form($invoice_id, $invoice)
{
    ?>
<div id="cc_payment_form" class="payment_form">
<h2 class="invoice_page_subheading"><?php 
    _e('Billing Information', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</h2>
<form method="post" name="checkout_form" id="checkout_form"
	class="online_payment_form"
	onsubmit="process_cc_checkout(); return false;" class="clearfix"><input
	type="hidden" name="amount"
	value="<?php 
    echo $invoice->display('amount');
    ?>
" /> <input
	type="hidden" name="user_id"
	value="<?php 
    echo $invoice->recipient('user_id');
    ?>
" /> <input
	type="hidden" name="invoice_num" value="<?php 
    echo $invoice_id;
    ?>
" />
<input type="hidden" name="currency_code" id="currency_code"
	value="<?php 
    echo $invoice->display('currency');
    ?>
" /> <input
	type="hidden" name="web_invoice_id_hash"
	value="<?php 
    echo $invoice->display('hash');
    ?>
" />
<fieldset id="credit_card_information">
<ol>
	<li><label for="first_name"><?php 
    _e('First Name', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<?php 
    echo web_invoice_draw_inputfield("first_name", $invoice->recipient('first_name'));
    ?>
	</li>

	<li><label for="last_name"><?php 
    _e('Last Name', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<?php 
    echo web_invoice_draw_inputfield("last_name", $invoice->recipient('last_name'));
    ?>
	</li>

	<li><label for="email"><?php 
    _e('Email Address', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<?php 
    echo web_invoice_draw_inputfield("email_address", $invoice->recipient('email_address'));
    ?>
	</li>

	<li><label class="inputLabel" for="phonenumber"><?php 
    _e('Phone Number', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<input name="phonenumber" class="input_field" type="text"
		id="phonenumber" size="40" maxlength="50"
		value="<?php 
    print $invoice->recipient('phonenumber');
    ?>
" /></li>

	<li><label for="address"><?php 
    _e('Address', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<?php 
    echo web_invoice_draw_inputfield("address", $invoice->recipient('streetaddress'));
    ?>
	</li>

	<li><label for="city"><?php 
    _e('City', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<?php 
    echo web_invoice_draw_inputfield("city", $invoice->recipient('city'));
    ?>
	</li>

	<li><label for="state"><?php 
    _e('State (e.g. CA)', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<?php 
    print web_invoice_draw_inputfield('state', $invoice->recipient('state'));
    ?>
	</li>

	<li><label for="zip"><?php 
    _e('Zip Code', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<?php 
    echo web_invoice_draw_inputfield("zip", $invoice->recipient('zip'));
    ?>
	</li>

	<li><label for="country"><?php 
    _e('Country', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<?php 
    echo web_invoice_draw_select('country', web_invoice_country_array(), $invoice->recipient('country'));
    ?>
	</li>

	<li class="hide_after_success"><label class="inputLabel" for="card_num"><?php 
    _e('Credit Card Number', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<input name="card_num" onkeyup="cc_card_pick();"
		id="card_num" class="credit_card_number input_field noautocomplete" type="text"
		size="22" maxlength="22" /></li>

	<li class="hide_after_success nocard cardimage"  id="cardimage" style=" background: url(<?php 
    echo Web_Invoice::frontend_path();
    ?>
/images/card_array.png) no-repeat;">
	</li>

	<li class="hide_after_success"><label class="inputLabel"
		for="exp_month"><?php 
    _e('Expiration Date', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
		<?php 
    _e('Month', WEB_INVOICE_TRANS_DOMAIN);
    ?>
 <select
		name="exp_month" id="exp_month">
		<?php 
    print web_invoice_printMonthDropdown();
    ?>
	</select> <?php 
    _e('Year', WEB_INVOICE_TRANS_DOMAIN);
    ?>
 <select
		name="exp_year" id="exp_year">
		<?php 
    print web_invoice_printYearDropdown();
    ?>
	</select></li>

	<li class="hide_after_success"><label class="inputLabel"
		for="card_code"><?php 
    _e('Security Code', WEB_INVOICE_TRANS_DOMAIN);
    ?>
</label>
	<input id="card_code" name="card_code"
		class="input_field noautocomplete" style="width: 70px;" type="text" size="4"
		maxlength="4" /></li>

	<li id="web_invoice_process_wait"><label for="submit"><span></span>&nbsp;</label>
	<button type="submit" id="cc_pay_button" class="pay_button cc"
		class="hide_after_success submit_button"><?php 
    printf(__('Pay %s', WEB_INVOICE_TRANS_DOMAIN), $invoice->display('display_amount'));
    ?>
</button>
	</li>
</ol>
<br class="cb" />
&nbsp;
<div id="wp_cc_response"></div>
</fieldset>
</form>
</div>
		<?php 
}
예제 #2
0
function web_invoice_frontend_css()
{
    if (get_option('web_invoice_web_invoice_page') != '' && is_page(get_option('web_invoice_web_invoice_page'))) {
        echo '<meta name="robots" content="noindex, nofollow" />';
        if (get_option('web_invoice_use_css') == 'yes') {
            echo '<link type="text/css" media="print" rel="stylesheet" href="' . Web_Invoice::frontend_path() . '/css/web_invoice-print.css?2.0.8"></link>' . "\n";
            echo '<link type="text/css" media="screen" rel="stylesheet" href="' . Web_Invoice::frontend_path() . '/css/web_invoice-screen.css?2.0.8"></link>' . "\n";
        }
    }
}