Subversion Repositories wpShopGermany4

Rev

Rev 5888 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

        /**
        * Dieses Template wird nach einer Targo Zahlung angezeigt
        */

        if ($this->get_option('wpsg_mod_targo_url_use') == 0)
        {
                $url = $this->get_option('wpsg_mod_targo_url_live');
        }
        else
        {
                $url = $this->get_option('wpsg_mod_targo_url_test');
        }
?>

<p><?php echo __('Um den Betrag mit einer Finanzierung bei der TARGOBANK zu bezahlen, klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p> 
<p>
<!--
        <a title="<?php echo __('Mit Targo bezahlen', 'wpsg'); ?>" href="<?php echo $url; ?>">
                <img src="<?php echo $this->getRessourceURL('gfx/targologo.png'); ?>" align="left" alt="<?php echo __('Finanzierung bei Targo beantragen.', 'wpsg'); ?>" style="margin-right:7px;">
         
        </a>
-->
</p>

<form class="wpsg_productform" id="wpsg_produktform" method="post" action="<?php echo $url ?>">

<input type="image" name="image" src="<?php echo $this->getRessourceURL('gfx/targologo.png'); ?>" alt="<?php echo __('Finanzierung bei Targo beantragen.', 'wpsg'); ?>" style="margin-right:7px;">

<div style="display:none;">
<?php $o_id = $this->view['o_id'];
          $k_id = $this->view['k_id'];
          $oOrder = wpsg_order::getInstance($o_id);
          $brutto = $oOrder->getAmount(WPSG_BRUTTO);
          $brutto = wpsg_round($brutto, 2);
          /** @var wpsg_customer */
          $oCustomer = wpsg_customer::getInstance($k_id);
          /*
          $geb1 = $oCustomer->getBirthdate("Y-m-d");
          $geb2 = $oCustomer->getBirthdate();
          $geb3 = $oCustomer->data["geb"];
          $geb4 = wpsg_date("Y-m-d", strtotime($geb3));
          $geb5 = strtotime($geb3);
          $geb6 = strtotime("0000-00-00");
          $geb6 = strtotime("1901-12-13");
          $geb6 = strtotime("1901-12-14");
          */ 
          $dl = $this->view['targoLink'];
          
          $street = $oOrder-> getInvoiceStreetClear(true);
          $nr = $oOrder-> getInvoiceStreetNr();
          
?>
<?php ?>
<?php 
function toIso($string) {
        return mb_convert_encoding($string, "ISO-8859-1");
}

?>

<br /><br />
<b>Obligatorische Daten für Targobank</b><br />
<input type="text" id="koop_id" name="koop_id" value="<?php echo $this->get_option('wpsg_mod_targo_koop_id');?>" placeholder="koop_id"><br />
<input type="text" id="SessionID" name="sessionID" value="<?php echo session_id();?>" placeholder="sessionID"><br />
<input type="text" id="amount" name="amount" value="<?php echo $brutto;?>" placeholder="amount"><br />
<input type="text" id="dealerID" name="dealerID" value="<?php echo $this->get_option('wpsg_mod_targo_dealerid');?>" placeholder="dealerID"><br />
<input type="text" id="dealerText" name="dealerText" value="<?php echo $this->view['targoLink'];?>" placeholder="dealerText"><br />
<input type="text" id="documentno" name="documentno" value="<?php echo $this->view['o_id'];?>" placeholder="documentno"><br />


<b>Optionale Daten für Targobank</b><br />
<input type="text" id="dealerShopURL" name="dealerShopURL" value="<?php echo $this->get_option('wpsg_mod_targo_dealerShopURL');?>" placeholder="dealerShopURL"><br />
<input type="text" id="dealerAbortURL" name="dealerAbortURL" value="<?php echo $this->get_option('wpsg_mod_targo_dealerAbortURL');?>" placeholder="dealerAbortURL"><br />
<input type="text" id="hash" name="hash" value="" placeholder="hash">(hashkey)<br />
<input type="text" id="" name="" value="" placeholder=""><br />


<b>Adressdaten aus Kundendaten</b><br />
<?php
$titel = $oCustomer->getTitle();
$isotitel = '';
if (($titel == "Herr") || ($titel == "Frau")) $isotitel = toIso($titel);
?>
<input type="text" id="surname" name="gender" value="<?php echo $isotitel;?>" placeholder="titel"><br />
<input type="text" id="surname" name="surname" value="<?php echo toIso($oCustomer->getName());?>" placeholder="surname"><br />
<input type="text" id="firstname" name="firstname" value="<?php echo toIso($oCustomer->getFirstname());?>" placeholder="firstname"><br />
<input type="text" id="street" name="street" value="<?php echo toIso($oOrder->getInvoiceStreetClear(true));?>" placeholder="street"><br />
<input type="text" id="streetnumber" name="streetnumber" value="<?php echo toIso($oOrder->getInvoiceStreetNr());?>" placeholder="streetnumber"><br />
<input type="text" id="zip" name="zip" value="<?php echo toIso($oCustomer->getZip());?>" placeholder="zip"><br />
<input type="text" id="city" name="city" value="<?php echo toIso($oCustomer->getCity());?>" placeholder="city"><br />
<input type="text" id="telnocode" name="telnocode" value="" placeholder="vorwahl"><br />
<input type="text" id="telno" name="telno" value="<?php echo toIso($oCustomer->getPhone());?>" placeholder="telno"><br />
<input type="text" id="birthday" name="birthday" value="<?php 
        
        $dt = $oCustomer->getBirthdate("Y-m-d");
        
        if ($oCustomer->geb == '0000-00-00' || strtotime($dt) === false)
        {
                
                echo '';
                
        }
        else
        {
                
                echo $oCustomer->getBirthdate("Y-m-d");
                
        }

?>" placeholder="birthday"><br />
<input type="text" id="email" name="email" value="<?php echo toIso($oCustomer->getEMail());?>"  placeholder="email"><br />

<input type="submit" id="submit" name="submit" value="submit" >

</div>
</form>


<?php if ($this->get_option('wpsg_mod_targo_autostart') == '1') { ?>
<script type="text/javascript">/* <![CDATA[ */
 
        jQuery(document).ready(function() { 
                window.setTimeout(function() {
                        //location.href = "<?php echo $url;?>";
                        jQuery('#submit').trigger("click");
                }, 1000);
        } );
        
/* ]]> */</script>
<?php } ?>