Last active
October 30, 2019 07:46
-
-
Save neon-izm/d1c544b32b55626f5fe5372dc13b47b6 to your computer and use it in GitHub Desktop.
Unityでアイテムの課金処理よろしく、と言われた人向け事前知識 ref: https://qiita.com/neon-izm/items/132f034821e0daf5a2e3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PurchaseSettings | |
{ | |
/* | |
immutable purchasable item infos. | |
*/ | |
public static readonly ProductInfos IMMUTABLE_PURCHASE_ITEM_INFOS = new ProductInfos | |
{ | |
productInfos = new ProductInfo[] { | |
#if UNITY_IOS || UNITY_EDITOR | |
new ProductInfo("100_coin", "100_coin_ios", true, "100coin_description"), | |
#elif UNITY_ANDROID | |
new ProductInfo("100_coin", "100_coin_android", true, "100coin_description"), | |
#endif | |
} | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//こんな感じ! | |
Autoya.Purchase( | |
purchaseId, | |
"100_coin", | |
pId => | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private string OnTicketResponse(string ticketData) | |
{ | |
// modify if need. | |
//return ticketData; | |
return "test_not_auth"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment