In-app Purchase help

Is there a way to get in-app purchasing working in my unity project to work on facebook or from my website

I do have it working for mobile devices I just keep seem to find anything on how to get this to work for facebook as well as from my website

I have never used but may be an option:
http://blogs.unity3d.com/2015/05/21/xsolla-unity-sdk-a-customizable-in-game-store-for-desktop-web-and-mobile/

also, there are several BaaS that can be useful:

http://www.gamesparks.com/

Is there a way to hard code it into your game

Download it and follow the instructions