diff --git a/config.xml b/config.xml
index 651d57d..103296c 100644
--- a/config.xml
+++ b/config.xml
@@ -78,6 +78,7 @@
+
Your camera is used to scan receipts and pickup codes.
diff --git a/package-lock.json b/package-lock.json
index 44db88f..1d2fb7c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -633,6 +633,12 @@
"resolved": "https://registry.npmjs.org/cordova-plugin-headercolor/-/cordova-plugin-headercolor-1.0.0.tgz",
"integrity": "sha1-AgrNlDeH7gOdZ/Z56NnqbTiSAxY="
},
+ "cordova-plugin-inappbrowser": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/cordova-plugin-inappbrowser/-/cordova-plugin-inappbrowser-5.0.0.tgz",
+ "integrity": "sha512-MqnpmUQ/iy6hxtIGDdlIhy8aNi1pNanLATpbnkk7uCqW9YQ4rH/dGK9zESbZ50pUi2A2D2QMjBXNV175TJK5OQ==",
+ "dev": true
+ },
"cordova-plugin-nativestorage": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-nativestorage/-/cordova-plugin-nativestorage-2.3.2.tgz",
diff --git a/package.json b/package.json
index ce79ff7..42a19c0 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,8 @@
"cordova-plugin-velda-devicefeedback": {},
"cordova-plugin-geolocation": {
"GPS_REQUIRED": "true"
- }
+ },
+ "cordova-plugin-inappbrowser": {}
},
"platforms": [
"browser",
@@ -62,6 +63,7 @@
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-camera": "^5.0.1",
"cordova-plugin-geolocation": "^4.1.0",
+ "cordova-plugin-inappbrowser": "^5.0.0",
"cordova-plugin-nativestorage": "^2.3.2",
"cordova-plugin-splashscreen": "^6.0.0",
"cordova-plugin-velda-devicefeedback": "0.0.2",
diff --git a/www/assets/js/account.js b/www/assets/js/account.js
index 9221190..160923f 100644
--- a/www/assets/js/account.js
+++ b/www/assets/js/account.js
@@ -251,4 +251,12 @@ function initAccountPage() {
break;
}
});
+}
+
+function openCheckoutWindowToSaveCard() {
+ openBrowser(SETTINGS.apis.redirecttopaymentsetup
+ + "?phone=" + getStorage("phonenumber")
+ + "&accountkey=" + getStorage("accountkey"),
+ "location=no"
+ );
}
\ No newline at end of file
diff --git a/www/assets/js/platform.js b/www/assets/js/platform.js
index cf8d933..eef61a6 100644
--- a/www/assets/js/platform.js
+++ b/www/assets/js/platform.js
@@ -169,8 +169,15 @@ function initCordova() {
}
}, function (err) {});
}, false);
- openBrowser = function (url) {
- window.open(url, '_system', '');
+
+ window.htmlopen = window.open;
+ window.open = cordova.InAppBrowser.open;
+
+ openBrowser = function (url, options) {
+ if (typeof options == "undefined") {
+ options = "location=yes";
+ }
+ window.open(url, '_blank', options);
}
openExternalBrowser = function (url) {
diff --git a/www/pages/account.html b/www/pages/account.html
index 75b985a..99bffb6 100644
--- a/www/pages/account.html
+++ b/www/pages/account.html
@@ -33,7 +33,7 @@
Add a credit or debit card to use Drop and Send. It'll be securely saved for future use.
-
Add Card
+
Add Card
-
\ No newline at end of file
diff --git a/www/settings.js b/www/settings.js
index f4418f8..24227aa 100644
--- a/www/settings.js
+++ b/www/settings.js
@@ -15,9 +15,10 @@ var SETTINGS = {
authorstartverify: "https://helena.express/apis/account/authorstartverify/",
verifyauthcode: "https://helena.express/apis/account/verifyauthcode/",
accountregister: "https://helena.express/apis/account/register/",
- updatepaymentmethod: "https://helena.express/apis/account/updatepaymentmethod/",
+ redirecttopaymentsetup: "https://helena.express/apis/account/redirecttopaymentsetup/",
+ finishpaymentsetup: "https://helena.express/apis/account/finishpaymentsetup/",
},
- stripe_pubkey: "pk_live_RgpadCo1LIIkfyUsY47VhUq6",
+ stripe_pubkey: "pk_test_51J6qFXCa1Fboir5UzPO3LCiMsVNiFP2lq4wR0dEcjJJVzAaJ3uRggDekZPB3qeYpMD3ayIYHKyD5sSn0IFLlEXMW001LqrvGSH",
appointmenturl: "https://appointments.netsyms.com/index.php?hlnexp=1&embed=1&only=1&theme=darkly",
appointmenturl_darkmode: "https://appointments.netsyms.com/index.php?hlnexp=1&embed=1&only=1&theme=darkly",
branding: {