Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #15 from heidelpay/develop
Browse files Browse the repository at this point in the history
Release 20.07.27
  • Loading branch information
Sascha authored Jul 29, 2020
2 parents c6598aa + ba485b8 commit 22bf637
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 10 deletions.
23 changes: 19 additions & 4 deletions Frontend/HeidelGateway/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Shopware_Plugins_Frontend_HeidelGateway_Bootstrap extends Shopware_Compone
* @return string version number
*/
public function getVersion(){
return '20.04.08';
return '20.07.27';
}

/**
Expand Down Expand Up @@ -855,7 +855,7 @@ public function update($oldVersion){
));
$form->setElement('text', 'HGW_EASYMAXAMOUNT', array(
'label' => 'Maximum amount for easyCredit',
'value' => 3000,
'value' => 10000,
'scope' => \Shopware\Models\Config\Element::SCOPE_SHOP,
'description' => 'change maximum amount for easyCredit only after consultation with heidelpay'
));
Expand Down Expand Up @@ -1018,7 +1018,16 @@ public function update($oldVersion){
case '20.01.15':
case '20.04.08':
try{
$msg .= '* update 20.03.10<br />';
$msg .= '* update 20.04.08<br />';
} catch (Exception $e){
$this->logError($msg,$e);
}
// erase easyCredit Max-Amount
// fixed an issue with invoice guaranteed on mobile browsers
// fixed an issue with iFrame-forms on mobile browsers
case '20.07.27':
try{
$msg .= '* update 20.07.27<br />';
} catch (Exception $e){
$this->logError($msg,$e);
}
Expand Down Expand Up @@ -2258,6 +2267,8 @@ public function onPostDispatch(Enlight_Event_EventArgs $args){
$view->user = $user;
$view->swfActive = $this->swfActive();
$view->frame = $frame;
$view->HGW_EASYMINAMOUNT = $config->HGW_EASYMINAMOUNT;
$view->HGW_EASYMAXAMOUNT = $config->HGW_EASYMAXAMOUNT;

if ($config->HGW_DD_GUARANTEE_MODE == 1 ) {
$view->ddWithGuarantee = true;
Expand Down Expand Up @@ -2891,7 +2902,11 @@ public function onPostDispatchTemplate(Enlight_Event_EventArgs $args){
}
}

if((strtolower($user['additional']['payment']['name']) == 'hgw_hpr')) {
if(
(strtolower($user['additional']['payment']['name']) == 'hgw_hpr') &&
($basketAmount+$shippingAmount >= Shopware()->Plugins()->Frontend()->HeidelGateway()->Config()->HGW_EASYMINAMOUNT)&&
($basketAmount+$shippingAmount <= Shopware()->Plugins()->Frontend()->HeidelGateway()->Config()->HGW_EASYMAXAMOUNT)
) {
$paymentMethod = 'hpr';
$brand = "EASYCREDIT";
$configData = $this->ppd_config('5', $paymentMethod);
Expand Down
2 changes: 2 additions & 0 deletions Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php
Original file line number Diff line number Diff line change
Expand Up @@ -1910,6 +1910,8 @@ public function failAction(){
$this->View()->back2basket = 1;
$this->View()->ErrorMessage = Shopware()->Session()->HPError;
$this->View()->sErrorMessage = $this->getHPErrorMsg(Shopware()->Session()->HPError);
$this->View()->HGW_EASYMINAMOUNT = $this->Config()->HGW_EASYMINAMOUNT;
$this->View()->HGW_EASYMAXAMOUNT = $this->Config()->HGW_EASYMAXAMOUNT;
unset(Shopware()->Session()->HPError);
}catch(Exception $e){
Shopware()->Plugins()->HeidelGateway()->Logging('failAction | '.$e->getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,10 @@ $(document).ready(function(){

jQuery(errorDiv).parent().removeClass('is--hidden');
jQuery(errorDiv).parent().show();
jQuery('html, body').animate({scrollTop: 0}, 0);

if(window.navigator.userAgent.indexOf('CriOS') === -1){
jQuery('html, body').animate({scrollTop: 0}, 0);
}
return false;
}else{
// disable all other input fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,15 @@ $(document).ready(function(){
jQuery('#birthdate_papg').val(birthYear+'-'+birthMonth+'-'+birthDay);
}

jQuery('.newreg_papg select').on('blur', function() {
var birthDay = jQuery(".newreg_papg [name='Date_Day']").val();
var birthMonth = jQuery(".newreg_papg [name = 'Date_Month']").val();
var birthYear = jQuery(".newreg_papg [name = 'Date_Year']").val();

jQuery('#birthdate_papg').val(birthYear + '-' + birthMonth + '-' + birthDay);

});

$( document ).ajaxComplete(function() {
jQuery('.newreg_dd').click(function(e){
var birthDay = jQuery(".newreg_dd [name='Date_Day']").val();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ document.asyncReady(function() {

jQuery(errorDiv).parent().removeClass('is--hidden');
jQuery(errorDiv).parent().show();
jQuery('html, body').animate({scrollTop: 0}, 0);
if(window.navigator.userAgent.indexOf('CriOS') === -1){
jQuery('html, body').animate({scrollTop: 0}, 0);
}
return false;
}else{
// disable all other input fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ $(document).ready(function(){

jQuery(errorDiv).parent().removeClass('is--hidden');
jQuery(errorDiv).parent().show();
jQuery('html, body').animate({scrollTop: 0}, 0);
if(window.navigator.userAgent.indexOf('CriOS') === -1){
jQuery('html, body').animate({scrollTop: 0}, 0);
}
return false;
}else{
// disable all other input fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,15 @@ document.asyncReady(function () {
jQuery('#birthdate_papg').val(birthYear + '-' + birthMonth + '-' + birthDay);
}

jQuery('.newreg_papg select').on('blur', function() {
var birthDay = jQuery(".newreg_papg [name='Date_Day']").val();
var birthMonth = jQuery(".newreg_papg [name = 'Date_Month']").val();
var birthYear = jQuery(".newreg_papg [name = 'Date_Year']").val();

jQuery('#birthdate_papg').val(birthYear + '-' + birthMonth + '-' + birthDay);

});

jQuery('.newreg_ivpd').click(function (e) {
var birthDay = jQuery(".newreg_ivpd [name='DatePay_Day']").val();
var birthMonth = jQuery(".newreg_ivpd [name = 'DatePay_Month']").val();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ document.asyncReady(function() {

// PATH SWITCH
if(window.location.pathname.indexOf('account/payment') >= '0'){

// ACCOUNT/PAYMENT
var errorDiv = '#center .alert .alert--content';

Expand Down Expand Up @@ -370,7 +369,10 @@ document.asyncReady(function() {

jQuery(errorDiv).parent().removeClass('is--hidden');
jQuery(errorDiv).parent().show();
jQuery('html, body').animate({scrollTop: 0}, 0);
if(window.navigator.userAgent.indexOf('CriOS') === -1){
jQuery('html, body').animate({scrollTop: 0}, 0);
}

return false;
}else{
// disable all other input fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ $(document).ready(function(){

jQuery(errorDiv).parent().removeClass('is--hidden');
jQuery(errorDiv).parent().show();
jQuery('html, body').animate({scrollTop: 0}, 0);
if(window.navigator.userAgent.indexOf('CriOS') === -1){
jQuery('html, body').animate({scrollTop: 0}, 0);
}
return false;
}else{
// disable all other input fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,14 @@ document.asyncReady(function () {

jQuery('#birthdate_papg').val(birthYear + '-' + birthMonth + '-' + birthDay);
}
jQuery('.newreg_papg select').on('blur', function() {
var birthDay = jQuery(".newreg_papg [name='Date_Day']").val();
var birthMonth = jQuery(".newreg_papg [name = 'Date_Month']").val();
var birthYear = jQuery(".newreg_papg [name = 'Date_Year']").val();

jQuery('#birthdate_papg').val(birthYear + '-' + birthMonth + '-' + birthDay);

});

jQuery('.newreg_ivpd').click(function (e) {
var birthDay = jQuery(".newreg_ivpd [name='DatePay_Day']").val();
Expand Down

0 comments on commit 22bf637

Please sign in to comment.