@akinon/next 1.118.0-rc.5 → 1.118.0-rc.7
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/CHANGELOG.md +4 -0
- package/package.json +2 -2
- package/utils/index.ts +17 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/next",
|
|
3
3
|
"description": "Core package for Project Zero Next",
|
|
4
|
-
"version": "1.118.0-rc.
|
|
4
|
+
"version": "1.118.0-rc.7",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"set-cookie-parser": "2.6.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@akinon/eslint-plugin-projectzero": "1.118.0-rc.
|
|
38
|
+
"@akinon/eslint-plugin-projectzero": "1.118.0-rc.7",
|
|
39
39
|
"@babel/core": "7.26.10",
|
|
40
40
|
"@babel/preset-env": "7.26.9",
|
|
41
41
|
"@babel/preset-typescript": "7.27.0",
|
package/utils/index.ts
CHANGED
|
@@ -204,6 +204,23 @@ export const getPosError = () => {
|
|
|
204
204
|
return error;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
+
export const checkPaymentWillRedirect = (response: {
|
|
208
|
+
context_list?: Array<{
|
|
209
|
+
page_name: string;
|
|
210
|
+
page_context?: { context_data?: { redirect_url?: string } };
|
|
211
|
+
}>;
|
|
212
|
+
redirect_url?: string;
|
|
213
|
+
errors?: unknown;
|
|
214
|
+
}): boolean => {
|
|
215
|
+
if (!response) return false;
|
|
216
|
+
|
|
217
|
+
const hasThankYouPage = response.context_list?.some(
|
|
218
|
+
(c) => c.page_name === 'ThankYouPage'
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
return Boolean(hasThankYouPage || response.redirect_url);
|
|
222
|
+
};
|
|
223
|
+
|
|
207
224
|
export const urlSchemes = [
|
|
208
225
|
'http',
|
|
209
226
|
'tel:',
|