mitodl / mitxonline

BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

Ecommerce: Can complete purchase successfully with user who should be banned by export compliance #478

Open briangrossman opened 2 years ago

briangrossman commented 2 years ago

Steps to Reproduce

Expected Behavior

Actual Behavior

pdpinch commented 2 years ago

I believe there is a parameter we can set in the simple order API request that requests a banned name check before allowing the transaction to complete.

see https://developer.cybersource.com/library/documentation/dev_guides/Verification_Svcs_SO_API/html/Topics/Requesting_Export_Compliance.htm

jkachel commented 2 years ago

While there is a parameter that can be set in the Simple Order API for this, we use Secure Acceptance, which does not have this feature. However, since the benefit of Secure Acceptance is that we don't handle the payment process flow at all, this ideally should be handled on the CyberSource side of things if it can.

There's a couple pathways we can go down for this:

The easiest thing would be to see if there's a way to make the Secure Acceptance flow run the check against the denied persons list automatically, since that's the point where the address is collected currently.

pdpinch commented 1 year ago

@jkachel I'm about to open some issues for updating the user profile data we collect. What fields would we need to add to make this work (with options 2 and 3 on your list above)?

Or can we try again to find out why the first option isn't working?

jkachel commented 1 year ago

Matching against the various lists can be done simply with the name and country info we already collect; however, it'd be best to at least get a city and state for a more accurate match. (The denied persons list is here, it doesn't take too long to find a name that'd be pretty common.) We could capture this information at checkout.

Focusing on option 2, in addition to caching a list locally (to the application) there's a free-to-use API that can be hit to run checks against all the various lists. (I mentioned the denied persons list and that's the most important, I think, for our purposes, but there's others and they roll them all up into a consolidated list.) The documentation for this, including info about the downloadable lists, is here: https://www.trade.gov/consolidated-screening-list . (I think this is the easiest and quickest option to implement since the other two involve wrangling CyberSource support in some sort of manner.)