←back to thread

1134 points mtlynch | 1 comments | | HN request time: 0.397s | source
1. m3nu ◴[] No.22941019[source]
I wasn't very comfortable with integrating either Paypal or Stripe in my app for payments. So I ended up adding it only to the checkout page. Any user who isn't paying never loads their JS and shouldn't have to.

Needs a tiny bit more work, but avoids tons of JS.

You can also use CSP to only allow selected resources to load and e.g. block trackers, but allow bare-bones payment endpoints.