We are using paypal in both desktop as well as web/mobile apps and also in our older df websites that are created pre webapp.
there are a few different apis to choose from.
For the webapp we created a Paypal button class that allows us to easily add paypal buttons with callbacks to a webapp
in desktop we are calling a different api that lends itself better to desktop applications
For our old web site code that was created with df pre webapp we are using the paypal http callback api
for all of them of course the person paying has to log into paypal. you send info to paypal about the sale and then the login happens. You get a token back and then it differs a little depending on the API used but in the end you end up with either a sale, cancellation or a failed transaction