Restore Iap Game Pigeon

What are in-app purchases?

  1. Restore Iap Game Pigeon Forge
  2. Restore Iap Game Pigeon Game
  3. Restore Iap Game Pigeon Free
  4. Restore Iap Game Pigeons
  5. What Does Restore Iap Mean On Game Pigeon

In-app purchases are extra content or subscriptions that you buy inside an app. Not all apps offer in-app purchases. To check whether an app offers in-app purchases before you buy or download it, find it in the App Store. Then, look for 'In-app Purchases' near the app's price or Get button.

There are three types of in-app purchases – subscriptions, consumable purchases and non-consumable purchases.

What is a subscription?

With a subscription, you pay to access content from an app or service for a period of time. For example, you might subscribe to Apple Music on a monthly basis. Subscriptions include services that you sign up for in an app, such as Hulu, Spotify, Pandora or HBO NOW.

This allows you to, for example, restore non-consumable products when users reinstall your game. Consumable IAP products provide temporary effects, such as game currency and extra experience points. You can make them available to your players multiple times. Note: Games with IAP must contain a Purchase method. I'm about to port my Android game on iOS. I'm using Easy IAP Marketplace asset to make IAPs. IAP are working fine on iOS but I can't get iaprestoreall; -function to work while testing in a sandbox mode. Currently when a player pushes at 'Restore IAP' -button, it executes simply a code: iaprestoreall This doesn't seem to work. I'm about to port my Android game on iOS. I'm using Easy IAP Marketplace asset to make IAPs. IAP are working fine on iOS but I can't get iaprestoreall; -function to work while testing in a sandbox mode. Currently when a player pushes at 'Restore IAP' -button, it executes simply a code: iaprestoreall This doesn't seem to work. Game pigeon, another game slowly gaining the attention of kids and parents.For most parents, they have always been conscious of what games their children play online. In this post, I will be broad on game pigeon and also show you how to download to your iPhone. The Escape Game Pigeon Forge; 131 Island Drive, Suite 9139 Pigeon Forge, TN 37863 (865) 868-3400 email protected. The game then checks and sees you own that purchase, gives you 100 coins in the game, and marks the 100 coin in-app purchase as “unowned.” You can then buy another pack of 100 coins, if you like. How to Restore Non-Consumable Purchases. In-app purchases that aren’t consumable can be restored. I am creating a server-driven game on iOS that allows players to create a Game Account for multi-device play. My game has In-App Purchases (IAP) that are non-consumable and can be restored or re-downloaded by the original purchaser. I would prefer that players cannot restore their IAP to multiple Game Accounts. Is this possible given Apple's rules?

Most subscriptions renew automatically unless you cancel them. With some apps and services, you can choose how often the subscription renews. For example, you might be offered weekly, monthly, quarterly or yearly subscriptions.

See a list of your subscriptions or cancel a subscription.

What is a non-consumable in-app purchase?

Here are examples of non-consumable in-app purchases:

  • Remove ads
  • Full game unlock
  • Upgrade to pro edition
  • Bonus game levels

You buy these items once, and you can transfer them to other devices that are associated with your Apple ID. If you lose a non-consumable purchase, you might be able to download it again for free.

Restore your in-app purchase.

What is a consumable in-app purchase?

Here are some examples of consumable in-app purchases:

  • Game currency, such as coins or gems
  • Extra health points in a game
  • A package of exports to a new file format

You need to buy these items every time you want them, and you can't download them again for free. If you remove and reinstall an app or install an app on a new device, you might lose your consumable purchases. For example, if you install a game on your iPod touch that you started playing on your iPhone, the game levels sync, but extra health that you bought on your iPhone won't sync.

What does restore iap mean on game pigeon

About sharing in-app purchases

If you use Family Sharing, you might be able to share some subscriptions with family members. Find out how to share a subscription with family. Consumable in-app purchases can't be shared.

Learn more

  • To prevent unintentional in-app purchases or prevent a child from making in-app purchases, set up Screen Time.
  • If you tried to make an in-app purchase and you aren't sure whether the purchase was successful or not, check your purchase history. If you see it in your purchase history but you can't see it in the app, contact the app developer.
  • For any other issues with in-app purchases, you can request a refund or report a problem.

For more information about subscriptions and in-app purchases, see the Apple Media Services Terms and Conditions.

Store availability and features might vary by country or region. Learn what's available in your country or region.

In-app purchases (IAP) let you sell content to players from inside your game. You only need to implement your in-app purchases via UDP. UDP then automatically repacks your game into store-specific builds. You don’t need to worry about store-specific SDKs.

You can implement UDP on both the game client and server sides. If your game is offline, you only need to implement UDP in the game client. If your game is online, you can opt to also implement UDP on the server side.

  • Implementing UDP in-app purchases in the game client
    The implementation in the game client includes initializing the UDP SDK and integrating with the in-app purchase flow of UDP.
  • Implementing UDP in-app purchases on the server side
    The implementation on the server side lets you query the UDP server about orders, receive callback notifications, and return the acknowledgements.

This section shows you how to:

  • Implement in-app purchases on the Editor side
    • with the UDP package
    • with Unity IAP

Game client implementation

In the game client, you can implement your in-app purchases either with the UDP Package or with Unity IAP.

To understand the difference between the implementations, and which one suits you best, see How to implement UDP.

If you suspect your project is using both Unity IAP and the UDP Package at the same time, see UDP implementations to resolve this situation.

With the UDP package

To implement UDP in-app purchases, follow these steps:

Once you have implemented IAP items using UDP, test your IAP in your generic UDP build before uploading it to the UDP console.

Initializing the UDP SDK

To initialize the UDP SDK, your game needs to have a UDPSettings.asset file linked to a UDP client. The initialization listener then returns a success or failure message to let you know if the initialization is successful.


Initializing game integration with UDP

Call the Initialize method in your game code.

Note: You must implement the Initialize() method in your game to be able to publish your game to app stores via UDP.

The InitListener then tells your game whether the initialization has succeeded or failed.

Querying the partner store’s inventory

To prevent an IAP product from being bought but not delivered, your game needs to query the partner stores’ inventory after the initialization is completed. This allows you to, for example, restore non-consumable products when users reinstall your game.

  • Consumable IAP products provide temporary effects, such as game currency and extra experience points. You can make them available to your players multiple times.
  • Non-consumable IAP products provide permanent effects. Players can only purchase them once.
What does restore iap mean on game pigeon

To check for unconsumed IAP products, your game should call the QueryInventory method immediately after the initialization succeeds.


Sending a query from your game to the UDP inventory

To query for the product details, call the QueryInventory method. This returns the product information (product name, ID, price, description) for non-consumable purchases and consumable purchases which have not yet been consumed.

If you specify product IDs, you get the product information for your specified IAP products.

If you don’t specify product IDs, you get the information of all IAP products.

Hint: Call this method after a successful initialization. This step is used to recover a product being paid for but not delivered for some reason, such as an application crash.

Implement listeners for events that are related to the purchase service. IPurchaseListener provides the following listeners that tell you the result of all purchase-related events:

EventDescription
OnPurchaseThe purchase succeeded.
OnPurchaseFailedThe purchase failed.
OnPurchaseRepeatedUsed when a player buys a non-consumable product several times. You can implement this listener when the partner store doesn’t support QueryInventory.
OnPurchaseConsumeThe consumption succeeded.
OnPurchaseConsumeFailedThe consumption failed.
OnQueryInventoryThe query succeeded.
OnQueryInventoryFailedThe query failed.

Here is an example:

Purchasing an IAP product

To start a purchase request from your game, call the Purchase method. The UDP automatically checks the purchase receipt to check the purchase is valid.


Sending a purchase request from your game to UDP

When you call the Purchase method, provide the:

  • productId - The unique identifier of the IAP product that the player wants to buy.
  • developerPayload - The information you want to send to the UDP SDK.
  • IPurchaseListener - The listener that tells you the results of all purchase-related events.

For example:

Note: Games with IAP must contain a Purchase method.

The UDP returns information to your game when the purchase is complete.

Some partner stores' payment gateways can't get payment callbacks in real-time. This can prevent UDP quickly receiving payment SUCCESS or FAILED callbacks. In this case, UDP regards the callback as FAILED. In case this situation occurs, add logic to your game to get the latest order status via server-side validation. This can be using the SDK callback or order queries.

If your game is an online game, you can verify the purchase on your game server via a callback notification. UDP sends the callback notification to the callback URL that you have specified either in the Unity Editor or on the UDP console (see UDP Settings).

Consuming a purchase

When a user has purchased a consumable product, they cannot repurchase that product until it has been consumed. So you can use the consumption to make sure the purchased product is successfully delivered.

Note: This step is only necessary for consumable products.

To consume a product, your game needs to send a Consume request to the UDP SDK. Your game should deliver a product when it is initially consumed. This prevents the product being delivered repeatedly. Note that PurchaseInfo is returned by OnPurchase.

For example:


Sending a consume request from your game to UDP

UDP SDK data structure

This section describes the classes of the UDP SDK.

UserInfo

field nametypedesc
ChannelstringPartnerStore name, generated by UDP
UserIdstringoptional, user ID returned from PartnerStore
UserLoginTokenstringoptional, user login token returned from PartnerStore

Inventory

public functionreturnsdesc
GetPurchaseInfo(string productId)PurchaseInfoget PurchaseInfo of given productId
GetProductInfo(string productId)ProductInfoget ProductInfo of given productId
HasPurchase(string productId)boolcheck if any unconsumed purchase exists for given productId
HasProduct(string productId)boolcheck if product exists for given productId
GetPurchaseDictionary()Dictionary<string, PurchaseInfo>get purchases as productId - PurchaseInfo dictionary
GetPurchaseList()List<PurchaseInfo>get purchases as list
GetProductDictionary()Dictionary<string, ProductInfo>get products as productId - ProductInfo dictionary
GetProductList()List<ProductInfo>get products as list

PurchaseInfo

field nametypedesc
ItemTypestringfixed value “inapp”
ProductIdstringproduct ID of IAP item
GameOrderIdstringcpOrderId provided by UDP
OrderQueryTokenstringtoken to query UDP server, generated by UDP
DeveloperPayloadstringany string provided by the developer. UDP will pass this to PartnerStore in ‘Purchase’ method
StorePurchaseJsonStringstringany other additional info provided by PartnerStore

ProductInfo

field nametypedesc
ItemTypestringfixed value “inapp”
ProductIdstringproduct ID of IAP item
Consumableboolcan be consumed or not
Pricestringformatted price of the IAP item, including its currency sign
PriceAmountMicroslongprice of IAP item in micros
Currencystringcurrency of IAP item
TitlestringIAP item name
DescriptionstringIAP item description

Validating the client-side integration

UDP performs client-side validations automatically. When partner stores return the payload and signature after a successful purchase, the UDP SDK validates the signature. If the validation fails, the purchase fails accordingly.

Filling in the IAP Catalog

Filling in the IAP Catalog requires you to list and configure all your UDP in-app purchases.

Note: If you don’t use an IAP Catalog in your game client (for instance, your IAP items are maintained solely on your game server) you still have to create your IAP Catalog on the UDP console. For more information, see In-App Purchases.

  1. For Unity Editor versions 2019.4 and below, open the UDP Settings inspector window.
    For Unity Editor versions 2020.1 and above, open the IAP Catalog window.
  2. In the IAP Catalog section, enter your product information for each IAP product:
    • Name, the name of the IAP product.
    • Product ID, the unique ID used to identify the IAP product. See below the requirements that Product IDs must follow.
    • Type, which indicates whether the IAP product is consumable or not.
    • Price, the price of the IAP product. You must specify the product price, otherwise players can’t purchase products in your game.
    • Description, a short description of the IAP product.
  3. Click Push to create the IAP product and sync with the UDP server.
  4. To add more products, click Add new IAP.
    Product IDs must follow these requirements:
    • Start with a letter or a digit;
    • Be only composed of letters, digits, dots (.) and underscores (_)
    • Must not use capitalized letters

When you’ve defined all your IAP products in your game, make sure they each use the same Product ID that is set in the IAP Catalog.

Note: Make sure you Push new IAP products (or changes to existing IAP products) so they are saved on the UDP console. You can push individual IAP products using the drop-down menu opposite its name. To save the entire IAP Catalog, use the top-most Push button; this also saves/syncs other settings such as Sandbox Test Accounts, Game Title, and Settings. For more information, see Save / Sync / Push your IAP Catalog.

To understand how the IAP Catalog works in the UDP context, see Notion of IAP Catalog.

For more information on the UDP Package user interface, see Editor UI for the UDP Package.

When you’ve completed the UDP implementation and configuration on the game client side, implement UDP on the server side if needed, and build your game.

With Unity IAP

If you want to implement UDP using Unity IAP, first set up Unity IAP.

Note: If you choose to implement UDP with Unity IAP version 1.22.0-1.23.5 (instead of using the UDP package) then implement via Unity IAP only.

Unity IAP automatically handles the following:

  • Initializing UDP
  • Querying the store’s IAP product inventory
  • Requesting to purchase a product
  • Consuming the purchased item

However, your game must properly use Unity IAP’s similar functions (such as initialization and purchase) according to the Unity IAP Documentation.

Note: Unity IAP consumes the IAP item automatically, so Unity IAP doesn’t contain an API to consume the item.

Once you’ve implemented UDP using Unity IAP, test your IAP in your generic UDP build, before uploading it to the UDP console.

When you’ve implemented your game’s in-app purchases with Unity IAP, take the following steps to set up UDP with Unity IAP.

Querying IAP inventory

With Unity IAP codeless

Upon initialization, the codeless implementation fetches all the IAP product information from the Editor’s IAP Catalog with no additional instruction required from you. The IAP Catalog (Window > Unity IAP > IAP Catalog) should contain your final inventory of IAP products when you build your game APK.

A codeless implementation cannot be made to fetch IAP product information elsewhere.

Note: With Unity IAP codeless you should not add IAP products from the UDP Console. If you do, your game will ignore these IAP products. You can still, however, modify the price and description of your original IAP products from the UDP Console when preparing your game for submissions.

With Unity IAP non-codeless

When fetching the IAP products to pass to the queryInventory method, invoke ProductCatalog.LoadDefaultCatalog() to return the IAP products originally defined in the Editor’s IAP Catalog (Window > Unity IAP > IAP Catalog).

For instance:

ProductCatalog.LoadDefaultCatalog() does not fetch IAP products added with the Bulk IAP Import feature or directly from the UDP Console.

If you know that your game’s IAP Catalog will be modified on the UDP Console, prepare your game to fetch IAP product information from the UDP Console.

When fetching the IAP products to pass to the queryInventory method, invoke builder.AddProduct to retrieve specific IAP products defined from the UDP console:

To display the product price, formatted with currency, use productInfo.Value.Price.

If you want to retrieve all the IAP products defined on the UDP Console, you don’t need to invoke any IAP product retrieval method at all. Your game will then fetch the entire IAP Catalog from the UDP Console.

In summary, you can choose to:

  • Fetch your default IAP products with ProductCatalog.LoadDefaultCatalog() and any additional ones with builder.AddProduct
  • Fetch only specific IAP products from the UDP Console by invoking them explicitly with builder.AddProduct
  • Fetch your entire IAP Catalog from the UDP Console by not invoking any IAP product retrieval method at all

Note: Uploading a CSV file of IAP products on the UDP Console entirely overwrites your IAP Catalog. Therefore if you plan to use the Bulk IAP Import feature, you should not invoke any IAP product retrieval method at all in your code to allow your game to fetch its entire IAP Catalog from the UDP Console.

Setting UDP as build target

In the Unity Editor, to choose UDP as the Android build target, select Window > Unity IAP > Android > Target Unity Distribution Portal (UDP).

Filling in the IAP Catalog

Filling in the IAP Catalog requires you to list and configure all your in-app purchases. You should specifically configure your In-App Purchases for UDP.

Note: If you don’t use an IAP Catalog in your game client (for instance, you maintain your IAP items solely on your game server) you still have to create your IAP Catalog on the UDP console. For more information, see In-App Purchases.

  1. Select Window > Unity IAP > IAP Catalog and for each IAP product fill in the following fields:
    • ID, the unique identifier of the IAP product
    • Type, consumable or non-consumable
    • Title, the name of the IAP product
    • Description, a short description of the IAP product
    • Price, the price of the IAP product (in USD). This field is found directly under the Unity Distribution Portal Configuration section
  2. To save your IAP product, click Sync to UDP.

Note: Remember to Sync to UDP every individual IAP product that you add to the catalog under the UDP Configuration section.
To ensure your IAP Catalog is properly saved, see Save / Sync / Push your IAP Catalog.

For more information on the UDP user interface when implementing via Unity IAP, see Editor UI for UDP with Unity IAP.

To understand how the IAP Catalog works in the UDP context, see Notion of IAP Catalog.

Server-side implementation

You can validate purchases on the server side in one of the following ways:

Note: Callback notifications are not currently supported for the Huawei AppGallery store.

You can test your server-side implementation in the UDP Sandbox environment.

Querying orders

Your game can query UDP about orders by calling an HTTP GET request.


Querying UDP about orders

GET https://distribute.dashboard.unity.com

/udp/developer/api/order?orderQueryToken=<orderQueryToken>&orderId=<orderId>&clientId=<clientId>&sign=<sign>

The API can return an 'unconfirmed' status for the following reasons:

  • The store can’t get the order status at this time
  • The store doesn't support real-time order status query

Restore Iap Game Pigeon Forge

In this case, retry the QueryOrder API with an interval. The store will send a callback (in near real-time) to UDP and UDP can return the status to the game.

Parameters in the request:

Attribute nameFormatRequired/OptionalDescriptionExample
orderQueryTokenStringRequiredThe order query token returned by the client SDK when finishing a purchase. The token needs to be encoded Base64 before being used in the query. (UDP SDK will return PurchaseInfo.OrderQueryToken)eyJjaGFubmVsUHJvZHVjdElkIjoiaWFwLl9mM2YzZiIsImNoYW5uZWxUeXBlIjoiQVBUT0lERSIsImNsaWVudElkIjoiQUFJZ3g5VmNGaDJZQ1ZxbUs2VWNDUSIsImNwT3JkZXJJZCI6IjJhNGQ5MWY4NDgzZjQ3YjlhYzFhNGY5MDAwZDVhNTRhIiwicGFja2FnZU5hbWUiOiJjb20udW5pdHkudW5pdHl0ZXN0Z2FtZV9mZWZ3In0=
orderIdStringRequiredThe orderId returned by the client SDK when finishing a purchase. (UDP SDK will return PurchaseInfo.GameOrderId)2a4d91f8483f47b9ac1a4f9000d5a54a
clientIdStringRequiredThe clientId can be found in the Game info - integration information of UDP console.AAIgx9VcFh2YCVqmK6UcCQ
signStringRequiredGenerate signature with orderQueryToken and client secret, MD5.hash(orderQueryToken + clientSecret).Client Secret can also been found in the Game info - integration information of UDP console.Client Secret: KKcCyAgej06MxjKX31WuFNeHSaTJAjLDlgoDWsPJDAMSign:90a4e440897623c7cd0b2b80a97c267e

Parameters in the response:

Attribute nameFormatRequired /optionalDescriptionExample
clientIdString RequiredThe clientId that Unity returns after the game has created a client in the Unity IAP. Q4AnJDW2-rxLAPujqrk1zQ
cpOrderIdString RequiredThe order ID assigned by your game, or Unity if the game does not generate it.66mea52wne
channelTypeStringRequiredChannel type.APTOIDE,CLOUDMOOLAH
status StringRequiredIndicates the status of the order. SUCCESS, FAILED, UNCONFIRMED, STORE_NOT_SUPPORT
productIdStringRequiredThe product ID associated with the order.product_1
amountStringRequiredThe payment amount of the order.1
quantityIntegerRequiredIndicates the quantity of the product.1
currencyISO 4217RequiredThe currency used to purchase the product.CNY
countryISO 3166-2RequiredThe country or geographic region in which the user is located.CN
paidTimeISO8601 yyyy-MM-ddThh:mm:ssXXX, UTC timezoneOptionalSpecifies the time when the order is paid.2017-03-08T06:43:20Z
revStringRequiredThe revision of the order (only for update).0
extensionJson StringOptionalThe developer payload used to add reference information.{'abc' : '123'}

Here is an example request from your game server to the UDP server and response from the UDP server back to your game server:

The content of the orderQueryToken:

orderQueryToken (encoded as Base64):

Order ID:

Restore Iap Game Pigeon Game

Client ID:

Restore Iap Game Pigeon Free

Client Secret:

Sign:

Request:

Response:

Receiving callback notifications

After a purchase succeeds, if you have specified a Callback URL, the UDP server notifies the game server with the payment result. Implement an HTTP POST request and accept the following request body with JSON format:

Attribute NameFormatRequired/OptionalDescription
payloadJSON StringRequiredThe contents of the purchase order. See below for more information on the JSON payload.
signatureStringRequiredThe PKCS1 v1.5 signature of the payload
Restore Iap Game Pigeon

Using the certificate

To verify the certificate, use the Unity Client RSA Public Key. If the certificate passes verification, extract the RSA public key from the certificate and use this key to verify the signature. To generate the signature, encrypt the payload with the RSA-SHA1 algorithm.

Here is an example:

Public key:

Request body:

A code sample showing how to verify the certificate in Go:

JSON payload

Here is the content of a JSON payload:

Attribute NameFormatRequired/OptionalDescriptionExample
cpOrderIdStringRequiredThe unique order identifier assigned by your game.0bckmoqhel5yd13f
statusStringRequiredIndicates the status of the order.SUCCESS
amountStringRequiredSpecifies the amount of money that the order cost.1.01
productIdStringRequiredSpecifies the unique identifiers of the products that belong to the order.com.mystudio.mygame.productid1
paidTimeISO8601 yyyy-MM-ddThh:mm:ssZ, UTC timezoneOptionalThe time when the order was paid. 2018-09-28T06:43:20Z
countryISO 3166-2RequiredThe country where the order was paid.CHINA
currencyISO 4217 or cryptocurrency typeRequiredThe currency of the country where the order was placed.CNY
quantityIntegerRequiredThe number of products in the order.1
clientIdStringRequiredThe unique client identifier that is returned after your game generates a client in Unity IAP.Q_sX9CXfn-rTcWmpP9VEfw
extensionStringOptionalThe developer payload which is used to contain reference information for developers.'{'key':'value'}'

Managing in-app purchases on the UDP console

If you maintain an IAP Catalog in your game client, UDP keeps it synchronized between the Unity Editor and the UDP console.

However, the IAP Catalog in the Unity Editor only shows IAP product descriptions in English and prices in USD.

Restore Iap Game Pigeons

Managing In-App Purchases from the UDP console lets you:

  • manage other amounts and currencies than USD for the IAP price
  • manage other languages than English for the IAP description
  • upload IAP items in bulk using a CSV file (multiple currencies and languages supported)

Note: With Unity IAP, you only can Push your IAP Products from the Editor to the UDP Console. You cannot Pull your IAP Catalog from the UDP Console into the Editor.
With the UDP Package, you can Push your IAP Products from the Editor to the UDP Console, and Pull your IAP Catalog from the UDP Console into the Editor.

What Does Restore Iap Mean On Game Pigeon

If you do not maintain an IAP Catalog in your game client, you have to manually create your IAP Catalog on the UDP Console.

To understand how the IAP Catalog works in the UDP context, see Notion of IAP Catalog.