Skip to content

Commit

Permalink
no pembroke no pickup
Browse files Browse the repository at this point in the history
  • Loading branch information
TomConner committed Nov 22, 2023
1 parent d1db7e7 commit 0e27f79
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions generator/content/register/stripe-payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,11 @@ document.addEventListener('DOMContentLoaded', async () => {

// on address input, save address in localStorage
addressElement.on('change', (event) => {
console.debug(event);//TODO REMOVE
if (event.error) {
validateAddress(event);
} else if (event.complete) {
// Extract potentially complete address
const address = event.value;
console.debug("address complete");
console.debug(address);
setLocalItem("address", JSON.stringify(address));
validateAddress(null);
}
Expand All @@ -142,8 +139,10 @@ document.addEventListener('DOMContentLoaded', async () => {
} else if (!(address.address.city.toLowerCase() === "Pembroke".toLowerCase())) {
showAddressMessage("Sorry, we can only pick up trees from Pembroke.");
return false;
} else {
clearAddressMessage();
return true;
}
return true;
}

// on register button, post address and then hand off to payment choices
Expand Down

0 comments on commit 0e27f79

Please sign in to comment.