diff --git a/Application/views/frontend/tpl/stripecreditcard.tpl b/Application/views/frontend/tpl/stripecreditcard.tpl index 8547bff..66cd120 100644 --- a/Application/views/frontend/tpl/stripecreditcard.tpl +++ b/Application/views/frontend/tpl/stripecreditcard.tpl @@ -116,9 +116,24 @@ //Activating card details form after load if stripe card is selected document.addEventListener('DOMContentLoaded', function() { - $('#payment_stripecreditcard').is(':checked') && !$('#payment_stripecreditcard').parents('dt').next('dd').is(':visible') ? - $('#payment_stripecreditcard').trigger('click') - : false; + const $stripeRadio = $('#payment_stripecreditcard'); + const $stripeCardDD = $stripeRadio.parents('dt').next('dd'); + const $stripeUsedCardSelect = $stripeCardDD.find('#stripe_used_card'); + + // Ensure Stripe credit card payment option is expanded if selected + if ($stripeRadio.is(':checked') && !$stripeCardDD.is(':visible')) { + $stripeRadio.trigger('click'); + } + + //this is a dirty fix for selecting firs card selection element so the card UI not stuck when customer + // uses the browsers history back + setTimeout(function (){ + // Reset used card selection when Stripe is selected + if ($stripeRadio.is(':checked')) { + $stripeUsedCardSelect.prop('selectedIndex', 0); + } + + }, 200); }); diff --git a/metadata.php b/metadata.php index f39b051..dfd1f66 100644 --- a/metadata.php +++ b/metadata.php @@ -57,7 +57,7 @@ 'en' => 'This module integrates STRIPE as payment provider in your OXID Shop.', ], 'thumbnail' => 'stripe_logo.png', - 'version' => '1.0.7', + 'version' => '1.0.7-rc2', 'author' => 'OXID eSales AG', 'url' => 'https://www.oxid-esales.com', 'email' => 'info@oxid-esales.com',