<?php/** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE_AFL.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage * @package GlobalExperts_Hypercharge * @copyright Copyright (c) 2014 Global Experts GmbH (http://www.globalexperts.ch/) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */$_code=
$this->
getMethodCode();
?><ul class="form-list" id="payment_form_
<?php echo $_code ?>" style="display:none;">
<li>
<div class="input-box">
<label for="
<?php echo $_code ?>_account_owner" class="required"><em>*</em>
<?php echo $this->
__(
'Bank Account Holder')
?></label>
<input type="text" title="
<?php echo $this->
__(
'Bank Account Holder')
?>" class="input-text required-entry validate-hyper-debit-holder field-bank_account_holder" id="
<?php echo $_code ?>_account_owner" value="" />
</div>
</li>
<li>
<label for="
<?php echo $_code ?>_account_number" class="required"><em>*</em>
<?php echo $this->
__(
'Bank Account Number')
?></label>
<div class="input-box">
<input type="text" id="
<?php echo $_code ?>_account_number" title="
<?php echo $this->
__(
'Bank Account Number')
?>" class="input-text required-entry validate-digits field-bank_account_number" value="" />
</div>
</li>
<li>
<label for="
<?php echo $_code ?>_number" class="required"><em>*</em>
<?php echo $this->
__(
'Bank Number')
?></label>
<div class="input-box">
<input type="text" id="
<?php echo $_code ?>_number" title="
<?php echo $this->
__(
'Bank Number')
?>" class="input-text required-entry validate-digits field-bank_number" value="" />
</div>
</li>
<li>
<label for="
<?php echo $_code ?>_iban" class="required"><em>*</em>
<?php echo $this->
__(
'IBAN')
?></label>
<div class="input-box">
<input type="text" id="
<?php echo $_code ?>_iban" title="
<?php echo $this->
__(
'IBAN')
?>" class="input-text required-entry field-iban" value="" />
</div>
</li>
<li>
<label for="
<?php echo $_code ?>_bic" class="required"><em>*</em>
<?php echo $this->
__(
'BIC')
?></label>
<div class="input-box">
<input type="text" id="
<?php echo $_code ?>_bic" title="
<?php echo $this->
__(
'BIC')
?>" class="input-text required-entry field-bic" value="" />
</div>
</li>
<input type="hidden" id="
<?php echo $_code ?>_mandate_id" title="
<?php echo $this->
__(
'SEPA Mandate ID')
?>" class="field-sepa_mandate_id" value="
<?php echo $this->
getMandateId()
?>" />
<input type="hidden" id="
<?php echo $_code ?>_mandate_signature_date" title="
<?php echo $this->
__(
'SEPA Mandate Signature Date')
?>" class="field-sepa_mandate_signature_date" value="
<?php echo $this->
getMandateSignatureDate()
?>" />
</ul>
<script type="text/javascript">
var rewardElem = document.getElementById('p_method_
<?php echo $_code ?>');
if(window.addEventListener) {
rewardElem.addEventListener('click', bindPaymentForm, false);
} else if (window.attachEvent){
rewardElem.attachEvent('onclick', bindPaymentForm);
}
function bindPaymentForm() {
if(document.getElementById('p_method_
<?php echo $_code ?>').checked) {
// This one will bind our fields changes to the JS Object values
Hyper.getInstance().bindFields('payment_form_
<?php echo $_code ?>');
// This one will set submit url from your payment method (getSubmit() method should be implemented on block level)
Hyper.getInstance().setSubmitUrl('
<?php echo $this->
getSubmitUrl();
?>');
Hyper.getInstance().setPaymentMethod('direct_debit');
Hyper.getInstance().setSuccessUrl('
<?php echo Mage::
getUrl(
'checkout/onepage/success');
?>');
Hyper.getInstance().setErrorUrl('
<?php echo Mage::
getUrl(
'checkout/onepage/failure');
?>');
}
}
</script>
0 commit comments