Developers
Integrate mobile payments and monetize with Mocopay
Our developer center provides all the details for a simple and smooth integration so you could easily add mobile payments with Mocopay.
Pre-requisites
Before you start integrating Unity plugin, please make sure that you have done following through our control box:
- Created your payment service.
- Downloaded Unity distributable package.
As first step in your integration, you have to decide how you will present your users with Mocopay payment pages (online hosted responsive web forms). To use an in-app web view instead of the system web-browser on mobile platforms, MoCoPay comes pre-packaged with the UniWebView2
Unity plugin. To use it open “Mocopay/MocopayWebview.cs
” in your Assets folder and uncomment the “#define WEBVIEW_UNIWEBVIEW
” line on top of the file.
Please note, if you wish to use UniWebView for purposes other than Mocopay payments, you need to purchase the plugin from the original developer (http://uniwebview.onevcat.com/ ).
Also to use an in-app web view instead of the system web-browser on Windows/Mac, you need the following Unity plugin:
- uWebKit for Windows/Mac (http://uwebkit.com/)
After importing the package, open “Mocopay/MocopayWebview.cs
” in your Assets folder and uncomment the “#define WEBVIEW_UWEBKIT
” line on top of the file.