|Version:||2019.100||Requirements:||uMMORPG2d, Tools||Script Define:||None|
|Core Changes:||No||Tutorial Video:||No|
This complex AddOn will add PayPal as payment gateway to your game. This allows you to charge your players for in game purchases with real currency. Purchases are customizable and contain coins, gold, experience as well as items. The system is relieable and fraud safe.
- [Required] Either patch your core files or apply the core changes manually.
- [Required] Add the “Resources > UCE Products” folder to your projects main Resources via drag-n-drop.
- [Required] Do not keep duplicate objects of the same name and use only one Resources folder in your project.
- [Required] Add everything in “Prefabs [Add to Canvas]” to your Canvas via drag-n-drop.
- [Required] Make sure not to put them into another object.
- [Required] In your Canvas locate the default “ItemMall” and unfold everything until you find ButtonBuyCurrency.
- [Required] Add a new event to the button in “On Click()” by pressing the “+”.
- [Required] Drag and Drop the “StoreProperties” object found inside the “UCE_UI_PayPal” object into the slot of the freshly created click event.
- [Required] Select “GameObject.SetActive” from the popup menu and tick the box so that it is checked.
- [Required] Open a browser and go to: https://developer.paypal.com/.
- [Required] Login with your paypal account.
- [Required] Click the dashboard link next to the logout button in the top right corner.
- [Required] Scroll down to the REST API’s section of the “My Apps and Credentials” page and click the “Create App” button.
- [Required] Enter a name for your app select a Sandbox account then click the Create App button (You can create additional sandbox accounts by clicking on the Sandbox -> Accounts link in the left menu).
- [Required] In your canvas, unfold the “UCE_UI_PayPal” object and look for “StoreProperties”
- [Required] Enter your “Client ID” and “Secret” as generated by PayPal in the inspector.
- [Required] You can now run and test using the sandbox (no real sale) using the buyer test email that is generated by paypal automatically (it looks like: buyer-YOURADDRESS@YOURDOMAIN.COM)
- [Required] You can easily configure the products by editing their template in the inspector.
- [Optional] Edit the Products or add new ones via the context menu. All Products in “Resources > UCE Products” will be available for purchase.
Using this AddOn will get your game kicked from all major app stores, as they don’t tolerate third party payment providers.
This AddOn requires a PayPal Developer account, which is free and easy to setup.
By default, SANDBOX mode is enabled, you can change that before releasing a client for production. Your test email will only work while in sandbox mode.
- By default your purchasers are forwared to the google homepage after making their transaction, you can change that to another website by editing the data in:
- It makes sense to forward to a special page on the homepage of your game to show them that their transaction is finished.
- Your players should then switch back to the Unity project (the game itself) and wait a bit for the confirmation to arrive. Then they will be awarded their coins, gold, experience and items. During the next server save, the coins are safely deposited in the database of the server as well.