@pradip1995/segment-login-template 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pradip1995/segment-login-template",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"@pradip1995/commerce-auth": "^4.0.0",
|
|
29
29
|
"@pradip1995/commerce-core": "^4.0.0",
|
|
30
30
|
"@pradip1995/plugin-sdk": "^0.2.0",
|
|
31
|
+
"next": ">=15",
|
|
31
32
|
"react": ">=19",
|
|
32
|
-
"react-dom": ">=19"
|
|
33
|
-
"next": ">=15"
|
|
33
|
+
"react-dom": ">=19"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@pradip1995/commerce-auth": "^4.0.0",
|
|
@@ -136,6 +136,12 @@ function parseBackendError(body: unknown, status: number): string {
|
|
|
136
136
|
if (/^invalid request( data)?\.?$/i.test(primary)) {
|
|
137
137
|
return "Invalid payment details. Check required fields and try again."
|
|
138
138
|
}
|
|
139
|
+
if (/payment details? with customer(_|\s)?id already exists/i.test(primary)) {
|
|
140
|
+
return "Could not remove this payment method because of a conflict with your default method. Please set another method as default, then try again."
|
|
141
|
+
}
|
|
142
|
+
if (/already exists/i.test(primary) && /customer/i.test(primary)) {
|
|
143
|
+
return "Could not update your default payment method. Please try again, or set another method as default first."
|
|
144
|
+
}
|
|
139
145
|
if (/^failed to delete payment detail\.?$/i.test(primary)) {
|
|
140
146
|
const detail =
|
|
141
147
|
typeof data.error === "string" && data.error.trim() ? data.error.trim() : ""
|