Add core merchant functionality
parent
9fa968cd69
commit
6ff5fd50c7
@ -1,87 +0,0 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
var stripe = null;
|
||||
var elements = null;
|
||||
var card = null;
|
||||
|
||||
function initPaymentPage() {
|
||||
$("#tx-off-percent").text(+(SETTINGS["addfunds_percent"] * 100).toFixed(2));
|
||||
initStripe();
|
||||
}
|
||||
|
||||
function initStripe() {
|
||||
// Wait for Stripe to be loaded
|
||||
if (typeof Stripe == 'undefined') {
|
||||
setTimeout(initStripe, 500);
|
||||
return;
|
||||
}
|
||||
stripe = Stripe(SETTINGS["stripe_pubkey"]);
|
||||
elements = stripe.elements();
|
||||
|
||||
card = elements.create('card', {});
|
||||
|
||||
card.mount('#card-element');
|
||||
|
||||
card.addEventListener('change', function (event) {
|
||||
var displayError = document.getElementById('card-errors');
|
||||
if (event.error) {
|
||||
displayError.textContent = event.error.message;
|
||||
} else {
|
||||
displayError.textContent = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addFeesToAmount() {
|
||||
if ($("#funds-amount").val() == "") {
|
||||
return;
|
||||
}
|
||||
var amount = $("#funds-amount").val() * 1.0;
|
||||
|
||||
var stripefees = 0.30 + (amount * 0.029);
|
||||
var totalfees = amount * SETTINGS["addfunds_percent"];
|
||||
|
||||
amount = (amount + (stripefees > totalfees ? 0.30 : 0)) /
|
||||
(1 - (stripefees > totalfees ? 0.029 : SETTINGS["addfunds_percent"]));
|
||||
|
||||
$("#funds-amount").val(amount.toFixed(2));
|
||||
}
|
||||
|
||||
|
||||
function chargeCard() {
|
||||
if ($("#funds-amount").val() == "") {
|
||||
return;
|
||||
}
|
||||
if (stripe == null) {
|
||||
return;
|
||||
}
|
||||
app.preloader.show();
|
||||
stripe.createToken(card).then(function (result) {
|
||||
if (result.error) {
|
||||
// Inform the customer that there was an error.
|
||||
app.preloader.hide();
|
||||
var errorElement = document.getElementById('card-errors');
|
||||
errorElement.textContent = result.error.message;
|
||||
} else {
|
||||
callAPI("addfunds", {
|
||||
key: localStorage.getItem("key"),
|
||||
amount: $("#funds-amount").val(),
|
||||
token: result.token.id
|
||||
}, function (response) {
|
||||
app.preloader.hide();
|
||||
router.navigate("/fundsadded/" + response.charged_amount.toFixed(2) + "/" + response.final_amount.toFixed(2));
|
||||
}, function (error) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert(error, "Error");
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(".preset-amount-button").click(function () {
|
||||
$($(this).data("target")).val($(this).data("amount"));
|
||||
});
|
@ -1,69 +0,0 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var leafletnearbylayer = L.geoJson(
|
||||
{
|
||||
name: "Nearby People",
|
||||
type: "FeatureCollection",
|
||||
features: [
|
||||
{
|
||||
type: "Feature",
|
||||
geometry: {
|
||||
type: "Point",
|
||||
coordinates: [0, 0]
|
||||
},
|
||||
properties: {
|
||||
id: "",
|
||||
name: "",
|
||||
username: "",
|
||||
verified: false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
onEachFeature: function (feature, layer) {
|
||||
if (feature.properties && feature.properties.popupContent) {
|
||||
layer.bindPopup(feature.properties.popupContent);
|
||||
}
|
||||
},
|
||||
pointToLayer: function (feature, latlng) {
|
||||
var marker = L.marker(latlng, {
|
||||
icon: L.icon({
|
||||
iconUrl: "img/mapmarker.svg",
|
||||
iconSize: [25, 41],
|
||||
iconAnchor: [12.5, 40],
|
||||
popupAnchor: [0, -28]
|
||||
})
|
||||
});
|
||||
return marker;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function updateMap() {
|
||||
var diagonalMeters = leafletmap.getBounds().getNorthWest().distanceTo(leafletmap.getBounds().getSouthEast());
|
||||
var radius = (diagonalMeters / 2.0) / 1609.344;
|
||||
callAPIRawResponse("getnearby", {
|
||||
key: localStorage.getItem("key"),
|
||||
latitude: leafletmap.getCenter().lat,
|
||||
longitude: leafletmap.getCenter().lng,
|
||||
radius: radius,
|
||||
format: "geojson"
|
||||
}, function (data) {
|
||||
if (data.type == "FeatureCollection") {
|
||||
leafletnearbylayer.clearLayers();
|
||||
data.features.forEach(function (item) {
|
||||
item.properties.popupContent = "<i class=\"fas fa-user\"></i> " + (item.properties.name.length > 50 ? item.properties.name.substring(0, 50) + "..." : item.properties.name) + "<br><br><a class=\"button button-small button-fill text-color-white card-prevent-open\" href=\"/sendmoney/" + item.properties.id + "\">Send Money</a>";
|
||||
leafletnearbylayer.addData(item);
|
||||
});
|
||||
leafletmap.addLayer(leafletnearbylayer);
|
||||
$(".leaflet-marker-icon").addClass("card-prevent-open");
|
||||
}
|
||||
});
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
$('#username').on("keyup", function () {
|
||||
$('#username').val($('#username').val().toLowerCase());
|
||||
});
|
||||
|
||||
function checkAndSave(username, password) {
|
||||
app.preloader.show();
|
||||
|
||||
callAPI("getkey", {
|
||||
username: username,
|
||||
password: password
|
||||
}, function (data) {
|
||||
app.preloader.hide();
|
||||
callAPI("getprofile", {
|
||||
key: data.key
|
||||
}, function (profile) {
|
||||
if (profile.profile.type != 3) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert("You downloaded the merchant app but you aren't a merchant. Go to helpinghelena.org to get the correct app.", "Error");
|
||||
return;
|
||||
}
|
||||
localStorage.setItem("key", data.key);
|
||||
localStorage.setItem("username", username);
|
||||
localStorage.setItem("password", password);
|
||||
localStorage.setItem("configured", true);
|
||||
// Restart the app to re-read the config
|
||||
restartApplication();
|
||||
}, function (msg) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert(msg, "Error");
|
||||
});
|
||||
}, function (msg) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert(msg, "Error");
|
||||
});
|
||||
}
|
||||
|
||||
function doLogin() {
|
||||
var type = 3;
|
||||
var username = $("#username").val();
|
||||
var password = $("#password").val();
|
||||
|
||||
checkAndSave(username, password, type);
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
var userPositionIsReal = false;
|
||||
var userposition = {
|
||||
coords: {
|
||||
latitude: 46.595,
|
||||
longitude: -112.019,
|
||||
accuracy: 10000
|
||||
}
|
||||
};
|
||||
|
||||
var leafletmap = L.map('map', {
|
||||
minZoom: 12,
|
||||
maxZoom: 20
|
||||
});
|
||||
|
||||
leafletmap.attributionControl.setPrefix("");
|
||||
var leafletgllayer = L.mapboxGL({
|
||||
attribution: "© OpenMapTiles © OpenStreetMap contributors",
|
||||
accessToken: 'none',
|
||||
style: SETTINGS["map_style_json"],
|
||||
pitch: 0
|
||||
});
|
||||
|
||||
leafletgllayer.addTo(leafletmap);
|
||||
|
||||
|
||||
function recenterMapPosition() {
|
||||
var zoom = 13;
|
||||
if (userposition.coords.accuracy < 1000) {
|
||||
zoom = 15;
|
||||
}
|
||||
leafletmap.setView([userposition.coords.latitude, userposition.coords.longitude], zoom);
|
||||
}
|
||||
|
||||
function recenterMapToUserPosition() {
|
||||
if (userPositionIsReal == false) {
|
||||
getLocation(function (position) {
|
||||
userposition = position;
|
||||
userPositionIsReal = true;
|
||||
recenterMapPosition();
|
||||
});
|
||||
} else {
|
||||
recenterMapPosition();
|
||||
}
|
||||
}
|
||||
|
||||
// Attempt to get user location
|
||||
watchLocation(function (position) {
|
||||
userposition = position;
|
||||
if (userPositionIsReal == false) {
|
||||
recenterMapPosition();
|
||||
userPositionIsReal = true;
|
||||
}
|
||||
});
|
||||
|
||||
// Set map to default position
|
||||
recenterMapPosition();
|
||||
// Load nearby
|
||||
updateMap();
|
||||
// Watch for map moving
|
||||
leafletmap.on("moveend", function () {
|
||||
updateMap();
|
||||
});
|
@ -1,76 +0,0 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var leafletnearbylayer = L.geoJson(
|
||||
{
|
||||
name: "Nearby Merchants",
|
||||
type: "FeatureCollection",
|
||||
features: [
|
||||
{
|
||||
type: "Feature",
|
||||
geometry: {
|
||||
type: "Point",
|
||||
coordinates: [0, 0]
|
||||
},
|
||||
properties: {
|
||||
id: "",
|
||||
name: "",
|
||||
address: "",
|
||||
types: {}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
onEachFeature: function (feature, layer) {
|
||||
if (feature.properties && feature.properties.popupContent) {
|
||||
layer.bindPopup(feature.properties.popupContent);
|
||||
}
|
||||
},
|
||||
pointToLayer: function (feature, latlng) {
|
||||
var icon = "fas fa-store";
|
||||
if (feature.properties.types.length > 0) {
|
||||
icon = feature.properties.types[0].icon;
|
||||
}
|
||||
var marker = L.marker(latlng, {
|
||||
icon: (new L.divIcon({
|
||||
html: '<i class="' + icon + ' fa-fw"></i>',
|
||||
iconSize: [20, 20],
|
||||
className: 'fa-map-icon'
|
||||
}))
|
||||
});
|
||||
return marker;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function updateMap() {
|
||||
var diagonalMeters = leafletmap.getBounds().getNorthWest().distanceTo(leafletmap.getBounds().getSouthEast());
|
||||
var radius = (diagonalMeters / 2.0) / 1609.344;
|
||||
callAPIRawResponse("getmerchants", {
|
||||
key: localStorage.getItem("key"),
|
||||
latitude: leafletmap.getCenter().lat,
|
||||
longitude: leafletmap.getCenter().lng,
|
||||
radius: radius,
|
||||
format: "geojson"
|
||||
}, function (data) {
|
||||
if (data.type == "FeatureCollection") {
|
||||
leafletnearbylayer.clearLayers();
|
||||
data.features.forEach(function (item) {
|
||||
var icons = "";
|
||||
item.properties.types.forEach(function (type) {
|
||||
icons += "<i class=\"" + type.icon + "\"></i> " + type.name + "<br>";
|
||||
});
|
||||
item.properties.popupContent = (item.properties.name.length > 50 ? item.properties.name.substring(0, 50) + "..." : item.properties.name) + "<br><br>" + icons;
|
||||
leafletnearbylayer.addData(item);
|
||||
});
|
||||
leafletmap.addLayer(leafletnearbylayer);
|
||||
$(".leaflet-marker-icon").addClass("card-prevent-open");
|
||||
}
|
||||
});
|
||||
}
|
@ -1,117 +0,0 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
|
||||
$("#typecodebtn").on("click", function () {
|
||||
app.dialog.prompt('Enter the recipient\'s code', 'Send Money', function (code) {
|
||||
if (code != "") {
|
||||
app.preloader.show();
|
||||
callAPI("getprofile", {
|
||||
key: localStorage.getItem("key"),
|
||||
id: code
|
||||
}, function (data) {
|
||||
$("#publicid").val(code);
|
||||
loadSendMoneyPage();
|
||||
}, function (msg) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert(msg, "Error");
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#scanqrcodebtn").on("click", function () {
|
||||
cordova.plugins.barcodeScanner.scan(
|
||||
function (result) {
|
||||
if (!result.cancelled) {
|
||||
console.log("Barcode: ", result);
|
||||
if (result.format == "QR_CODE" && result.text.startsWith(SETTINGS['webapp_url'])) {
|
||||
var url = new URL(result.text);
|
||||
if (typeof url.searchParams.get("sendto") == "string") {
|
||||
$("#publicid").val(url.searchParams.get("sendto"));
|
||||
loadSendMoneyPage();
|
||||
} else {
|
||||
app.dialog.alert("Not a valid payment code.", "Scan Error");
|
||||
}
|
||||
} else {
|
||||
app.dialog.alert("Not a valid payment code.", "Scan Error");
|
||||
}
|
||||
}
|
||||
},
|
||||
function (error) {
|
||||
app.dialog.alert(error, "Scan Error");
|
||||
},
|
||||
{
|
||||
showTorchButton: true,
|
||||
prompt: "Scan a code to send money",
|
||||
resultDisplayDuration: 0,
|
||||
disableSuccessBeep: true
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
function sendMoney(id, amount, name) {
|
||||
if (id == "0") {
|
||||
return;
|
||||
}
|
||||
if (amount <= 0) {
|
||||
app.dialog.alert("Please specify an amount.", "Error");
|
||||
} else if (amount > 999.99) {
|
||||
app.dialog.alert("Please specify an amount less than $999.99.", "Error");
|
||||
}
|
||||
app.preloader.show();
|
||||
callAPI("sendmoney", {
|
||||
key: localStorage.getItem("key"),
|
||||
to: id,
|
||||
amount: amount
|
||||
}, function (data) {
|
||||
app.preloader.hide();
|
||||
router.navigate("/moneysent/" + (amount * 1.0).toFixed(2) + "/" + name);
|
||||
}, function (msg) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert(msg, "Error");
|
||||
});
|
||||
}
|
||||
|
||||
function loadSendMoneyPage() {
|
||||
app.preloader.show();
|
||||
if ($("#publicid").val() == "0") {
|
||||
app.preloader.hide();
|
||||
$("#step1").removeClass("display-none");
|
||||
$("#step2").addClass("display-none");
|
||||
} else {
|
||||
$("#step1").addClass("display-none");
|
||||
$("#step2").removeClass("display-none");
|
||||
callAPI("getprofile", {
|
||||
key: localStorage.getItem("key"),
|
||||
id: $("#publicid").val()
|
||||
}, function (data) {
|
||||
app.preloader.hide();
|
||||
console.log("Profile", data.profile);
|
||||
$("#person-name").text(data.profile.name);
|
||||
if (data.profile.bio != "") {
|
||||
$("#person-bio").text(data.profile.bio);
|
||||
$("#person-bio").removeClass("display-none");
|
||||
}
|
||||
if (data.profile.verified) {
|
||||
$("#verified-badge").removeClass("display-none");
|
||||
} else {
|
||||
$("#unverified-badge").removeClass("display-none");
|
||||
}
|
||||
}, function (msg) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert(msg, "Error");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(".preset-amount-button").click(function () {
|
||||
$($(this).data("target")).val($(this).data("amount"));
|
||||
});
|
||||
|
||||
$("#sendbtn").click(function () {
|
||||
sendMoney($("#publicid").val(), $("#amount-box").val(), $("#person-name").text());
|
||||
});
|
@ -1,107 +0,0 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
$('#username').on("keyup", function () {
|
||||
$('#username').val($('#username').val().toLowerCase());
|
||||
});
|
||||
|
||||
function checkAndSave(username, password) {
|
||||
app.preloader.show();
|
||||
|
||||
callAPI("getkey", {
|
||||
username: username,
|
||||
password: password
|
||||
}, function (data) {
|
||||
app.preloader.hide();
|
||||
localStorage.setItem("key", data.key);
|
||||
localStorage.setItem("username", username);
|
||||
localStorage.setItem("password", password);
|
||||
callAPI("getprofile", {
|
||||
key: data.key
|
||||
}, function (profile) {
|
||||
if (profile.profile.type == 1) {
|
||||
localStorage.setItem("accttype", "giver");
|
||||
} else if (profile.profile.type == 2) {
|
||||
localStorage.setItem("accttype", "receiver");
|
||||
} else if (profile.profile.type == 3) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert("You need to download the merchant app instead. Visit ntsm.co/contact if you need help.", "Error");
|
||||
return;
|
||||
} else {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert("Server replied with unknown account type. You might need to update this app.", "Error");
|
||||
return;
|
||||
}
|
||||
localStorage.setItem("configured", true);
|
||||
// Restart the app to re-read the config
|
||||
restartApplication();
|
||||
}, function (msg) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert(msg, "Error");
|
||||
});
|
||||
}, function (msg) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert(msg, "Error");
|
||||
});
|
||||
}
|
||||
|
||||
function setupAccount() {
|
||||
var type = $("#accttype").val();
|
||||
var username = $("#username").val();
|
||||
var password = $("#password").val();
|
||||
|
||||
checkAndSave(username, password, type);
|
||||
}
|
||||
|
||||
function createAccount() {
|
||||
var type = $("#accttype").val();
|
||||
var username = $("#username").val();
|
||||
var password = $("#password").val();
|
||||
|
||||
if (username.length < 1) {
|
||||
app.dialog.alert("Enter a username.", "Error");
|
||||
return;
|
||||
}
|
||||
if (password.length < SETTINGS["min_password_length"]) {
|
||||
app.dialog.alert("Password must be at least " + SETTINGS["min_password_length"] + " characters long.", "Error");
|
||||
return;
|
||||
}
|
||||
|
||||
app.dialog.create({
|
||||
text: "I agree to the terms of service and privacy policy.",
|
||||
buttons: [
|
||||
{
|
||||
text: "No",
|
||||
onClick: function () {
|
||||
restartApplication();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "Yes",
|
||||
onClick: function () {
|
||||
app.preloader.show();
|
||||
callAPI("signup", {
|
||||
username: username,
|
||||
password: password,
|
||||
accttype: type
|
||||
}, function (data) {
|
||||
app.preloader.hide();
|
||||
checkAndSave(username, password, type);
|
||||
}, function (msg) {
|
||||
app.preloader.hide();
|
||||
app.dialog.alert(msg, "Error");
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "Show",
|
||||
onClick: function () {
|
||||
openBrowser(SETTINGS["terms_of_service_url"]);
|
||||
}
|
||||
},
|
||||
]
|
||||
}).open();
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<div class="page" data-name="addfunds">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Add Funds</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
<div class="block">
|
||||
<div class="row justify-content-center">
|
||||
|
||||
<div class="col-100 tablet-50 desktop-25">
|
||||
<div class="card">
|
||||
<div class="card-content card-content-padding">
|
||||
<div class="money-input-box">
|
||||
<div class="currency">$</div>
|
||||
<input type="tel" min="1.00" max="999.99" placeholder="0.00" id="funds-amount" class="money-input" />
|
||||
</div>
|
||||
|
||||
<p class="segmented segmented-raised segmented-round">
|
||||
<button class="button button-round preset-amount-button" data-target="#funds-amount" data-amount="10.00">$10</button>
|
||||
<button class="button button-round preset-amount-button" data-target="#funds-amount" data-amount="20.00">$20</button>
|
||||
<button class="button button-round preset-amount-button" data-target="#funds-amount" data-amount="50.00">$50</button>
|
||||
</p>
|
||||
|
||||
<div class="margin-vertical padding-top">
|
||||
<div id="card-element">
|
||||
<i class="fas fa-spin fa-spinner"></i> Loading secure card form...
|
||||
</div>
|
||||
<div id="card-errors" role="alert"></div>
|
||||
</div>
|
||||
|
||||
<p class="text-color-green">
|
||||
<i class="fas fa-lock"></i> We don't see your card number; it's sent directly and securely to our payment processor.
|
||||
<p>
|
||||
<i class="fas fa-info-circle"></i> Your account balance won't gain the entire amount you choose.
|
||||
<span id="tx-off-percent">7</span>% (or the card fees, whichever is greater) is subtracted to
|
||||
cover fees and maintenance costs. <a href="" class="link" onclick="addFeesToAmount()">Tap here</a> to add
|
||||
the fees to your total.
|
||||
</div>
|
||||
<div class="card-footer display-block padding-vertical">
|
||||
<div class="button button-large button-fill button-round button-raised" onclick="chargeCard()">
|
||||
<i class="fas fa-credit-card"></i> Charge Card
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<script src="js/addfunds.js"></script>
|
||||
|
||||
</div>
|
@ -1,40 +0,0 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<div class="page" data-name="fundsadded">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Funds Added</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="block">
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-100 tablet-50 desktop-25">
|
||||
<div class="card bg-color-green">
|
||||
<div class="card-content card-content-padding text-align-center text-color-white color-theme-white">
|
||||
<img style="max-height: 150px;" src="img/bigcheck.svg" alt="Checkmark"/>
|
||||
|
||||
<h3>You paid ${{this.$route.params.amount}} total and added ${{this.$route.params.final_amount}} to your balance.</h3>
|
||||
|
||||
<a class="button button-outline" href="/home">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,40 +0,0 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<div class="page" data-name="moneysent">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Money Sent</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="block">
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-100 tablet-50 desktop-25">
|
||||
<div class="card bg-color-green">
|
||||
<div class="card-content card-content-padding text-align-center text-color-white color-theme-white">
|
||||
<img style="max-height: 150px;" src="img/bigcheck.svg" alt="Checkmark"/>
|
||||
|
||||
<h3>You sent ${{this.$route.params.amount}} to {{this.$route.params.name}}</h3>
|
||||
|
||||
<a class="button button-outline" href="/home">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,122 +0,0 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<div class="page" data-name="sendmoney">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="/home" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Send Money</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<input type="hidden" id="publicid" value="{{this.$route.params.publicID}}" />
|
||||
|
||||
<div class="block">
|
||||
<div id="step1" class="display-none">
|
||||
<div class="row justify-content-center">
|
||||
{{#if @global.qrenabled}}
|
||||
<div class="col-100 tablet-50 desktop-25 margin-bottom margin-horizontal">
|
||||
<div class="button button-large button-fill button-round" id="scanqrcodebtn">
|
||||
<i class="fas fa-qrcode"></i> Scan Code
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="col-100 tablet-50 desktop-25 margin-horizontal">
|
||||
<div class="button button-large button-outline button-round" id="typecodebtn">
|
||||
<i class="fas fa-keyboard"></i> Enter Code
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="step2" class="display-none">
|
||||
<div class="row justify-content-center">
|
||||
|
||||
<div class="col-100 tablet-50 desktop-25">
|
||||
<div class="card">
|
||||
<div class="card-content card-content-padding">
|
||||
<div class="money-input-box">
|
||||
<div class="currency">$</div>
|
||||
<input type="tel" min="0.00" max="999.99" placeholder="0.00" id="amount-box" class="money-input" />
|
||||
</div>
|
||||
|
||||
<p class="segmented segmented-raised segmented-round">
|
||||
<button class="button button-round preset-amount-button" data-target="#amount-box" data-amount="1.00">$1</button>
|
||||
<button class="button button-round preset-amount-button" data-target="#amount-box" data-amount="5.00">$5</button>
|
||||
<button class="button button-round preset-amount-button" data-target="#amount-box" data-amount="10.00">$10</button>
|
||||
<button class="button button-round preset-amount-button" data-target="#amount-box" data-amount="20.00">$20</button>
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-footer display-block padding-vertical">
|
||||
<div class="button button-large button-fill button-round button-raised" id="sendbtn">
|
||||
<i class="fas fa-arrow-up"></i> Send
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-100 tablet-50 desktop-25">
|
||||
<div class="card">
|
||||
<div class="card-content card-content-padding">
|
||||
<h3 class="no-margin-top"><i class="fas fa-user"></i> <span id="person-name"></span></h3>
|
||||
<div>
|
||||
<a id="verified-badge-container" class="link popup-open" href="#" data-popup="#verification-popup">
|
||||
<span id="verified-badge" class="display-none">
|
||||
<i class="fas fa-check-circle text-color-green"></i> Verified
|
||||
</span>
|
||||
<span id="unverified-badge" class="display-none">
|
||||
<i class="fas fa-question-circle text-color-blue"></i> Unverified
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div id="person-bio" class="display-none padding-top-half margin-top-half">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="popup" id="verification-popup">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="title">Verified Receivers</div>
|
||||
|
||||
<div class="right">
|
||||
<a href="#" class="link icon-only popup-close">
|
||||
<i class="material-icons">close</i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<p>
|
||||
A verified receiver is a person who is confirmed in need of
|
||||
assistance.
|
||||
<p>
|
||||
They have been vetted by a case worker or other person who works
|
||||
for a local organization that helps people in need.
|
||||
<p>
|
||||
Your money will be used for essentials only, regardless of the
|
||||
receiver's verification status.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/sendmoney.js"></script>
|
||||
|
||||
</div>
|
@ -1,61 +0,0 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<div class="page" data-name="setup0">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="left">
|
||||
<a href="#" class="link icon-only back">
|
||||
<i class="icon icon-back"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="title">Welcome</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-100 desktop-66">
|
||||
<div class="card">
|
||||
<div class="card-content card-content-padding text-align-center">
|
||||
<h3>Choose an account type.</h3>
|
||||
<p>If you don't have an account, you can create one in the next step.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<a class="col-100 tablet-50 desktop-33" href="/setup/1/giver">
|
||||
<div class="card">
|
||||
<div class="card-content card-content-padding text-align-center bg-color-green text-color-white">
|
||||
<span class="fa-stack fa-5x">
|
||||
<i class="fas fa-money-bill-wave-alt fa-stack-2x"></i>
|
||||
<i class="fas fa-circle fa-stack-1x"></i>
|
||||
<i class="fas fa-arrow-alt-circle-up fa-inverse fa-stack-1x text-color-green"></i>
|
||||
</span>
|
||||
<h3>Giver</h3>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a class="col-100 tablet-50 desktop-33" href="/setup/1/receiver">
|
||||
<div class="card">
|
||||
<div class="card-content card-content-padding text-align-center bg-color-blue text-color-white">
|
||||
<span class="fa-stack fa-5x">
|
||||
<i class="fas fa-money-bill-wave-alt fa-stack-2x"></i>
|
||||
<i class="fas fa-circle fa-stack-1x"></i>
|
||||
<i class="fas fa-arrow-alt-circle-down fa-inverse fa-stack-1x text-color-blue"></i>
|
||||
</span>
|
||||
<h3>Receiver</h3>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
Loading…
Reference in New Issue