Advertisement
tribulant

First Data GGe4 API form template file

Oct 4th, 2013
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.37 KB | None | 0 0
  1. <p><img border="0" style="border:none;" src="<?php echo site_url(); ?>/wp-content/plugins/checkout-fde4api/images/logo.jpg" alt="firstdata" /></p>
  2.  
  3. <?php if (!empty($errors)) : ?>
  4.     <ul class="<?php echo $this -> pre; ?>error">
  5.         <?php foreach ($errors as $error) : ?>
  6.             <li><?php echo stripslashes($error); ?></li>
  7.         <?php endforeach; ?>
  8.     </ul>
  9. <?php endif; ?>
  10.  
  11. <form action="<?php echo $wpcoHtml -> retainquery($this -> pre . "method=payment", $wpcoHtml -> cart_url()); ?>" method="post">
  12.     <input type="hidden" name="<?php echo $this -> pre; ?>method" value="payment" />
  13.     <input type="hidden" name="pmethod" value="fde4api" />
  14.  
  15.     <fieldset class="<?php echo $this -> pre; ?> steps cardinfo">
  16.         <legend><?php _e('Credit Card Details', $this -> plugin_name); ?></legend>
  17.         <div class="stepsholder">
  18.             <!-- First Data API customer form -->
  19.             <?php $class = ''; ?>
  20.             <table class="<?php echo $this -> pre; ?>">
  21.                 <tbody>
  22.                     <tr class="<?php echo $class = (empty($class) || $class == "erow") ? 'arow' : 'erow'; ?>">
  23.                         <th><label for="CardHoldersName"><?php _e('Card Holders Name', $this -> plugin_name); ?></label></th>
  24.                         <td>
  25.                             <input type="text" name="CardHoldersName" value="<?php echo $_POST['CardHoldersName']; ?>" id="CardHoldersName" />
  26.                             <br/><span class="small"><?php _e('Name of the card holder as displayed on the card.', $this -> plugin_name); ?></span>
  27.                         </td>
  28.                     </tr>
  29.                     <tr class="<?php echo $class = (empty($class) || $class == "erow") ? 'arow' : 'erow'; ?>">
  30.                         <th><label for="CardType"><?php _e('Card Type', $this -> plugin_name); ?></label></th>
  31.                         <td>
  32.                             <?php $cctypes = $this -> get_option('cctypes'); ?>
  33.                             <?php
  34.                            
  35.                             $cctypes = array(
  36.                                 'mastercard'        =>  __('MasterCard', $this -> plugin_name),
  37.                                 'visa'              =>  __('Visa', $this -> plugin_name),
  38.                                 'discover'          =>  __('Discover', $this -> plugin_name),
  39.                                 'jcb'               =>  __('JCB', $this -> plugin_name),
  40.                                 'aexpress'          =>  __('American Express', $this -> plugin_name),
  41.                                 'dinersclub'        =>  __('Diners Club', $this -> plugin_name),
  42.                                 'laser'             =>  __('Laser', $this -> plugin_name),
  43.                             );
  44.                            
  45.                             ?>
  46.                             <select name="CardType" id="CardType">
  47.                                 <option value=""><?php _e('- Select Type -', $this -> plugin_name); ?></option>
  48.                                 <?php foreach ($cctypes as $cckey => $ccval) : ?>
  49.                                     <option <?php echo (!empty($_POST['CardType']) && $_POST['CardType'] == $cckey) ? 'selected="selected"' : ''; ?> value="<?php echo $cckey; ?>"><?php echo __($ccval); ?></option>
  50.                                 <?php endforeach; ?>
  51.                             </select>
  52.                             <br/><span class="small"><?php _e('Type of card being used.', $this -> plugin_name); ?></span>
  53.                         </td>
  54.                     </tr>
  55.                     <tr class="<?php echo $class = (empty($class) || $class == "erow") ? 'arow' : 'erow'; ?>">
  56.                         <th><label for="CardNumber"><?php _e('Card Number:', $this -> plugin_name); ?></label></th>
  57.                         <td>
  58.                             <input type="text" name="CardNumber" value="<?php echo $_POST['CardNumber']; ?>" id="CardNumber" />
  59.                             <br/><span class="small"><?php _e('Credit card number displayed on your card.', $this -> plugin_name); ?></span>
  60.                         </td>
  61.                     </tr>
  62.                     <tr class="<?php echo $class = (empty($class) || $class == "erow") ? 'arow' : 'erow'; ?>">
  63.                         <th><label for="ExpMonth"><?php _e('Expiration Date:', $this -> plugin_name); ?></label></th>
  64.                         <td>                   
  65.                             <select name="ExpMonth" size="1" id="CC_EXPIRES_MONTH">
  66.                                 <option value=""><?php _e('MM', $this -> plugin_name); ?></option>
  67.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "01") ? 'selected="selected"' : ''; ?> value="01">01</option>
  68.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "02") ? 'selected="selected"' : ''; ?> value="02">02</option>
  69.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "03") ? 'selected="selected"' : ''; ?> value="03">03</option>
  70.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "04") ? 'selected="selected"' : ''; ?> value="04">04</option>
  71.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "05") ? 'selected="selected"' : ''; ?> value="05">05</option>
  72.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "06") ? 'selected="selected"' : ''; ?> value="06">06</option>
  73.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "07") ? 'selected="selected"' : ''; ?> value="07">07</option>
  74.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "08") ? 'selected="selected"' : ''; ?> value="08">08</option>
  75.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "09") ? 'selected="selected"' : ''; ?> value="09">09</option>
  76.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "10") ? 'selected="selected"' : ''; ?> value="10">10</option>
  77.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "11") ? 'selected="selected"' : ''; ?> value="11">11</option>
  78.                                 <option <?php echo (!empty($_POST['ExpMonth']) && $_POST['ExpMonth'] == "12") ? 'selected="selected"' : ''; ?> value="12">12</option>
  79.                             </select> /
  80.                             <select name="ExpYear" size="1">
  81.                                 <option value=""><?php _e('YYYY', $this -> plugin_name); ?></option>
  82.                                 <option <?php echo (!empty($_POST['ExpYear']) && $_POST['ExpYear'] == "12") ? 'selected="selected"' : ''; ?> value="12">2012</option>
  83.                                 <option <?php echo (!empty($_POST['ExpYear']) && $_POST['ExpYear'] == "13") ? 'selected="selected"' : ''; ?> value="13">2013</option>
  84.                                 <option <?php echo (!empty($_POST['ExpYear']) && $_POST['ExpYear'] == "14") ? 'selected="selected"' : ''; ?> value="14">2014</option>
  85.                                 <option <?php echo (!empty($_POST['ExpYear']) && $_POST['ExpYear'] == "15") ? 'selected="selected"' : ''; ?> value="15">2015</option>
  86.                                 <option <?php echo (!empty($_POST['ExpYear']) && $_POST['ExpYear'] == "16") ? 'selected="selected"' : ''; ?> value="16">2016</option>
  87.                                 <option <?php echo (!empty($_POST['ExpYear']) && $_POST['ExpYear'] == "17") ? 'selected="selected"' : ''; ?> value="17">2017</option>
  88.                             </select>
  89.                             <br/><span class="small"><?php _e('Card expiry date with a month and year combination.', $this -> plugin_name); ?></span>
  90.                         </td>
  91.                     </tr>
  92.                     <?php if ($this -> get_option('fde4api_cvv') == "Y") : ?>
  93.                         <tr class="<?php echo $class = (empty($class) || $class == "erow") ? 'arow' : 'erow'; ?>">
  94.                             <th><label for="Cvv"><?php _e('Card Verification Value:', $this -> plugin_name); ?></label></th>
  95.                             <td>
  96.                                 <input style="width:35px;" type="text" name="Cvv" value="<?php echo $_POST['Cvv']; ?>" id="Cvv" />
  97.                                 <br/><span class="small"><?php _e('Three/four digit card verification value typically on the back of the card.', $this -> plugin_name); ?></span>
  98.                             </td>
  99.                         </tr>
  100.                     <?php endif; ?>
  101.                 </tbody>
  102.             </table>
  103.         </div>
  104.     </fieldset>
  105.  
  106.     <p class="submit">
  107.         <input class="<?php echo $this -> pre; ?>button" type="button" name="back" value="<?php _e('&laquo; Back', $this -> plugin_name); ?>" onclick="history.go(-1);" />
  108.         <input class="<?php echo $this -> pre; ?>button" type="submit" name="continue" value="<?php _e('Continue &raquo;', $this -> plugin_name); ?>" />
  109.     </p>
  110. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement