1.0.1 • Published 7 years ago

donate-to-aclu v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

donate-to-aclu Travis status

Takes an object to submit an automated ACLU donation form.

Security

  • no database at all
  • open source
  • as many validation checks as I can make before submitting to ACLU

Required Fields

FieldFormatExample
firstnamestringCasey
lastnamestringDoe
addressstring123 Rainbow Lane
zipcodestring12345
cc_numberstr/numno spaces, just numbers
cc_expxx/xxMonth/Year
cc_codexxxnumber or string
amountxx.xxACLU only takes donations of $5 or more. Code strips all but numbers, period, comma; parseFloat; round down to 2 cent digits

Optional Fields

FieldFormatDefault
fullnamestringCasey Doe (can be used in place of firstname and lastname)
emailstringcrhallberg+acluapi@gmail.com
citystring(determined by zipcode if absent)
statestring(determined by zipcode if absent)
country_codestr/num840 (US) - ISO_3166-1 country code
get_updatesbooleanfalse
share_infobooleanfalse

Example

const aclu = require('donate-to-aclu');

const fields = { /* ... */ };

if (aclu.validate(fields)) {
  aclu.submit(fields);
}

Powered By

1.0.1

7 years ago

1.0.0

7 years ago