diff --git a/demo/angular/android/app/src/main/AndroidManifest.xml b/demo/angular/android/app/src/main/AndroidManifest.xml
index 44724c9c7..9ccb5f6df 100644
--- a/demo/angular/android/app/src/main/AndroidManifest.xml
+++ b/demo/angular/android/app/src/main/AndroidManifest.xml
@@ -64,6 +64,10 @@
android:name="com.getcapacitor.community.stripe.google_pay_is_testing"
android:value="@bool/google_pay_is_testing"/>
+
+
diff --git a/demo/angular/android/app/src/main/res/values/strings.xml b/demo/angular/android/app/src/main/res/values/strings.xml
index a65a0efd0..8c6c88905 100644
--- a/demo/angular/android/app/src/main/res/values/strings.xml
+++ b/demo/angular/android/app/src/main/res/values/strings.xml
@@ -10,5 +10,6 @@
US
Widget Store
true
+ false
diff --git a/demo/react/android/app/src/main/AndroidManifest.xml b/demo/react/android/app/src/main/AndroidManifest.xml
index 9cce413ce..19295a13a 100644
--- a/demo/react/android/app/src/main/AndroidManifest.xml
+++ b/demo/react/android/app/src/main/AndroidManifest.xml
@@ -58,6 +58,10 @@
android:name="com.getcapacitor.community.stripe.google_pay_is_testing"
android:value="@bool/google_pay_is_testing"/>
+
+
diff --git a/demo/react/android/app/src/main/res/values/strings.xml b/demo/react/android/app/src/main/res/values/strings.xml
index a65a0efd0..8c6c88905 100644
--- a/demo/react/android/app/src/main/res/values/strings.xml
+++ b/demo/react/android/app/src/main/res/values/strings.xml
@@ -10,5 +10,6 @@
US
Widget Store
true
+ false
diff --git a/demo/react/package-lock.json b/demo/react/package-lock.json
index 5f121dfb7..5bdc2bd46 100644
--- a/demo/react/package-lock.json
+++ b/demo/react/package-lock.json
@@ -8,7 +8,7 @@
"name": "react",
"version": "0.0.1",
"dependencies": {
- "@capacitor-community/stripe": "^5.0.4",
+ "@capacitor-community/stripe": "^5.5.0",
"@capacitor/android": "^5.0.0",
"@capacitor/app": "5.0.0",
"@capacitor/core": "5.0.0",
@@ -16,23 +16,24 @@
"@capacitor/ios": "^5.0.0",
"@capacitor/keyboard": "5.0.0",
"@capacitor/status-bar": "5.0.0",
- "@ionic/react": "^6.0.0",
- "@ionic/react-router": "^6.0.0",
+ "@ionic/react": "^7.0.0",
+ "@ionic/react-router": "^7.0.0",
"@testing-library/jest-dom": "^5.11.9",
- "@testing-library/react": "^11.2.5",
+ "@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^12.6.3",
"@types/jest": "^26.0.20",
"@types/node": "^12.19.15",
- "@types/react": "^16.14.3",
- "@types/react-dom": "^16.9.10",
+ "@types/react": "^18.0.17",
+ "@types/react-dom": "^18.0.6",
"@types/react-router": "^5.1.11",
"@types/react-router-dom": "^5.1.7",
- "ionicons": "^5.4.0",
- "react": "^17.0.1",
- "react-dom": "^17.0.1",
+ "history": "^4.9.0",
+ "ionicons": "^7.0.0",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
- "react-scripts": "5.0.0",
+ "react-scripts": "^5.0.0",
"stripe-pwa-elements": "^2.1.0",
"typescript": "^4.1.3",
"web-vitals": "^0.2.4",
@@ -50,7 +51,11 @@
"workbox-streams": "^5.1.4"
},
"devDependencies": {
- "@capacitor/cli": "5.0.0"
+ "@capacitor/cli": "5.0.0",
+ "@typescript-eslint/eslint-plugin": "^5.59.2",
+ "@typescript-eslint/parser": "^5.59.2",
+ "eslint": "^8.35.0",
+ "eslint-plugin-react": "^7.32.2"
}
},
"node_modules/@adobe/css-tools": {
@@ -1916,18 +1921,6 @@
"node": ">=6.9.0"
}
},
- "node_modules/@babel/runtime-corejs3": {
- "version": "7.21.5",
- "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.21.5.tgz",
- "integrity": "sha512-FRqFlFKNazWYykft5zvzuEl1YyTDGsIRrjV9rvxvYkUC7W/ueBng1X68Xd6uRMzAaJ0xMKn08/wem5YS1lpX8w==",
- "dependencies": {
- "core-js-pure": "^3.25.1",
- "regenerator-runtime": "^0.13.11"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
"node_modules/@babel/template": {
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
@@ -1980,16 +1973,16 @@
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw=="
},
"node_modules/@capacitor-community/stripe": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/@capacitor-community/stripe/-/stripe-5.0.4.tgz",
- "integrity": "sha512-tgPaNDXeOg4tcBfTqR0T2M/4CjUnaMaDYAX7g6+pbl8poabLoSc+5vwOjekLmozVybLBMAhAm9VtXVPSmvQOWQ==",
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/@capacitor-community/stripe/-/stripe-5.5.0.tgz",
+ "integrity": "sha512-QYNvcFru24i50X67ptmkC6M9Iw8vnIpclOZcI83WEv3sJcI5rk2T700habAGi+8fjvlP92oIZWGA5s+of3zOyA==",
"engines": {
"node": ">=16.0.0"
},
"peerDependencies": {
"@capacitor/core": "^5.0.0",
- "@stripe-elements/stripe-elements": "^2.0.2",
- "react": "^17.0.0 || ^18.0.0"
+ "react": "^17.0.0 || ^18.0.0",
+ "stripe-pwa-elements": "^2.1.0"
}
},
"node_modules/@capacitor/android": {
@@ -2557,30 +2550,34 @@
}
},
"node_modules/@ionic/core": {
- "version": "6.7.4",
- "resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.7.4.tgz",
- "integrity": "sha512-IG6vQtt4xrJdas6k1CwqahD/BWsYK6Gi/BAIN8TumBmtfNMu38iOG6Dh05q4hCQzmDm2xDS/BVD3Qz7AmOKArA==",
+ "version": "7.8.1",
+ "resolved": "https://registry.npmjs.org/@ionic/core/-/core-7.8.1.tgz",
+ "integrity": "sha512-SsoDy0HaifCcWBlcyRIpTceboz6tSg4gjNr/LRGJyg+r2bWdoG3jeuQDg0Affox8dar7QvODk3AWO/7RFWLOfg==",
"dependencies": {
- "@stencil/core": "^2.18.0",
- "ionicons": "^6.1.3",
+ "@stencil/core": "^4.12.2",
+ "ionicons": "^7.2.2",
"tslib": "^2.1.0"
}
},
- "node_modules/@ionic/core/node_modules/ionicons": {
- "version": "6.1.3",
- "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.3.tgz",
- "integrity": "sha512-ptzz38dd/Yq+PgjhXegh7yhb/SLIk1bvL9vQDtLv1aoSc7alO6mX2DIMgcKYzt9vrNWkRu1f9Jr78zIFFyOXqw==",
- "dependencies": {
- "@stencil/core": "^2.18.0"
+ "node_modules/@ionic/core/node_modules/@stencil/core": {
+ "version": "4.13.0",
+ "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.13.0.tgz",
+ "integrity": "sha512-gg+gtBWekQ08mDja8GVAUHNu+rrFhQaKZDvfhnS3l/5JbYiJddTimuDPPhuc0sR0JZL1iRdJTJSa+JbvmnQ1cQ==",
+ "bin": {
+ "stencil": "bin/stencil"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.10.0"
}
},
"node_modules/@ionic/react": {
- "version": "6.7.4",
- "resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.7.4.tgz",
- "integrity": "sha512-+TLGgwB/rqcgQ/48q6wyds1aNDwVEo8MC1c0zoposKcGow4ic/oh+2j5U7+a2/XHc6sQn5dXAHX4Nf6rMjJWhw==",
+ "version": "7.8.1",
+ "resolved": "https://registry.npmjs.org/@ionic/react/-/react-7.8.1.tgz",
+ "integrity": "sha512-MJgmlsm69lvHiPBFHSUg9ZGbWyjfn5ZDUidYSE8oWA/L0Mtd7XqNl9DMlSXWy87jaOET96R72eSwgsAPZ+FEBA==",
"dependencies": {
- "@ionic/core": "6.7.4",
- "ionicons": "^6.1.3",
+ "@ionic/core": "7.8.1",
+ "ionicons": "^7.0.0",
"tslib": "*"
},
"peerDependencies": {
@@ -2589,11 +2586,11 @@
}
},
"node_modules/@ionic/react-router": {
- "version": "6.7.4",
- "resolved": "https://registry.npmjs.org/@ionic/react-router/-/react-router-6.7.4.tgz",
- "integrity": "sha512-LvqfIA+31mqoyyXryFw7PuPvG3TOw1l4+cvcguWQgstngFv2fO9Qz0VsIgu5/1HfAucuMiozoq1z4NqtoO9PQA==",
+ "version": "7.8.1",
+ "resolved": "https://registry.npmjs.org/@ionic/react-router/-/react-router-7.8.1.tgz",
+ "integrity": "sha512-RmkucjZkMNE7OK8odL/+L9PLPINliH1uWiY9nObfwOtnyt9iXnPgs8MjxDGO3ndiTEPu+ssRLlol9GEwhxjjvw==",
"dependencies": {
- "@ionic/react": "6.7.4",
+ "@ionic/react": "7.8.1",
"tslib": "*"
},
"peerDependencies": {
@@ -2603,14 +2600,6 @@
"react-router-dom": "^5.0.1"
}
},
- "node_modules/@ionic/react/node_modules/ionicons": {
- "version": "6.1.3",
- "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.3.tgz",
- "integrity": "sha512-ptzz38dd/Yq+PgjhXegh7yhb/SLIk1bvL9vQDtLv1aoSc7alO6mX2DIMgcKYzt9vrNWkRu1f9Jr78zIFFyOXqw==",
- "dependencies": {
- "@stencil/core": "^2.18.0"
- }
- },
"node_modules/@ionic/utils-array": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@ionic/utils-array/-/utils-array-2.1.5.tgz",
@@ -3347,28 +3336,6 @@
"npm": ">=6.0.0"
}
},
- "node_modules/@stripe-elements/stripe-elements": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@stripe-elements/stripe-elements/-/stripe-elements-2.0.2.tgz",
- "integrity": "sha512-LxaIKp4N3ZsveyKRHHB/HtwMpNhh8mtm3Raj6QXCLNqRrfObaKOnEFzI0D8khg5oYKCX645a5AxPzqOfIGRbQA==",
- "peer": true,
- "dependencies": {
- "@stencil/core": "^2.14.2",
- "@stripe/stripe-js": "^1.25.0",
- "i18next": "^20.3.3",
- "i18next-browser-languagedetector": "^6.1.2",
- "ionicons": "^6.0.1"
- }
- },
- "node_modules/@stripe-elements/stripe-elements/node_modules/ionicons": {
- "version": "6.1.3",
- "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.3.tgz",
- "integrity": "sha512-ptzz38dd/Yq+PgjhXegh7yhb/SLIk1bvL9vQDtLv1aoSc7alO6mX2DIMgcKYzt9vrNWkRu1f9Jr78zIFFyOXqw==",
- "peer": true,
- "dependencies": {
- "@stencil/core": "^2.18.0"
- }
- },
"node_modules/@stripe/stripe-js": {
"version": "1.52.1",
"resolved": "https://registry.npmjs.org/@stripe/stripe-js/-/stripe-js-1.52.1.tgz",
@@ -3645,91 +3612,38 @@
}
},
"node_modules/@testing-library/react": {
- "version": "11.2.7",
- "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.2.7.tgz",
- "integrity": "sha512-tzRNp7pzd5QmbtXNG/mhdcl7Awfu/Iz1RaVHY75zTdOkmHCuzMhRL83gWHSgOAcjS3CCbyfwUHMZgRJb4kAfpA==",
+ "version": "13.4.0",
+ "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-13.4.0.tgz",
+ "integrity": "sha512-sXOGON+WNTh3MLE9rve97ftaZukN3oNf2KjDy7YTx6hcTO2uuLHuCGynMDhFwGw/jYf4OJ2Qk0i4i79qMNNkyw==",
"dependencies": {
"@babel/runtime": "^7.12.5",
- "@testing-library/dom": "^7.28.1"
+ "@testing-library/dom": "^8.5.0",
+ "@types/react-dom": "^18.0.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=12"
},
"peerDependencies": {
- "react": "*",
- "react-dom": "*"
- }
- },
- "node_modules/@testing-library/react/node_modules/@jest/types": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
- "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
- "dependencies": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^15.0.0",
- "chalk": "^4.0.0"
- },
- "engines": {
- "node": ">= 10.14.2"
+ "react": "^18.0.0",
+ "react-dom": "^18.0.0"
}
},
"node_modules/@testing-library/react/node_modules/@testing-library/dom": {
- "version": "7.31.2",
- "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.31.2.tgz",
- "integrity": "sha512-3UqjCpey6HiTZT92vODYLPxTBWlM8ZOOjr3LX5F37/VRipW2M1kX6I/Cm4VXzteZqfGfagg8yXywpcOgQBlNsQ==",
+ "version": "8.20.1",
+ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.20.1.tgz",
+ "integrity": "sha512-/DiOQ5xBxgdYRC8LNk7U+RWat0S3qRLeIw3ZIkMQ9kkVlRmwD/Eg8k8CqIpD6GW7u20JIUOfMKbxtiLutpjQ4g==",
"dependencies": {
"@babel/code-frame": "^7.10.4",
"@babel/runtime": "^7.12.5",
- "@types/aria-query": "^4.2.0",
- "aria-query": "^4.2.2",
+ "@types/aria-query": "^5.0.1",
+ "aria-query": "5.1.3",
"chalk": "^4.1.0",
- "dom-accessibility-api": "^0.5.6",
- "lz-string": "^1.4.4",
- "pretty-format": "^26.6.2"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/@testing-library/react/node_modules/@types/aria-query": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz",
- "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig=="
- },
- "node_modules/@testing-library/react/node_modules/@types/yargs": {
- "version": "15.0.15",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.15.tgz",
- "integrity": "sha512-IziEYMU9XoVj8hWg7k+UJrXALkGFjWJhn5QFEv9q4p+v40oZhSuC135M38st8XPjICL7Ey4TV64ferBGUoJhBg==",
- "dependencies": {
- "@types/yargs-parser": "*"
- }
- },
- "node_modules/@testing-library/react/node_modules/aria-query": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz",
- "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==",
- "dependencies": {
- "@babel/runtime": "^7.10.2",
- "@babel/runtime-corejs3": "^7.10.2"
- },
- "engines": {
- "node": ">=6.0"
- }
- },
- "node_modules/@testing-library/react/node_modules/pretty-format": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
- "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
- "dependencies": {
- "@jest/types": "^26.6.2",
- "ansi-regex": "^5.0.0",
- "ansi-styles": "^4.0.0",
- "react-is": "^17.0.1"
+ "dom-accessibility-api": "^0.5.9",
+ "lz-string": "^1.5.0",
+ "pretty-format": "^27.0.2"
},
"engines": {
- "node": ">= 10"
+ "node": ">=12"
}
},
"node_modules/@testing-library/user-event": {
@@ -3766,8 +3680,7 @@
"node_modules/@types/aria-query": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz",
- "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==",
- "peer": true
+ "integrity": "sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q=="
},
"node_modules/@types/babel__core": {
"version": "7.20.0",
@@ -4038,9 +3951,9 @@
"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw=="
},
"node_modules/@types/react": {
- "version": "16.14.40",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.40.tgz",
- "integrity": "sha512-elQj2VQHDuJ5xuEcn5Wxh/YQFNbEuPJFRKSdyG866awDm5dmtoqsMmuAJWb/l/qd2kDkZMfOTKygVfMIdBBPKg==",
+ "version": "18.2.70",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.70.tgz",
+ "integrity": "sha512-hjlM2hho2vqklPhopNkXkdkeq6Lv8WSZTpr7956zY+3WS5cfYUewtCzsJLsbW5dEv3lfSeQ4W14ZFeKC437JRQ==",
"dependencies": {
"@types/prop-types": "*",
"@types/scheduler": "*",
@@ -4048,11 +3961,11 @@
}
},
"node_modules/@types/react-dom": {
- "version": "16.9.19",
- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.19.tgz",
- "integrity": "sha512-xC8D280Bf6p0zguJ8g62jcEOKZiUbx9sIe6O3tT/lKfR87A7A6g65q13z6D5QUMIa/6yFPkNhqjF5z/VVZEYqQ==",
+ "version": "18.2.22",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.22.tgz",
+ "integrity": "sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==",
"dependencies": {
- "@types/react": "^16"
+ "@types/react": "*"
}
},
"node_modules/@types/react-router": {
@@ -8994,23 +8907,23 @@
}
},
"node_modules/ionicons": {
- "version": "5.5.4",
- "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-5.5.4.tgz",
- "integrity": "sha512-3ph8X9my3inhabWEZ7N0XRA0MnnNQ1v9a602mLNgWsIXnxE9G5BybIZ/pws/OZZ/hoNlvSjk801N03yL9/FNgQ==",
+ "version": "7.3.0",
+ "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-7.3.0.tgz",
+ "integrity": "sha512-l9quySYi+o4T6mFzhKRyU/1nKc2Zs0zxs7jWcq9iVRhRPQondV11jYqLTed0lVVXHfGrBCfnedKl9D6BCnA1UQ==",
"dependencies": {
- "@stencil/core": "~2.10.0"
+ "@stencil/core": "^4.0.3"
}
},
"node_modules/ionicons/node_modules/@stencil/core": {
- "version": "2.10.0",
- "resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.10.0.tgz",
- "integrity": "sha512-15rWMTPQ/sp0lSV82HVCXkIya3QLN+uBl7pqK4JnTrp4HiLrzLmNbWjbvgCs55gw0lULbCIGbRIEsFz+Pe/Q+A==",
+ "version": "4.13.0",
+ "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.13.0.tgz",
+ "integrity": "sha512-gg+gtBWekQ08mDja8GVAUHNu+rrFhQaKZDvfhnS3l/5JbYiJddTimuDPPhuc0sR0JZL1iRdJTJSa+JbvmnQ1cQ==",
"bin": {
"stencil": "bin/stencil"
},
"engines": {
- "node": ">=12.10.0",
- "npm": ">=6.0.0"
+ "node": ">=16.0.0",
+ "npm": ">=7.10.0"
}
},
"node_modules/ipaddr.js": {
@@ -13277,12 +13190,11 @@
}
},
"node_modules/react": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
- "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
+ "version": "18.2.0",
+ "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
+ "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
"dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
+ "loose-envify": "^1.1.0"
},
"engines": {
"node": ">=0.10.0"
@@ -13347,16 +13259,15 @@
}
},
"node_modules/react-dom": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
- "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
+ "version": "18.2.0",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
+ "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
"dependencies": {
"loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "scheduler": "^0.20.2"
+ "scheduler": "^0.23.0"
},
"peerDependencies": {
- "react": "17.0.2"
+ "react": "^18.2.0"
}
},
"node_modules/react-error-overlay": {
@@ -14005,12 +13916,11 @@
}
},
"node_modules/scheduler": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
- "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
+ "version": "0.23.0",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
+ "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
"dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
+ "loose-envify": "^1.1.0"
}
},
"node_modules/schema-utils": {
diff --git a/demo/react/package.json b/demo/react/package.json
index eb56824d4..1bd2a5da1 100644
--- a/demo/react/package.json
+++ b/demo/react/package.json
@@ -3,7 +3,7 @@
"version": "0.0.1",
"private": true,
"dependencies": {
- "@capacitor-community/stripe": "^5.0.4",
+ "@capacitor-community/stripe": "^5.5.0",
"@capacitor/android": "^5.0.0",
"@capacitor/app": "5.0.0",
"@capacitor/core": "5.0.0",
@@ -11,23 +11,24 @@
"@capacitor/ios": "^5.0.0",
"@capacitor/keyboard": "5.0.0",
"@capacitor/status-bar": "5.0.0",
- "@ionic/react": "^6.0.0",
- "@ionic/react-router": "^6.0.0",
+ "@ionic/react": "^7.0.0",
+ "@ionic/react-router": "^7.0.0",
"@testing-library/jest-dom": "^5.11.9",
- "@testing-library/react": "^11.2.5",
+ "@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^12.6.3",
"@types/jest": "^26.0.20",
"@types/node": "^12.19.15",
- "@types/react": "^16.14.3",
- "@types/react-dom": "^16.9.10",
+ "@types/react": "^18.0.17",
+ "@types/react-dom": "^18.0.6",
"@types/react-router": "^5.1.11",
"@types/react-router-dom": "^5.1.7",
- "ionicons": "^5.4.0",
- "react": "^17.0.1",
- "react-dom": "^17.0.1",
+ "history": "^4.9.0",
+ "ionicons": "^7.0.0",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
- "react-scripts": "5.0.0",
+ "react-scripts": "^5.0.0",
"stripe-pwa-elements": "^2.1.0",
"typescript": "^4.1.3",
"web-vitals": "^0.2.4",
@@ -70,7 +71,11 @@
]
},
"devDependencies": {
- "@capacitor/cli": "5.0.0"
+ "@capacitor/cli": "5.0.0",
+ "@typescript-eslint/eslint-plugin": "^5.59.2",
+ "@typescript-eslint/parser": "^5.59.2",
+ "eslint": "^8.35.0",
+ "eslint-plugin-react": "^7.32.2"
},
"description": "An Ionic project"
}
diff --git a/packages/payment/android/src/main/java/com/getcapacitor/community/stripe/StripePlugin.java b/packages/payment/android/src/main/java/com/getcapacitor/community/stripe/StripePlugin.java
index 05d0e62ba..470d8066e 100644
--- a/packages/payment/android/src/main/java/com/getcapacitor/community/stripe/StripePlugin.java
+++ b/packages/payment/android/src/main/java/com/getcapacitor/community/stripe/StripePlugin.java
@@ -78,7 +78,8 @@ public void load() {
? GooglePayLauncher.BillingAddressConfig.Format.Full
: GooglePayLauncher.BillingAddressConfig.Format.Min,
metaData.phoneNumberRequired
- )
+ ),
+ metaData.existingPaymentMethodRequired
),
(boolean isReady) -> this.googlePayExecutor.isAvailable = isReady,
(@NotNull GooglePayLauncher.Result result) ->
diff --git a/packages/payment/android/src/main/java/com/getcapacitor/community/stripe/helper/MetaData.java b/packages/payment/android/src/main/java/com/getcapacitor/community/stripe/helper/MetaData.java
index a9026ed2c..62f5a4ce4 100644
--- a/packages/payment/android/src/main/java/com/getcapacitor/community/stripe/helper/MetaData.java
+++ b/packages/payment/android/src/main/java/com/getcapacitor/community/stripe/helper/MetaData.java
@@ -21,6 +21,8 @@ public class MetaData {
public String billingAddressFormat;
public GooglePayEnvironment googlePayEnvironment;
+ public Boolean existingPaymentMethodRequired;
+
public boolean enableIdentifier;
public MetaData(Supplier contextSupplier) {
@@ -40,6 +42,9 @@ public MetaData(Supplier contextSupplier) {
phoneNumberRequired = appInfo.metaData.getBoolean("com.getcapacitor.community.stripe.phone_number_required");
billingAddressRequired = appInfo.metaData.getBoolean("com.getcapacitor.community.stripe.billing_address_required");
billingAddressFormat = appInfo.metaData.getString("com.getcapacitor.community.stripe.billing_address_format");
+ existingPaymentMethodRequired = appInfo.metaData.getBoolean("com.getcapacitor.community.stripe.google_pay_existing_payment_method_required");
+
+ // @deprecated. will remove at v6.0.0
enableIdentifier = appInfo.metaData.getBoolean("com.getcapacitor.community.stripe.enableIdentifier");
boolean isTest = appInfo.metaData.getBoolean("com.getcapacitor.community.stripe.google_pay_is_testing");