Skip to content

Commit 1240759

Browse files
committed
Mobile SEPA: sepa_debit_sale
Wpf : Billing and Shipping UTF-8 encoding Wpf : Default language set to german
1 parent 66eae85 commit 1240759

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

app/code/community/GlobalExperts/Hypercharge/Model/Checkout.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -423,22 +423,22 @@ public function getRedirectUrl() {
423423
'return_failure_url' => Mage::getUrl('bit-hypercharge/wpfredirect/failure', array('_secure' => true)),
424424
'return_cancel_url' => Mage::getUrl('bit-hypercharge/wpfredirect/cancel', array('_secure' => true)),
425425
'billing_address' => array(
426-
'first_name' => $billing->getFirstname(),
427-
'last_name' => $billing->getLastname(),
428-
'address1' => trim(str_replace("\n", ' ', trim(implode(' ', $billing->getStreet())))),
429-
'city' => $billing->getCity(),
430-
'country' => $billing->getCountryId(),
431-
'zip_code' => $billing->getData('postcode'),
432-
'state' => $billing->getData('region')
426+
'first_name' => utf8_decode($billing->getFirstname()),
427+
'last_name' => utf8_decode($billing->getLastname()),
428+
'address1' => utf8_decode(trim(str_replace("\n", ' ', trim(implode(' ', $billing->getStreet()))))),
429+
'city' => utf8_decode($billing->getCity()),
430+
'country' => utf8_decode($billing->getCountryId()),
431+
'zip_code' => utf8_decode($billing->getData('postcode')),
432+
'state' => utf8_decode($billing->getData('region'))
433433
),
434434
'shipping_address' => array(
435-
'first_name' => $billing->getFirstname(),
436-
'last_name' => $billing->getLastname(),
437-
'address1' => trim(str_replace("\n", ' ', trim(implode(' ', $billing->getStreet())))),
438-
'city' => $billing->getCity(),
439-
'country' => $billing->getCountryId(),
440-
'zip_code' => $billing->getData('postcode'),
441-
'state' => $billing->getData('region')
435+
'first_name' => utf8_decode($billing->getFirstname()),
436+
'last_name' => utf8_decode($billing->getLastname()),
437+
'address1' => utf8_decode(trim(str_replace("\n", ' ', trim(implode(' ', $billing->getStreet()))))),
438+
'city' => utf8_decode($billing->getCity()),
439+
'country' => utf8_decode($billing->getCountryId()),
440+
'zip_code' => utf8_decode($billing->getData('postcode')),
441+
'state' => utf8_decode($billing->getData('region'))
442442
),
443443
);
444444

app/code/community/GlobalExperts/Hypercharge/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<config>
2929
<modules>
3030
<GlobalExperts_Hypercharge>
31-
<version>1.0.3</version>
31+
<version>1.0.4</version>
3232
</GlobalExperts_Hypercharge>
3333
</modules>
3434

app/design/frontend/base/default/template/hypercharge/form/sepa.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?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>
1+
<?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 ?>_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('sepa_direct_debit'); Hyper.getInstance().setSuccessUrl('<?php echo Mage::getUrl('checkout/onepage/success'); ?>'); Hyper.getInstance().setErrorUrl('<?php echo Mage::getUrl('checkout/onepage/failure'); ?>'); } }</script>

app/design/frontend/base/default/template/hypercharge/wpf/iframe.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* @copyright Copyright (c) 2014 Global Experts GmbH (http://www.globalexperts.ch/)
2424
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
2525
*/
26-
$payUrl = Mage::getSingleton('core/session')->getHyperRedirectUrl();
26+
$payUrl = Mage::getSingleton('core/session')->getHyperRedirectUrl() . "?locale=de";
2727
?>
2828
<iframe src="<?php echo $payUrl; ?>" width="100%" height="990px" style="border:0">
2929
<p>Your browser does not support iframes.</p>

0 commit comments

Comments
 (0)