<?php // phpcs:ignoreFile
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if(!isset($foreachEmptyValues)){$foreachEmptyValues = array();} ?><div class="verifone-payment">
    <p class="verifone-payment-select-message"><?php echo esc_html($context["messages"]["selectMethod"]); ?></p>

	<div class="verifone-payment-methods-list-selection verifone-payment-methods-saved">
		<?php $isEmpty = empty($context["paymentMethods"]["saved"]);  array_push($foreachEmptyValues, $isEmpty);  if(!$isEmpty)  foreach($context["paymentMethods"]["saved"] as $foreach_current_key => $foreach_value){  $context["paymentMethod"] = $foreach_value;   $context["current_key"] = $foreach_current_key; ?>
			<?php $hidden = $context["paymentMethod"]["type"] === 'all' && count($context["paymentMethods"]["saved"]) > 1; ?>
			<div class="verifone-payment-method-logo verifone-payment-method-<?php echo esc_attr($context["paymentMethod"]["code"]); ?>" <?php if ($hidden) { echo 'style="display:none;"'; } ?>>
				<input type="radio" id="verifone-payment-method-<?php echo esc_attr($context["paymentMethod"]["code"]); ?>" name="verifone-payment-method" value="<?php echo esc_attr($context["paymentMethod"]["code"]); ?>" data-type="<?php echo esc_attr($context["paymentMethod"]["type"]); ?>"/>
				<label for="verifone-payment-method-<?php echo esc_attr($context["paymentMethod"]["code"]); ?>">
					<?php echo esc_html($context["paymentMethod"]["displayName"]); ?>
				</label>
			</div>
		<?php } array_pop($foreachEmptyValues); ?>
	</div>

	<div class="verifone-payment-methods-list-selection verifone-payment-method-logos">
		<?php $isEmpty = empty($context["paymentMethods"]["methods"]);  array_push($foreachEmptyValues, $isEmpty);  if(!$isEmpty)  foreach($context["paymentMethods"]["methods"] as $foreach_current_key => $foreach_value){  $context["paymentMethod"] = $foreach_value;   $context["current_key"] = $foreach_current_key; ?>
			<?php $hidden = $context["paymentMethod"]["type"] === 'all' && count($context["paymentMethods"]["methods"]) > 1; ?>
			<div class="verifone-payment-method-logo verifone-payment-method-<?php echo esc_attr($context["paymentMethod"]["code"]); ?>" <?php if ($hidden) { echo 'style="display:none;"'; } ?>>
				<input type="radio" id="verifone-payment-method-<?php echo esc_attr($context["paymentMethod"]["code"]); ?>" name="verifone-payment-method" value="<?php echo esc_attr($context["paymentMethod"]["code"]); ?>" data-type="<?php echo esc_attr($context["paymentMethod"]["type"]); ?>"/>
				<label for="verifone-payment-method-<?php echo esc_attr($context["paymentMethod"]["code"]); ?>">
					<img src="<?php echo esc_url($context["paymentMethod"]["logo"]); ?>" alt="<?php echo esc_attr($context["paymentMethod"]["displayName"]); ?>"/>
				</label>
			</div>
		<?php } array_pop($foreachEmptyValues); ?>
	</div>

	<?php if ($context["cartContainsSubscription"]): ?>
		<div class="verifone-cart-contains-subscription-wrapper">
			<p class="verifone-cart-contains-subscription-info">
				<?php echo esc_html($context["messages"]["rememberCCSubscriptionInfo"]); ?>
				<?php if ($context["cartTotalIsZero"]): ?>
					<?php echo esc_html($context["messages"]["subscriptionFreeTrialReservationInfo"]); ?>
				<?php endif; ?>
			</p>
		</div>
    <?php elseif($context["allowCC"]): ?>
		<div class="verifone-save-payment-method-wrapper">
			<input type="checkbox" id="verifone-save-payment-method" name="verifone-save-payment-method"/>
			<label for="verifone-save-payment-method">
				<span><?php echo esc_html($context["messages"]["rememberMethod"]); ?></span>
			</label>
			<span class="verifone-payment-saved-info"><?php echo esc_html($context["messages"]["rememberMeInfo"]); ?></span>
		</div>
    <?php endif; ?>
</div>
<div class="verifone-payment-message">
    <p><?php echo esc_html($context["messages"]["redirectMessage"]); ?></p>
</div>
