diff --git a/CRM/Stripe/Check.php b/CRM/Stripe/Check.php index 184346e6afd51d113800f224fea8f5dd057f4de0..02d9a0bed6380b0e5289c3bf2e8536ecf67988f8 100644 --- a/CRM/Stripe/Check.php +++ b/CRM/Stripe/Check.php @@ -26,7 +26,7 @@ class CRM_Stripe_Check { * @var string */ const MIN_VERSION_MJWSHARED = '1.0'; - const MIN_VERSION_SWEETALERT = '1.4.1'; + const MIN_VERSION_SWEETALERT = '1.5'; const MIN_VERSION_FIREWALL = '1.1.3'; public static function checkRequirements(&$messages) { diff --git a/docs/releasenotes.md b/docs/releasenotes.md index 4d4cb16e0026eaa95f060226cb33830d814f3f9b..d2035a04ea4f5e4f8ce53672db534be27a240272 100644 --- a/docs/releasenotes.md +++ b/docs/releasenotes.md @@ -9,6 +9,10 @@ Releases use the following numbering system: * **[BC]**: Items marked with [BC] indicate a breaking change that will require updates to your code if you are using that code in your extension. +## Release 6.6.2 (not yet released) + +* SweetAlert 10/11 compatibility - require SweetAlert extension 1.5 + ## Release 6.6.1 * Fix PHP notice when there are no Stripe customers. @@ -18,6 +22,7 @@ Releases use the following numbering system: * Fixes to PaymentRequest button [#313](https://lab.civicrm.org/extensions/stripe/-/issues/313): * Hide submit buttons when paymentRequest button is active. * Fix loading of paymentRequest element when multiple payment processors available. + * Fix no payment element loading in browser when no saved cards and paymentRequest is default. * Fix [#331](https://lab.civicrm.org/extensions/stripe/-/issues/331) The API Stripe.importsubscription returns authorization failed. ## Release 6.6 diff --git a/js/civicrmStripeConfirm.js b/js/civicrmStripeConfirm.js index ed66f6bdc7177880dd0d4c176eed609f7233acf0..50d9cc691ef66404a99380063cfd91bf7de0aff0 100644 --- a/js/civicrmStripeConfirm.js +++ b/js/civicrmStripeConfirm.js @@ -233,7 +233,7 @@ swalFire: function(parameters, scrollToElement, fallBackToAlert) { if (typeof Swal === 'function') { if (scrollToElement.length > 0) { - parameters.onAfterClose = function() { window.scrollTo($(scrollToElement).position()); }; + parameters.didClose = function() { window.scrollTo($(scrollToElement).position()); }; } Swal.fire(parameters); } @@ -276,8 +276,8 @@ confirm.swalFire({ title: ts('Please wait...'), allowOutsideClick: false, - onBeforeOpen: function() { - Swal.showLoading(); + willOpen: function() { + Swal.showLoading(Swal.getConfirmButton()); } }, '', false); diff --git a/js/civicrm_stripe.js b/js/civicrm_stripe.js index 45f8f7a2d115ba08d2489dac80f8b8a314f186f9..9cc329aecf96a92d3ac2494b5ab363383b5b9be4 100644 --- a/js/civicrm_stripe.js +++ b/js/civicrm_stripe.js @@ -252,8 +252,8 @@ title: ts('Please wait'), text: ts(' while we pre-authorize your card...'), allowOutsideClick: false, - onBeforeOpen: function() { - Swal.showLoading(); + willOpen: function() { + Swal.showLoading(Swal.getConfirmButton()); } }, '', false); CRM.api3('StripePaymentintent', 'Process', { @@ -315,8 +315,8 @@ title: ts('Please wait'), text: ts(' preparing your payment...'), allowOutsideClick: false, - onBeforeOpen: function() { - Swal.showLoading(); + willOpen: function() { + Swal.showLoading(Swal.getConfirmButton()); } }, '', false); CRM.api3('StripePaymentintent', 'Process', { @@ -1028,7 +1028,7 @@ function swalFire(parameters, scrollToElement, fallBackToAlert) { if (typeof Swal === 'function') { if (scrollToElement.length > 0) { - parameters.onAfterClose = function() { window.scrollTo($(scrollToElement).position()); }; + parameters.didClose = function() { window.scrollTo($(scrollToElement).position()); }; } Swal.fire(parameters); }