Add credit card adding
This commit is contained in:
parent
d154221464
commit
ce59068ebd
@ -78,6 +78,7 @@
|
||||
<allow-intent href="itms-apps:*" />
|
||||
<preference name="scheme" value="app" />
|
||||
<preference name="hostname" value="localhost" />
|
||||
<preference name="PreferredContentMode" value="mobile" />
|
||||
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
|
||||
<string>Your camera is used to scan receipts and pickup codes.</string>
|
||||
</edit-config>
|
||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -251,4 +251,12 @@ function initAccountPage() {
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function openCheckoutWindowToSaveCard() {
|
||||
openBrowser(SETTINGS.apis.redirecttopaymentsetup
|
||||
+ "?phone=" + getStorage("phonenumber")
|
||||
+ "&accountkey=" + getStorage("accountkey"),
|
||||
"location=no"
|
||||
);
|
||||
}
|
@ -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) {
|
||||
|
@ -33,7 +33,7 @@
|
||||
<div id="hasaccountbox" style="display: none;">
|
||||
<div id="addPaymentMethodBox" style="display: none;">
|
||||
Add a credit or debit card to use Drop and Send. It'll be securely saved for future use.
|
||||
<a class="button hapticbtn button-fill margin" href="/account/managepayment" onclick="alert('TODO')"><i class="fas fa-credit-card"></i> Add Card</a>
|
||||
<div class="button hapticbtn button-fill margin" onclick="openCheckoutWindowToSaveCard()"><i class="fas fa-credit-card"></i> Add Card</div>
|
||||
<hr />
|
||||
</div>
|
||||
<div id="loyaltyBalanceBox" class="card-content-padding">
|
||||
@ -174,5 +174,4 @@
|
||||
<p><a class="button popup-close" href="#">Cancel</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -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: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user