- 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
170 lines
No EOL
5.5 KiB
PHP
170 lines
No EOL
5.5 KiB
PHP
<?php
|
|
/**
|
|
* Payment instructions email template
|
|
*
|
|
* @since 1.0.0
|
|
* @var \TEC\Tickets\Commerce\Order $order Order object
|
|
* @var array $details Mail-in payment details
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
?><!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><?php printf( __( 'Payment Instructions for Order #%s', 'event-tickets-mail-in' ), $order->get_order_number() ); ?></title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
line-height: 1.6;
|
|
color: #333;
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
.header {
|
|
background: #f8f9fa;
|
|
padding: 20px;
|
|
text-align: center;
|
|
border-radius: 8px 8px 0 0;
|
|
border-bottom: 3px solid #0073aa;
|
|
}
|
|
.content {
|
|
background: #fff;
|
|
padding: 30px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
.order-summary {
|
|
background: #f8f9fa;
|
|
padding: 20px;
|
|
border-radius: 4px;
|
|
margin: 20px 0;
|
|
}
|
|
.payment-details {
|
|
background: #e7f3ff;
|
|
padding: 20px;
|
|
border-radius: 4px;
|
|
border-left: 4px solid #0073aa;
|
|
margin: 20px 0;
|
|
}
|
|
.important-notes {
|
|
background: #fff3cd;
|
|
padding: 15px;
|
|
border-radius: 4px;
|
|
border-left: 4px solid #ffc107;
|
|
margin: 20px 0;
|
|
}
|
|
.footer {
|
|
background: #f8f9fa;
|
|
padding: 20px;
|
|
text-align: center;
|
|
border-radius: 0 0 8px 8px;
|
|
border-top: 1px solid #ddd;
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
.mailing-address {
|
|
background: #f5f5f5;
|
|
padding: 15px;
|
|
border-radius: 4px;
|
|
margin: 10px 0;
|
|
font-weight: bold;
|
|
}
|
|
h1, h2, h3 {
|
|
color: #0073aa;
|
|
}
|
|
.order-number {
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
color: #0073aa;
|
|
}
|
|
ul {
|
|
padding-left: 20px;
|
|
}
|
|
li {
|
|
margin-bottom: 5px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="email-container">
|
|
<div class="header">
|
|
<h1><?php esc_html_e( 'Payment Instructions', 'event-tickets-mail-in' ); ?></h1>
|
|
<p><?php printf( __( 'Order #%s', 'event-tickets-mail-in' ), '<span class="order-number">' . esc_html( $order->get_order_number() ) . '</span>' ); ?></p>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<h2><?php esc_html_e( 'Thank you for your order!', 'event-tickets-mail-in' ); ?></h2>
|
|
|
|
<p><?php printf(
|
|
__( 'Hello %s,', 'event-tickets-mail-in' ),
|
|
esc_html( $order->get_purchaser_name() )
|
|
); ?></p>
|
|
|
|
<p><?php esc_html_e( 'Your order has been received and your tickets have been reserved. To complete your purchase, please mail your check payment using the details below.', 'event-tickets-mail-in' ); ?></p>
|
|
|
|
<div class="order-summary">
|
|
<h3><?php esc_html_e( 'Order Summary', 'event-tickets-mail-in' ); ?></h3>
|
|
<p><strong><?php esc_html_e( 'Order Number:', 'event-tickets-mail-in' ); ?></strong> <?php echo esc_html( $order->get_order_number() ); ?></p>
|
|
<p><strong><?php esc_html_e( 'Order Date:', 'event-tickets-mail-in' ); ?></strong> <?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $details['created_date'] ) ) ); ?></p>
|
|
<p><strong><?php esc_html_e( 'Total Amount:', 'event-tickets-mail-in' ); ?></strong> <?php echo esc_html( $order->get_total_value()->get_formatted() ); ?></p>
|
|
</div>
|
|
|
|
<div class="payment-details">
|
|
<h3><?php esc_html_e( 'Payment Instructions', 'event-tickets-mail-in' ); ?></h3>
|
|
|
|
<?php if ( $details['instructions'] ) : ?>
|
|
<p><?php echo wp_kses_post( nl2br( $details['instructions'] ) ); ?></p>
|
|
<?php endif; ?>
|
|
|
|
<?php if ( $details['payable_to'] ) : ?>
|
|
<p><strong><?php esc_html_e( 'Make Check Payable To:', 'event-tickets-mail-in' ); ?></strong></p>
|
|
<p style="font-size: 18px; font-weight: bold; color: #0073aa;"><?php echo esc_html( $details['payable_to'] ); ?></p>
|
|
<?php endif; ?>
|
|
|
|
<?php if ( $details['mailing_address'] ) : ?>
|
|
<p><strong><?php esc_html_e( 'Mail Your Check To:', 'event-tickets-mail-in' ); ?></strong></p>
|
|
<div class="mailing-address">
|
|
<?php echo wp_kses_post( nl2br( $details['mailing_address'] ) ); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<p><strong><?php esc_html_e( 'Check Amount:', 'event-tickets-mail-in' ); ?></strong> <?php echo esc_html( $order->get_total_value()->get_formatted() ); ?></p>
|
|
</div>
|
|
|
|
<div class="important-notes">
|
|
<h3><?php esc_html_e( 'Important Notes', 'event-tickets-mail-in' ); ?></h3>
|
|
<ul>
|
|
<li><?php printf( __( 'Please write your order number (%s) in the check memo line.', 'event-tickets-mail-in' ), esc_html( $order->get_order_number() ) ); ?></li>
|
|
<li><?php
|
|
$reservation_days = absint( get_option( 'et_mail_in_reservation_days', 7 ) );
|
|
printf(
|
|
_n(
|
|
'Your tickets will be reserved for %d day while we wait for your payment.',
|
|
'Your tickets will be reserved for %d days while we wait for your payment.',
|
|
$reservation_days,
|
|
'event-tickets-mail-in'
|
|
),
|
|
$reservation_days
|
|
);
|
|
?></li>
|
|
<li><?php esc_html_e( 'You will receive a confirmation email once your payment is received and processed.', 'event-tickets-mail-in' ); ?></li>
|
|
<li><?php esc_html_e( 'Please keep this email for your records.', 'event-tickets-mail-in' ); ?></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<p><?php esc_html_e( 'If you have any questions about your order or payment, please contact us.', 'event-tickets-mail-in' ); ?></p>
|
|
|
|
<p><?php esc_html_e( 'Thank you for your business!', 'event-tickets-mail-in' ); ?></p>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p><?php echo esc_html( get_option( 'blogname' ) ); ?></p>
|
|
<p><?php echo esc_html( get_option( 'admin_email' ) ); ?></p>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|