Skip to content

Commit 40df20e

Browse files
authored
release 3.0.0 (#101)
1 parent 71fc508 commit 40df20e

File tree

4 files changed

+47
-48
lines changed

4 files changed

+47
-48
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# Changelog
22

3-
## 3.0.0 May 10, 2024
3+
## 3.0.0 May 20, 2024
44

5-
- Improved error handling. Attempts to load checkout in a recovery WebView when certain errors are encountered. See [Error Handling](https://github.com/Shopify/checkout-sheet-kit-android#error-handling) for more information.
5+
- `ShopifyCheckoutSheet.present()` now returns an interface allowing clients to dismiss the sheet.
6+
- Error handling has been improved*. The kit also attempts to load checkout in a recovery WebView when certain errors are encountered. See [Error Handling](https://github.com/Shopify/checkout-sheet-kit-android#error-handling) for more information.
7+
8+
*Please note the exception class hierarchy has been updated to be more comprehensive. Each exception class now returns an `isRecoverable: Boolean`, an `errorCode` and an `errorDescription`.
69

710
## 2.0.1 March 19, 2024
811

README.md

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -257,50 +257,6 @@ val processor = object : DefaultCheckoutEventProcessor(activity) {
257257
> [!Note]
258258
> The `DefaultCheckoutEventProcessor` provides default implementations for current and future callback functions (such as `onLinkClicked()`), which can be overridden by clients wanting to change default behavior.
259259
260-
#### Exception Hierarchy
261-
262-
```mermaid
263-
---
264-
title: Checkout Sheet Kit Exception Hierarchy
265-
---
266-
classDiagram
267-
CheckoutException <|-- ConfigurationException
268-
CheckoutException <|-- CheckoutExpiredException
269-
CheckoutException <|-- AuthenticationException
270-
CheckoutException <|-- CheckoutSheetKitException
271-
CheckoutException <|-- CheckoutUnavailableException
272-
CheckoutUnavailableException <|-- HttpException
273-
CheckoutUnavailableException <|-- ClientException
274-
275-
<<Abstract>> CheckoutException
276-
CheckoutException : +String errorDescription
277-
CheckoutException : +String errorCode
278-
CheckoutException : +bool isRecoverable
279-
280-
class ConfigurationException{
281-
note: "Store or checkout configuration issues."
282-
}
283-
class CheckoutExpiredException{
284-
note: "Expired or invalid carts/checkouts."
285-
}
286-
class AuthenticationException{
287-
note: "Authentication issues."
288-
}
289-
class CheckoutUnavailableException{
290-
note: "Unexpected errors."
291-
}
292-
class HttpException{
293-
note: "Unexpected Http response"
294-
+int statusCode
295-
}
296-
class ClientException{
297-
note: "Unexpected client/web error"
298-
}
299-
class CheckoutSheetKitException{
300-
note: "Error in Checkout Sheet Kit code"
301-
}
302-
```
303-
304260
#### Error handling
305261
306262
In the event of a checkout error occurring, the Checkout Sheet Kit _may_ attempt to retry to recover from the error. Recovery will happen in the background by discarding the failed WebView and creating a new "recovery" instance. Recovery will be attempted in the following scenarios:
@@ -354,6 +310,46 @@ ShopifyCheckoutSheetKit.configure {
354310
| `ClientException` | 'client_error' | An unhandled client error was encountered. | Show checkout in a fallback WebView. |
355311
| `CheckoutUnavailableException` | 'unknown' | Checkout is unavailable for another reason, see error details for more info. | Show checkout in a fallback WebView. |
356312
313+
#### Exception Hierarchy
314+
315+
```mermaid
316+
---
317+
title: Checkout Sheet Kit Exception Hierarchy
318+
---
319+
classDiagram
320+
CheckoutException <|-- ConfigurationException
321+
CheckoutException <|-- CheckoutExpiredException
322+
CheckoutException <|-- CheckoutSheetKitException
323+
CheckoutException <|-- CheckoutUnavailableException
324+
CheckoutUnavailableException <|-- HttpException
325+
CheckoutUnavailableException <|-- ClientException
326+
327+
<<Abstract>> CheckoutException
328+
CheckoutException : +String errorDescription
329+
CheckoutException : +String errorCode
330+
CheckoutException : +bool isRecoverable
331+
332+
class ConfigurationException{
333+
note: "Store or checkout configuration issues."
334+
}
335+
class CheckoutExpiredException{
336+
note: "Expired or invalid carts/checkouts."
337+
}
338+
class CheckoutUnavailableException{
339+
note: "Unexpected errors."
340+
}
341+
class HttpException{
342+
note: "Unexpected Http response"
343+
+int statusCode
344+
}
345+
class ClientException{
346+
note: "Unexpected client/web error"
347+
}
348+
class CheckoutSheetKitException{
349+
note: "Error in Checkout Sheet Kit code"
350+
}
351+
```
352+
357353
#### Integrating with Web Pixels, monitoring behavioral data
358354
359355
App developers can use [lifecycle events](#monitoring-the-lifecycle-of-a-checkout-session) to

lib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def resolveEnvVarValue(name, defaultValue) {
1414
return rawValue ? rawValue : defaultValue
1515
}
1616

17-
def versionName = resolveEnvVarValue("CHECKOUT_SHEET_KIT_VERSION", "3.0.0-beta.2")
17+
def versionName = resolveEnvVarValue("CHECKOUT_SHEET_KIT_VERSION", "3.0.0")
1818

1919
ext {
2020
app_compat_version = '1.6.1'

lib/src/test/java/com/shopify/checkoutsheetkit/errors/CheckoutErrorDecoderTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class CheckoutErrorDecoderTest {
100100
name = "error",
101101
body = """[
102102
|{
103-
| "group": "authentication",
103+
| "group": "unrecoverable",
104104
| "flowType": "regular",
105105
| "type": "invalid_
106106
|}

0 commit comments

Comments
 (0)