<?php // phpcs:ignoreFile
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if(!isset($foreachEmptyValues)){$foreachEmptyValues = array();} ?><div class="verifone-payment">
    <label for="verifone-payment-method"><?php echo esc_html($context["messages"]["selectMethod"]); ?></label>
    <select id="verifone-payment-method" name="verifone-payment-method">
         <?php $isEmpty = empty($context["paymentMethods"]);  array_push($foreachEmptyValues, $isEmpty);  if(!$isEmpty)  foreach($context["paymentMethods"] as $foreach_current_key => $foreach_value){  $context["paymentMethod"] = $foreach_value;   $context["current_key"] = $foreach_current_key; ?>
        <option value="<?php echo esc_attr($context["paymentMethod"]["code"]); ?>" data-type="<?php echo esc_attr($context["paymentMethod"]["type"]); ?>"><?php echo esc_html($context["paymentMethod"]["displayName"]); ?></option>
        <?php } array_pop($foreachEmptyValues); ?>
    </select>

	<?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>
