interledger / receipt-verifier

Handles ILP STREAM receipts
Apache License 2.0
11 stars 2 forks source link

support multiple receivers with SPSP_ENDPOINTS_URL #19

Closed wilsonianb closed 3 years ago

wilsonianb commented 4 years ago

SPSP requests are proxied to the URL encoded payment pointer or SPSP endpoint in the path of request URL. Alternatively if SPSP_ENDPOINTS_URL is defined, the SPSP proxy makes a GET request to the configured SPSP_ENDPOINTS_URL to look up the endpoint (or payment pointer) to proxy the SPSP query to.

Relates to https://github.com/wilsonianb/wm-ofc/issues/2

wilsonianb commented 3 years ago

Per the discussion above, I've added commits that remove balance tracking.

subsoap commented 3 years ago

If it's possible to have time, it would be great to make a presentable public service that people participating in the upcoming Web Monetization gamejam could use for receipt validation.

https://itch.io/jam/the-web-monetization-challenge-2020 it begins in 5 days and runs for all of next month so there would be some time to set it up and then encourage people to use it.

There's a sample project here https://github.com/defold/extension-webmonetization for Defold but it currently does not have receipt validation in. Any HTML5 game engine can be used in the game jam though.

It being on a subdomain of Coil or the https://webmonetization.org/ site would make it feel more trustworthy. I still don't know enough about the actual process to know how viable this would be to do but currently it is extremely easy to fake Web Monetization payments and not so easy to validate them compared to how easy it is to use the rest of the WM features.

wilsonianb commented 3 years ago

Added https://github.com/coilhq/receipt-verifier/pull/19/commits/14b80baa150f3f2207fb56d375b731dbc6b2fd75 which removes the SPSP_ENDPOINT environment variable. SPSP requests will now be proxied to the URL encoded payment pointer or SPSP endpoint in the path of the request URL.

subsoap commented 3 years ago

receiptverifier.com is available as of this post. 👀

I don't know if it's possible but if it is it would be reasonable to take like 2% of transactions. Otherwise you could add account registration system and have a fee relative to volume of payments if it was non-viable to provide as a free service.

wilsonianb commented 3 years ago

@subsoap One option would be to have the server at SPSP_ENDPOINTS_URL do probabilistic revenue sharing and return the fee payment pointer 2% of the time.

subsoap commented 3 years ago

@wilsonianb That would work for sure and I'm certain people would be happy to share 2% worth in exchange for trusted verification since their total $ would likely be higher thanks to it.