We can only accept Contributions from AA groups or members.
const getElements = function() { const container = document.getElementById('paypal-form-fields-container-ZG3TQQ69FYLJS'); const [amountEl, memoEl, invoiceEl] = ['#amount', '#memo', '#invoice'].map(function(item) { return container.querySelector(item) }); const [amountErrEl, decimalErrEl, decimalPlacesErrEl, memoErrEl, genericErrEl, browserErrEl, checkoutButtonEl] = ['#amount-err', '#amount-decimal-err', '#amount-decimalplaces-err', '#memo-err', '#generic-error', '#browser-error', '#checkout-button'] .map(function(item) { return container.querySelector(item) }); return { amount: { el: amountEl, errEl: amountErrEl, decimalErrEl: decimalErrEl, decimalPlacesErrEl: decimalPlacesErrEl }, memo: { el: memoEl, errEl: memoErrEl }, invoice: { el: invoiceEl, errEl: null }, genericErr: { el: genericErrEl }, browserErr: { el: browserErrEl }, checkoutButton: { el: checkoutButtonEl } } }
const isBrowserSupported = function() { if (!true) { return true; } return !!(window.crypto && window.crypto.subtle && window.crypto.subtle.generateKey); }
const getIsValid = function() { if (!isBrowserSupported()) return false; const { amount, memo } = getElements(); if (!amount.el.value.length) return false; if (getDecimalCount(amount.el.value) > 2) return false; if (memo.el && !memo.el.value.length) return false; return true; }
const renderErrors = function() { const { amount, memo } = getElements(); const decimalSupported = 2 > 0; if (!amount.el.value.length) { amount.el.focus(); amount.errEl.classList.add('visible'); amount.decimalErrEl.classList.remove('visible'); amount.decimalPlacesErrEl.classList.remove('visible'); } else if (decimalSupported && getDecimalCount(amount.el.value) > 2) { amount.el.focus(); amount.decimalErrEl.classList.add('visible'); amount.errEl.classList.remove('visible'); amount.decimalPlacesErrEl.classList.remove('visible'); } else if (!decimalSupported && getDecimalCount(amount.el.value) > 0) { amount.el.focus(); amount.decimalPlacesErrEl.classList.add('visible'); amount.errEl.classList.remove('visible'); amount.decimalErrEl.classList.remove('visible'); } else { amount.errEl.classList.remove('visible'); amount.decimalErrEl.classList.remove('visible'); amount.decimalPlacesErrEl.classList.remove('visible'); } if (memo.el && !memo.el.value.length) { memo.el.focus(); memo.errEl.classList.add('visible') } else if (memo.errEl) { memo.errEl.classList.remove('visible') } }
const toggleActions = function(actions) { if (getIsValid()) { actions.enable(); } else { actions.disable(); } }
const onInit = function(data, actions) { const { amount, memo, invoice, browserErr } = getElements(); if (!isBrowserSupported()) { browserErr.el.classList.add('visible');
fetch('https://www.paypal.com/ncp/api/log', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ events: [ { level: 'info', event: 'ncps::merchant_hosted::unsupported_browser', payload: { user_agent: window.navigator.userAgent, } } ], tracking: [ {"product":"quantum_leap","component":"nocodenodeweb","pgrp":"main:business:web:hostedcheckout","page":"main:business:web:hostedcheckout:merchant_website","event_name":"unsupported_browser","e":"im","event_type":"im"} ] }) });
} toggleActions(actions); const elements = [amount,memo]; elements.forEach(function (item) { item.el.addEventListener('keyup', function (event) { toggleActions(actions); }); }); }
const getUserInputs = function() { const { amount, memo, invoice, genericErr } = getElements(); genericErr.el.classList.remove('visible'); let inputs = { amount: amount.el.value, memo: memo.el.value,
}; inputs = Object.fromEntries(Object.entries(inputs).filter(([k, v]) => v !== '')); return inputs; }
const onClick = function() { renderErrors(); }
const onError = function() { const { genericErr } = getElements(); genericErr.el.classList.add('visible'); }
const { checkoutButton } = getElements(); if (checkoutButton.el) { checkoutButton.el.addEventListener('click', function (event) { onClick(); if(!getIsValid()) { event.preventDefault(); } }); }
window.__pp_form_fields_ZG3TQQ69FYLJS = { onInit: onInit, onClick: onClick, getUserInputs: getUserInputs, onError: onError, }
})()
Click Here for a Printable Contribution Form
Please make checks or money orders payable to:
Hawaii Area Committee
PO Box 1413
Honolulu, HI 96806
In order to apply the contribution to your group, please include:
Group Name and District Number.
Receipts will be emailed upon request. Please include a receipt request and email address for an electronic acknowledgment letter.
Thank you on behalf of Hawaii Area 17 for your support.