releasenotes.md 15 KB
Newer Older
mattwire's avatar
mattwire committed
1
2
3
4
5
6
7
8
9
## Information

Releases use the following numbering system:
**{major}.{minor}.{incremental}**

* major: Major refactoring or rewrite - make sure you read and test very carefully!
* minor: Breaking change in some circumstances, or a new feature. Read carefully and make sure you understand the impact of the change.
* incremental: A "safe" change / improvement. Should *always* be safe to upgrade.

mattwire's avatar
mattwire committed
10
11
* **[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.

mattwire's avatar
mattwire committed
12
13
14
15
16
17
## Release 1.2.7 (not yet released)

* Minimum supported version of Stripe extension is now 6.7.
* Add `\Civi\Paymentshared\WebhookEventIgnoredException` for use by payment processors.
* Fix deprecated API4 join.

mattwire's avatar
mattwire committed
18
## Release 1.2.6 (2022-06-14)
mattwire's avatar
mattwire committed
19

mattwire's avatar
mattwire committed
20
21
22
* Add support for percentagepricesetfield/extrafee extensions (was previously supported but broke in 1.2.3).
* Support partial refunds.
* Fix [#8](https://lab.civicrm.org/extensions/mjwshared/-/issues/8) Support cancelling memberships when issuing refunds.
mattwire's avatar
mattwire committed
23

24
## Release 1.2.5 (2022-05-19)
mattwire's avatar
mattwire committed
25
26
27
28

* Separate `trxn_id` and `order_reference` params and prefer `trxn_id` in return values from `doPayment()`. This means that both are now available for use.
* Refunds: Add a lock around recording refund payment in `MJWIPNTrait::updateContributionRefund()`. This means we should not record a duplicate refund if both UI and IPN are processed at the same time.
* Update return params from `doRefund()`.
29
* [!33](https://lab.civicrm.org/extensions/mjwshared/-/merge_requests/33) Add processor filter to webhooks list page.
mattwire's avatar
mattwire committed
30

mattwire's avatar
mattwire committed
31
## Release 1.2.4
mattwire's avatar
mattwire committed
32
33

* Fix [!30](https://lab.civicrm.org/extensions/mjwshared/-/merge_requests/30) Pledges are also recurring.
mattwire's avatar
mattwire committed
34
* Set `civicrm_contribution_recur.processor_id` if still using `trxn_id`.
mattwire's avatar
mattwire committed
35

mattwire's avatar
mattwire committed
36
## Release 1.2.3
mattwire's avatar
mattwire committed
37
38
39
40
41
42

* [!29](https://lab.civicrm.org/extensions/mjwshared/-/merge_requests/29) Throw exception on error (when using handleError() function).
* Fix [#10](https://lab.civicrm.org/extensions/mjwshared/-/issues/10) Replace .prop() with .attr() when selecting BillingFormID.
* Improve `CRM.payment.getIsRecur()` so it returns early if recur is not supported.
* `Mjwpayment.get_contribution` API supports contribution_id - update spec.
* Replace core `calculateTotalFee()` javascript function with our own. This makes us independent of core changes - eg. see https://github.com/civicrm/civicrm-core/pull/22759.
mattwire's avatar
mattwire committed
43
* Calculate the total amount for multiple event participants when calling `CRM.payment.getTotalAmount()`.
mattwire's avatar
mattwire committed
44

mattwire's avatar
mattwire committed
45
## Release 1.2.2
mattwire's avatar
mattwire committed
46
47
48

* Add result parameter to webhookEventNotMatched and update example.
* Add getter/setter for contributionRecurID in IPN trait.
mattwire's avatar
mattwire committed
49
50
* Add link to example hook implementation for webhookEventNotMatched (https://github.com/mjwconsult/civicrm-stripewebhookrules).
* Enable js debugging for drupal webform.
mattwire's avatar
mattwire committed
51

mattwire's avatar
mattwire committed
52
## Release 1.2.1
mattwire's avatar
mattwire committed
53

mattwire's avatar
mattwire committed
54
* Fix display of 'Error' status on webhook UI.
mattwire's avatar
mattwire committed
55
* More helpful error messages when IPN processing fails.
mattwire's avatar
mattwire committed
56
* Job.process_paymentprocessor_webhooks needs to be domain-specific (setup to run on each domain).
mattwire's avatar
mattwire committed
57
58
* Add event_id and queue_limit to Job.process_paymentprocessor_webhooks.
* Add deleted count to Job.process_paymentprocessor_webhooks.
mattwire's avatar
mattwire committed
59
60
* Only delete old webhook entries for our domain (when multiple domains configured).
* Add system check to make sure that scheduled jobs are setup on all domains.
mattwire's avatar
mattwire committed
61

mattwire's avatar
mattwire committed
62
## Release 1.2
mattwire's avatar
mattwire committed
63
64
65
66
67
68
69

**Thanks to [ArtfulRobot](https://artfulrobot.uk) this release improves the webhook queueing system
and adds a user interface to view/manage webhooks.**

* Implement `processWebhookEvent()` - This receives and processes the row from `civicrm_paymentprocessor_webhook` (from `PaymentprocessorWebhook`).
* Update schema and add indexes to `civicrm_paymentprocessor_webhooks` table.
* Improve api3 `Job.ProcessPaymentprocessorWebhooks` return data and add time.
70
71
* Add angular app to view/manage webhooks.
* Fully remove support for CiviCRM older that 5.35.
mattwire's avatar
mattwire committed
72

mattwire's avatar
mattwire committed
73
## Release 1.1
mattwire's avatar
mattwire committed
74
75
**This release *should* be compatible with payment processors that require 1.0 or higher.
But make sure you test before upgrading.**
76
77

* Add multiple functions to CRM.payment (that were previously in civicrmStripe.js):
mattwire's avatar
mattwire committed
78
79
80
81
82
83
84
85
86
87
    * resetBillingFieldsRequiredForJQueryValidate
    * setBillingFieldsRequiredForJQueryValidate
    * addDrupalWebformActionElement
    * doStandardFormSubmit
    * validateReCaptcha
    * addSupportForCiviDiscount
    * displayError
    * swalFire
    * swalClose
    * triggerEvent
88
89
* Minor (backwards-compatible) fixes/changes to existing functions (eg. setting class variables directly instead of relying on return values).
* Refactor checks class, move checks from Stripe to mjwshared:
mattwire's avatar
mattwire committed
90
91
    * Check for Sweetalert extension.
    * Check for "Separate Membership Payment" is enabled.
92
93
* Support X.X-dev versioning for system checks - display a warning if dev version, version check no longer fails if eg. using 1.1-dev and minimum requirement is 1.1.
* Return a fixed set of params from `doPayment()` - see [dev/financial/issues#141](https://lab.civicrm.org/dev/financial/-/issues/141).
mattwire's avatar
mattwire committed
94
95
96
97
98
99
* Move cast to PropertyBag to beginDoPayment (reduce lines of code required in doPayment).
* Automatically handle deprecated `trxn_id` on `civicrm_contribution_recur` (copy from `processor_id` and add deprecated warnings).
* Add `beginUpdateSubscriptionBillingInfo()` and `beginChangeSubscriptionAmount()` methods - see [Payment Processor](paymentprocessor.md).
* Convert internal method `getContactID()` to require propertyBag.
* Define contributionRecur property on IPN class.
* Add new [hook `webhookEventNotMatched`](hooks.md).
mattwire's avatar
mattwire committed
100
* Add handling for multiple js payment processors and delayed crmBillingFormReloadComplete event trigger.
mattwire's avatar
mattwire committed
101
* Fix invalid currency on some event registration forms.
mattwire's avatar
mattwire committed
102
* Fix for non-default Wordpress basepage and AJAX reload of payment elements.
103

mattwire's avatar
mattwire committed
104
105
106
107
## Release 1.0.1

* Fix [!22](https://lab.civicrm.org/extensions/mjwshared/-/merge_requests/22) Handle deprecated API4 joins in PaymentProcessorwebhook API.

mattwire's avatar
mattwire committed
108
## Release 1.0
mattwire's avatar
mattwire committed
109
110
111

* Add PaymentprocessorWebhook entity, API and scheduled job that allows for queueing and scheduling of webhooks - see [Webhook Queue](webhookqueue.md)
* Fully remove support for CiviCRM older than 5.28.
mattwire's avatar
mattwire committed
112
* Add IPN getters/setters to provide object oriented initialisation.
mattwire's avatar
mattwire committed
113
* IPN data can be array, object or string.
mattwire's avatar
mattwire committed
114
115
* Clear cancel_date when setting a contribution back to pending.
* Support CiviCRM multi-domain (add default domain to API calls).
116
* Add `handleErrorThrowsException` option to MJWTrait (to help with testing).
mattwire's avatar
mattwire committed
117
118
119
* Total Amount is always required when completing contribution (`MJWIPNTrait::updateContributionCompleted()`).
* Set the 'payment_status' and add helper functions on doPayment() - see https://lab.civicrm.org/dev/financial/-/issues/141.
* Don't require total_amount for repeatContribution - it is set automatically via the template contribution of the recurring contribution.
mattwire's avatar
mattwire committed
120
* Fix [!19](https://lab.civicrm.org/extensions/mjwshared/-/merge_requests/19) Contributions held for fraud then approved don't send receipts - Send receipts on one-time payment notifications (if configured to do so via Contribution page).
mattwire's avatar
mattwire committed
121
* Enable [Refund UI](https://docs.civicrm.org/mjwshared/en/latest/refunds/) by default.
mattwire's avatar
mattwire committed
122
* "Javascript debugging" is now moved from Stripe to this library. If you have it enabled you will need to enable it again.
mattwire's avatar
mattwire committed
123

mattwire's avatar
mattwire committed
124
## Release 0.9.12
mattwire's avatar
mattwire committed
125
126

* Fix [#7](https://lab.civicrm.org/extensions/mjwshared/-/issues/7) Parse through thousands separators in calculateTaxAmount.
mattwire's avatar
mattwire committed
127
* Fix [!18](https://lab.civicrm.org/extensions/mjwshared/-/merge_requests/18) Incorrect financial transaction on repeatTransaction (Always pass payment_processor_id to Mjwshared.create_payment).
mattwire's avatar
mattwire committed
128

mattwire's avatar
mattwire committed
129
130
131
132
133
134
## Release 0.9.11

* Add `supportsRecur()` function to CRM.payment.
* Add `getPaymentProcessorSelectorValue()` function to CRM.payment.
* Fix [!15](https://lab.civicrm.org/extensions/mjwshared/-/merge_requests/15) Stripe loading on drupal 8 webforms.

135
136
137
138
## Release 0.9.10

* Add `getBillingEmail()` and `getBillingName()` functions to CRM.payment library.

mattwire's avatar
mattwire committed
139
## Release 0.9.9
mattwire's avatar
mattwire committed
140
141

* Trap and log exceptions triggered when calling repeatcontribution.
142
* Fix [Stripe!121](https://lab.civicrm.org/extensions/stripe/-/merge_requests/121) Drupal Webform: Recognize 0 installments as recurring.
mattwire's avatar
mattwire committed
143
* Add function processZeroAmountPayment to check/handle a zero amount payment.
mattwire's avatar
mattwire committed
144

mattwire's avatar
mattwire committed
145
146
147
148
149
150
151
## Release 0.9.8

**This affects new installs only. It should be completely safe to upgrade existing sites from 0.9.7 to 0.9.8**

* Fix [#6](https://lab.civicrm.org/extensions/mjwshared/-/issues/6) Install error on 0.9.7.
    - This was because the new settings file referenced a class from the Stripe extension.

mattwire's avatar
mattwire committed
152
## Release 0.9.7
153
154

* Add support for issuing refunds via the payment UI for payment processors that support refunds (eg. Stripe).
mattwire's avatar
mattwire committed
155
* Fix [Stripe#260](https://lab.civicrm.org/extensions/stripe/-/issues/260) Refund not communicated back to CiviCRM properly (CiviCRM < 5.32).
156

157
158
159
160
## Release 0.9.6

* Fix [Stripe#271](https://lab.civicrm.org/extensions/stripe/-/issues/271) Can't submit credit card memberships: Uncaught (in promise) TypeError: this.form is null

mattwire's avatar
mattwire committed
161
## Release 0.9.5
162
163
164

* Fix [#4](https://lab.civicrm.org/extensions/mjwshared/-/issues/4) Fatal error when is_email_receipt = null.

mattwire's avatar
mattwire committed
165
166
167
168
169
## Release 0.9.4

* Fix [#2](https://lab.civicrm.org/extensions/mjwshared/-/issues/2) Don't update receive_date when marking a contribution as failed.

## Release 0.9.3
mattwire's avatar
mattwire committed
170
171
172

* Add `getBillingSubmit()` to CRM.payment.

mattwire's avatar
mattwire committed
173
174
175
176
177
178
179
180
181
## Release 0.9.2

* Load CRM.payment library via coreResourceList so it is added everywhere CiviCRM is loaded (eg. drupal_webform etc)
* Fix stripe#238 two receipts sent for subscriptions
* Fix params for updateContributionFailed (id => contribution_id)
* Fix Mjwpayment.get_contribution
* Add getCurrency() function to CRM.payment
* Add 'Install now' to minifier/contributiontransactlegacy extensions now they are available for automated distribution

mattwire's avatar
mattwire committed
182
183
184
185
186
187
188
189
## Release 0.9.1

* Add workaround for [#17777](https://github.com/civicrm/civicrm-core/pull/17777) so receive_date is not updated on contribution (<5.29). Wrap workaround for order_reference in (<5.27) block
* Fix Failed->Completed for `updateContributionCompleted()` (you now need to pass in `contribution_status_id` as a parameter).
* Fix issues with params for Contribution.repeattransaction and IPNs (wrong params were being passed causing issues with completing contributions and duplicate payments).
* Check if we've already loaded CRM.payment library and don't reload if we have.
* Log errors if payment processor cannot be found for IPN.

mattwire's avatar
mattwire committed
190
191
192
## Release 0.9

**We are renaming this library to "Payment Shared". In some places you will see "Mjwshared" and in others "Payment Shared". They are the same thing!**
mattwire's avatar
mattwire committed
193

194
195
196
* Allow completing a contribution that has Failed status via `updateContributionCompleted()`.
* Add basic function for updating a contribution (eg. the `trxn_id`) without touching other things.
* Don't trigger exception if payment processor ID not found for IPN, use debug function because we don't have access to getPaymentProcessorLabel() function.
mattwire's avatar
mattwire committed
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214

#### API (v3)

* Update `Mjwpayment.get_payment` spec.
* Refactor `Mjwpayment.get_contribution` so it accepts `order_reference` and `trxn_id` params and returns a single contribution with matching payments.
* Use `Mjwpayment.create_payment` instead of `Payment.create` API in `updateContributionRefund()` for compatibility with multiple versions of CiviCRM.
* Add `Mjwpayment.notificationretry` that allows retrying IPN notifications stored in the `civicrm_system_log` table.

#### CRM.payment library

* Load crm.payment.js before any payment processor scripts. Loaded in `page-header` unless client is webform-civicrm when we load in `billing-block`.
* Add getIsRecur() function.
* Allow the client to override/define their own CRM.payment.getTotalAmount() function (currently used by webform_civicrm - see https://github.com/colemanw/webform_civicrm/pull/331).

#### Shared PHP libraries (MjwTrait and MjwIPNTrait)

* **[BC]** Convert beginDoPayment and getRecurringContributionId now require a `\Civi\Payment\PropertyBag` object instead of an array as parameter.

mattwire's avatar
mattwire committed
215

mattwire's avatar
mattwire committed
216
## Release 0.8.1
217
218

* Fixes and improvements to system checks.
mattwire's avatar
mattwire committed
219
* Enhance getErrorUrl function and fixes for CiviCRM 5.27+
220

mattwire's avatar
mattwire committed
221
222
223
224
225
226
227
## Release 0.8
**This release contains breaking changes**

* Update `updateContributionCompleted`, `updateContributionFailed`, `updateContributionRefunded`, `repeatContribution` IPN functions so they now take `order_reference` and `trxn_id` parameters.

  *You need to update `contribution_trxn_id` -> `order_reference` and `payment_trxn_id` to `trxn_id`.*

mattwire's avatar
mattwire committed
228
* Switch to contribution.repeattransaction and payment.create API functions.
mattwire's avatar
mattwire committed
229
* Initial support for \Civi\Payment\PropertyBag. Add new CRM.payment library. Add WebhookTrait
mattwire's avatar
mattwire committed
230

231
232
233
234
235
## Release 0.7

* Implement buildAsset hook so that assets can be loaded via AssetBuilder without the [minifier](https://lab.civicrm.org/extensions/minifier) extension being available.
* Recommend minifier extension (and implement a dummy buildAsset hook so extensions using buildAsset for the minifier will still work without it).
* Recommend contributiontransactlegacy extension if drupal webform_civicrm is enabled.
mattwire's avatar
mattwire committed
236
237
* Implements setExceptionMode to allow skipping the exit on exception policy [!5](https://lab.civicrm.org/extensions/mjwshared/-/merge_requests/5).
* Add compat functions to work around issues with `\Civi::resources()->addVars()` - This improves compatibility for forms with multiple payment processors.
mattwire's avatar
mattwire committed
238
* Update Mjwpayment.get_payment API to support multiple parameters and options per https://github.com/civicrm/civicrm-core/pull/17071 (CiviCRM 5.26).
239

240
241
242
## Release 0.6

* Improve updateContributionRefund() function to handle new `order_reference` field and use `Payment.create` API.
mattwire's avatar
mattwire committed
243
244
* Simply calls in Contribution.getbalance to improve performance.
* Add check to warn if nfp worldpay extension is installed as it breaks things!
mattwire's avatar
mattwire committed
245
* Add currency symbol to Contribution.getbalance
246

mattwire's avatar
mattwire committed
247
248
249
250
## Release 0.5.1

* Fix getBillingEmail() to work in more circumstances and add tests

mattwire's avatar
mattwire committed
251
252
253
254
## Release 0.5

* Add Contribution.GetBalance API

255
256
257
## Release 0.4.6

* Fix missing return array on getTokenParameter.
mattwire's avatar
mattwire committed
258

259
260
261
262
## Release 0.4.5

* Remove setTokenParameter, modify getTokenParameter as we're now using pre_approval_parameters in Stripe 6.2

mattwire's avatar
mattwire committed
263
264
265
266
## Release 0.4.4

* Record a full refund correctly

mattwire's avatar
mattwire committed
267
268
269
270
271
## Release 0.4.3

* Improvements to get/setTokenParameter.
* Add js validation to event registration form.

272
273
274
275
## Release 0.4.2

* Fix params passed to repeatTransaction - this was causing some repeating contributions to fail.

mattwire's avatar
mattwire committed
276
277
## Release 0.4.1

mattwire's avatar
mattwire committed
278
* Fix 'is not boolean' error on IPNs. `getIsTestMode()` was returning TRUE/FALSE but the API requires 1/0.
mattwire's avatar
mattwire committed
279

mattwire's avatar
mattwire committed
280
281
282
## Release 0.4

* Fix issue with non-default currency on form when you can choose from more than one payment processor on the form.
mattwire's avatar
mattwire committed
283
* Add `getTokenParameter()`/`setTokenParameter()` functions to MJWTrait which should be used when setting parameters
mattwire's avatar
mattwire committed
284
285
via javascript (eg. Stripe `paymentIntentID`) which are required when the payment is actually processed (via `doPayment()`).

mattwire's avatar
mattwire committed
286
287
288
289
290
## Release 0.3

* Major refactor of MJWIPNTrait.
* Add function to update the transaction ID for a payment related to a contribution.

mattwire's avatar
mattwire committed
291
292
293
294
295
296
297
## Release 0.2

* Add function to get configured currency for contributionpage/event registration page.

## Release 0.1

* Initial release