diff --git a/CRM/Stripe/Check.php b/CRM/Stripe/Check.php index 3f27e73ad0ce7e5664fc8a26d1f543ef9a9e9c34..057f8eb620ce982cfe769a8d8c609995dfd83505 100644 --- a/CRM/Stripe/Check.php +++ b/CRM/Stripe/Check.php @@ -34,6 +34,7 @@ class CRM_Stripe_Check { self::checkExtensionFirewall($messages); self::checkExtensionSweetalert($messages); self::checkIfSeparateMembershipPaymentEnabled($messages); + self::checkUpgradeMessages($messages); } /** @@ -231,4 +232,39 @@ class CRM_Stripe_Check { } } + /** + * Display messages on version upgrade + * + * @param array $messages + */ + private static function checkUpgradeMessages(&$messages) { + // @todo: When we release 6.7 we need to think about if this should be displayed or not (consider install/upgrade). + if ((bool) \Civi::settings()->get('stripe_upgrade66message')) { + $message = new CRM_Utils_Check_Message( + __FUNCTION__ . 'stripe_upgrade66message', + E::ts('Thankyou for upgrading to Stripe 6.6. You MUST check your configuration to make sure it will continue working: + <ul> + <li><strong>Access AJAX API</strong> permission is required for all users that make payments using Stripe (including the anonymous user). + Make sure you update your CMS user roles to include this permission.</li> + <li>Billing address fields are now disabled by default (if you require additional fields collect them via a profile). + If you require the billing address fields you can enable them in <em>Administer->CiviContribute->Stripe Settings->Disable billing address fields</em>. + They will be removed in a future version - if this is a problem please contact <a href="https://mjw.pt/support">MJW</a> and let us know why!</li> + <li><a href="https://docs.civicrm.org/mjwshared/en/latest/refunds/">Refund UI</a> is now enabled by default.</li> + </ul>' + ), + E::ts('Stripe: You need to check some settings now that you have upgraded to 6.6'), + \Psr\Log\LogLevel::CRITICAL, + 'fa-money' + ); + $message->addAction( + E::ts('I\'ve read this'), + E::ts('I\'ve read this and made any necessary configuration changes - don\'t show me this upgrade message any + more'), + 'api3', + ['Setting', 'create', ['stripe_upgrade66message' => 0]] + ); + $messages[] = $message; + } + } + } diff --git a/LICENSE.txt b/LICENSE.txt index f3b5be84c8df0a125cf4b484635fab6b51072cbb..89eb271ccae1ca67ffcfa7c390a63856e7481d3c 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ Package: com.drastikbydesign.stripe -Copyright (C) 2020, Matthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk> +Copyright (C) 2021, Matthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk> Licensed under the GNU Affero Public License 3.0 (below). ------------------------------------------------------------------------------- diff --git a/docs/releasenotes.md b/docs/releasenotes.md index b0133ffab3e53f25d0b77f306694de4d54e9b7a9..89070f5382a2785ca8fad506c592adf0e4ed435b 100644 --- a/docs/releasenotes.md +++ b/docs/releasenotes.md @@ -9,10 +9,11 @@ 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 (not yet released 2021-03-05) +## Release 6.6 (not yet released 2021-04-10) **Requires mjwshared (Payment Shared) 1.0** -**Requires "Access AJAX API" for anonymous users** +**Access AJAX API permission is required** for all users that make payments using Stripe (including the anonymous user). +Make sure you update your CMS user roles to include this permission. * Support for [Payment Request Button](https://stripe.com/docs/stripe-js/elements/payment-request-button) which provides Google Pay and Apple Pay support. * To enable, you must set the "Country" in Stripe Settings and then the payment request button will replace the card element when the client browser supports it. @@ -25,6 +26,14 @@ Releases use the following numbering system: * Use new PaymentProcessorWebhook entity to track/process webhooks and avoid simultaneous processing of events. * Fixes to processing `invoice.payment_failed` IPN event (also triggered during 3d secure verification). * [!146](https://lab.civicrm.org/extensions/stripe/-/merge_requests/146) Listevent API improvements. +* Fix [#305](https://lab.civicrm.org/extensions/stripe/-/issues/305),[#293](https://lab.civicrm.org/extensions/stripe/-/issues/293) Allow specifying a static statement descriptor. +* [!148](https://lab.civicrm.org/extensions/stripe/-/merge_requests/148) Implement testing infrastructure with mock Stripe client and add multiple IPN tests - thankyou [@artfulrobot](https://artfulrobot.uk/). +* [!147](https://lab.civicrm.org/extensions/stripe/-/merge_requests/147) Multiple improvements to import API - thankyou [Jamie McClelland - ProgressiveTech](https://progressivetech.org/). +* Retrieve subscriptionID so we don't process charge.failed/invoice.payment_failed simultaneously. +* Fix showing 'successful' on thankyou page when payment failed because of error 'requires payment method'. +* Make more javascript strings translatable. +* Disable billing fields by default. +* Add 6.6 upgrade message to system checks. ## Release 6.5.8 diff --git a/info.xml b/info.xml index 52b62dadb6eb981a50e50db5981228b0dfe84f8e..ad533b0e547489eb84ba85478b31976234b0c80f 100644 --- a/info.xml +++ b/info.xml @@ -15,11 +15,11 @@ <author>Matthew Wire (MJW Consulting)</author> <email>mjw@mjwconsult.co.uk</email> </maintainer> - <releaseDate>2021-03-05</releaseDate> + <releaseDate>2021-04-10</releaseDate> <version>6.6-dev</version> - <develStage>alpha</develStage> + <develStage>beta</develStage> <compatibility> - <ver>5.28</ver> + <ver>5.35</ver> </compatibility> <comments>Original Author: Joshua Walker (drastik) - Drastik by Design. Jamie Mcclelland (ProgressiveTech) did a lot of the 5.x compatibility work. diff --git a/settings/stripe.setting.php b/settings/stripe.setting.php index 41ff491d671f3ccf2d4b992561c7796326426128..b49abb91d2f5352af7c08b56c08da1ccf3ab20cc 100644 --- a/settings/stripe.setting.php +++ b/settings/stripe.setting.php @@ -64,10 +64,10 @@ return [ 'name' => 'stripe_nobillingaddress', 'type' => 'Boolean', 'html_type' => 'checkbox', - 'default' => 0, + 'default' => 1, 'is_domain' => 1, 'is_contact' => 0, - 'title' => E::ts('Disable billing address fields (Experimental)'), + 'title' => E::ts('Disable billing address fields'), 'description' => E::ts('Disable the fixed billing address fields block. Historically this was required by CiviCRM but since Stripe 6.x the stripe element collects everything it requires to make payment.'), 'html_attributes' => [], 'settings_pages' => [ @@ -192,4 +192,14 @@ If this is empty the "suffix" will be generated by CiviCRM using the information ] ], ], + 'stripe_upgrade66message' => [ + 'name' => 'stripe_upgrade66message', + 'type' => 'Boolean', + 'html_type' => 'checkbox', + 'default' => 1, + 'is_domain' => 1, + 'is_contact' => 0, + 'title' => E::ts('Show 6.6 upgrade message (system check)'), + 'html_attributes' => [], + ], ];