donatemates / donatemates

donatemates.com - easy, automated donation matching.
MIT License
10 stars 0 forks source link

Smarter Receipt Validation #47

Open j6k4m8 opened 7 years ago

j6k4m8 commented 7 years ago

Use the format of the receipt ID to validate which charityparser to use. For instance, ACLU receipt IDs are series of integers. PP uses ints and uppercase chars.

slavingia commented 7 years ago

seems like the email address that receives the emails should determine this no? and the charity parser would fail if it doesn't match.

ie. if you create a charity for aclu, it'll fail if someone sends the corresponding email a pp receipt.

dkleissa commented 7 years ago

yeah, i feel like the receipt ID isn't a good way to pick the parser. Should be the other way around? doesn't seem like the receipt Id will be vary unique in many cases vs. lots of rich context in the email text and subject text.

j6k4m8 commented 7 years ago

Mostly intended this as a double-check: If the receipt doesn't line up with an expected format, then we shouldn't try running through parsers (which is a computationally more complex task). So probably this lives in the is_receipt fn.

Not high priority, but it's some validation that we should probably do before we (eventually) hit an external resource with receipts to confirm

On Thu, Feb 16, 2017 at 3:55 PM Dean Kleissas notifications@github.com wrote:

yeah, i feel like the receipt ID isn't a good way to pick the parser. Should be the other way around? doesn't seem like the receipt Id will be vary unique in many cases vs. lots of rich context in the email text and subject text.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/donatemates/donatemates/issues/47#issuecomment-280457294, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqVB_w18gpxYYvXWUeaO2K_pyj-GKfbks5rdLewgaJpZM4MDXvy .

dkleissa commented 7 years ago

I think maybe this functionality fits in the class of "fraud" detectors which we should start to build out and run independently of detecting the charity and parsing the email.

j6k4m8 commented 7 years ago

I like it — definitely a good home for this logic

On Sat, Feb 18, 2017 at 4:11 PM Dean Kleissas notifications@github.com wrote:

I think maybe this functionality fits in the class of "fraud" detectors which we should start to build out and run independently of detecting the charity and parsing the email.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/donatemates/donatemates/issues/47#issuecomment-280875319, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqVB3v0g34uyhq42jPKPAFsenY_8BVTks5rd15ngaJpZM4MDXvy .

slavingia commented 7 years ago

one validation that would be cool would be date validation:

the donation date must be AFTER the campaign creation date

dkleissa commented 7 years ago

other things to check are if the receipt id and date match in the HTML and plain-text versions of the email. Someone changing this in their email client typically would only edit one.

Think we should add a fraud detection method into the charity class that runs a list of methods that are unique to that charity. Also have a list of methods that run for all charities that could be in the parent class.

craigjon commented 7 years ago

Gentlemen - my apologies for intruding. I read about Donatemates through Flipboard. This seemed like the appropriate place to pass along the following. The OrgHunter/Make My Donation platform deals with all of the above issues through APIs including: selection of vetted 501(c)(3), recall of EIN for donation transactions, donation processing, funds disbursement to charities, receipting to donors, onboarding of first time donation recipients so the right people get the money, reporting to donors and charities, and compliance with all state and federal regulations (no small issue). YES, it cost $$$ to integrate the platform into your app, BUT it is a one time fee, and thereafter if you choose you can receive a small percentage allowance per donation to offset your operating costs. You can write me at canderson@makemydonation.org, if for no other reason than to say thanks but no thanks.

slavingia commented 7 years ago

We don't handle payments processing, we just work with receipts from the charities themselves. I don't think we'll go in that direction.

craigjon commented 7 years ago

Sahil,

Thanks for the quick response.

If you decide to go down that path, let me know.

Also, if you want to tinker with our APIs, feel free to register and play in the sandbox.

Craig

On Mar 16, 2017 2:39 PM, "Sahil Lavingia" notifications@github.com wrote:

We don't handle payments processing, we just work with receipts from the charities themselves. I don't think we'll go in that direction.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/donatemates/donatemates/issues/47#issuecomment-287153007, or mute the thread https://github.com/notifications/unsubscribe-auth/AZPOhcvaxknhhuWUjr6DRRyYlgfFqjwsks5rmYHqgaJpZM4MDXvy .