Skip to content

Commit

Permalink
Merge pull request #38 from OXID-eSales/STRIPE-45
Browse files Browse the repository at this point in the history
Stripe 45
  • Loading branch information
mariolorenz authored Nov 28, 2024
2 parents 3456e6a + e80a823 commit 47f0a2b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
21 changes: 18 additions & 3 deletions Application/views/frontend/tpl/stripecreditcard.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down
2 changes: 1 addition & 1 deletion metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]',
Expand Down

0 comments on commit 47f0a2b

Please sign in to comment.