- Complete mail-in payment gateway for Event Tickets Commerce - Support for check payments with collapsible checkout interface - Admin interface for managing check payments and order status - Professional asset organization with proper WordPress enqueuing - Order management with status tracking (pending, received, bounced) - Template system with responsive design and accessibility features - Integration with Event Tickets Commerce order system - Settings page for configuring payment instructions and addresses
151 lines
No EOL
4.3 KiB
PHP
151 lines
No EOL
4.3 KiB
PHP
<?php
|
|
/**
|
|
* Mail-In Payment checkout form template
|
|
*
|
|
* @since 1.0.0
|
|
* @var array $args Template arguments
|
|
* @var \ET_Mail_In_Payment\Gateway $gateway Gateway instance
|
|
* @var string $instructions Payment instructions
|
|
* @var string $mailing_address Mailing address
|
|
* @var string $payable_to Check payable to
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
$gateway = $args['gateway'] ?? null;
|
|
$instructions = $args['instructions'] ?? '';
|
|
$mailing_address = $args['mailing_address'] ?? '';
|
|
$payable_to = $args['payable_to'] ?? '';
|
|
?>
|
|
|
|
<div class="tribe-tickets-commerce-gateway-mail-in">
|
|
<div class="tribe-tickets-commerce-gateway-mail-in__header">
|
|
<h3><?php echo esc_html( $gateway::get_label() ); ?></h3>
|
|
<p class="tribe-tickets-commerce-gateway-mail-in__description">
|
|
<?php echo esc_html( $gateway::get_description() ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="tribe-tickets-commerce-gateway-mail-in__instructions">
|
|
<?php if ( $instructions ) : ?>
|
|
<div class="tribe-tickets-commerce-gateway-mail-in__instructions-text">
|
|
<h4><?php esc_html_e( 'Payment Instructions:', 'event-tickets-mail-in' ); ?></h4>
|
|
<p><?php echo wp_kses_post( nl2br( $instructions ) ); ?></p>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="tribe-tickets-commerce-gateway-mail-in__details">
|
|
<?php if ( $payable_to ) : ?>
|
|
<div class="tribe-tickets-commerce-gateway-mail-in__payable-to">
|
|
<h4><?php esc_html_e( 'Make Check Payable To:', 'event-tickets-mail-in' ); ?></h4>
|
|
<p class="tribe-tickets-commerce-gateway-mail-in__payable-to-name">
|
|
<strong><?php echo esc_html( $payable_to ); ?></strong>
|
|
</p>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ( $mailing_address ) : ?>
|
|
<div class="tribe-tickets-commerce-gateway-mail-in__address">
|
|
<h4><?php esc_html_e( 'Mail Your Check To:', 'event-tickets-mail-in' ); ?></h4>
|
|
<div class="tribe-tickets-commerce-gateway-mail-in__address-block">
|
|
<?php echo wp_kses_post( nl2br( $mailing_address ) ); ?>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="tribe-tickets-commerce-gateway-mail-in__important-note">
|
|
<h4><?php esc_html_e( 'Important Notes:', 'event-tickets-mail-in' ); ?></h4>
|
|
<ul>
|
|
<li><?php esc_html_e( 'Please include your order number in the check memo line.', 'event-tickets-mail-in' ); ?></li>
|
|
<li><?php esc_html_e( 'Your tickets will be reserved while we wait for your payment to arrive.', 'event-tickets-mail-in' ); ?></li>
|
|
<li><?php esc_html_e( 'You will receive a confirmation email once your payment is processed.', 'event-tickets-mail-in' ); ?></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.tribe-tickets-commerce-gateway-mail-in {
|
|
border: 1px solid #ddd;
|
|
padding: 20px;
|
|
margin: 15px 0 !important;
|
|
background: #f9f9f9;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__header h3 {
|
|
margin: 0 0 10px 0;
|
|
color: #333;
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__description {
|
|
margin: 0 0 20px 0;
|
|
font-style: italic;
|
|
color: #666;
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__instructions {
|
|
background: #fff;
|
|
padding: 20px;
|
|
border-radius: 4px;
|
|
border: 1px solid #e5e5e5;
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__instructions h4 {
|
|
margin: 0 0 10px 0;
|
|
color: #333;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__details {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 20px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.tribe-tickets-commerce-gateway-mail-in__details {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__payable-to-name {
|
|
font-size: 18px;
|
|
margin: 5px 0;
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__address-block {
|
|
background: #f5f5f5;
|
|
padding: 15px;
|
|
border-radius: 4px;
|
|
border-left: 4px solid #0073aa;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__important-note {
|
|
background: #fff3cd;
|
|
border: 1px solid #ffeaa7;
|
|
padding: 15px;
|
|
border-radius: 4px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__important-note h4 {
|
|
color: #856404;
|
|
margin-top: 0;
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__important-note ul {
|
|
margin: 10px 0 0 0;
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.tribe-tickets-commerce-gateway-mail-in__important-note li {
|
|
margin-bottom: 5px;
|
|
color: #856404;
|
|
}
|
|
</style>
|
|
</div>
|