[Solved] Promoted IAP not working as desired

Hello,

I am having some issues trying to get the promoted IAP working on iOS.

  1. The IAP is working fine if bought from within the app but not when accessed from outside [irrespective whether app is open in background or not]

  2. I have initialised the store at the Start() of the game in the first scene itself

  3. When I click on the link (itms-services://?action=purchaseIntent&bundleId=xxx&productIdentifier=yyy) it opens up the app, and the following is logged in XCode in the below order:
    a. UnityIAP UnityEarlyTransactionObserver: Payment queue shouldAddStorePayment
    b. UnityIAP:UpdatedTransactions
    c. [SKPaymentQueue]: Tried to send purchase intent: [IAP Product id] to delegate, delegate does not respond to method paymentQueue:shouldAddStorePayment:forProduct

  4. It asks me for my password, and then shows the correct product which I am buying.

  5. After pressing Buy, it waits for a few seconds and then gives the below error in Xcode:
    ProcessPurchase: FAIL. Unrecognized product: ‘[IAP Product id]’
    On the App it shows the purchase was successful, but obviously I am not awarded the coins as intenally it has failed!

Any guesses what the issue could be?

Any kind of leads would help!

Thanks

I trust that the itms-services link you posted is using xxx and yyy as placeholders, and not the actual URL? Just wanted to confirm. Is this in the Sandbox environment?

Hi Jeff,

I am using the correct bundleid and product identifier in the itms-services link.
eg. com.apple.game & com.apple.game.pack1

Yes, this is in Sandbox.

Thanks!

I don’t believe promoted IAP works in the Apple sandbox.

Ok then we let it be as it is and hope it works once live? That’s like jumping from a plane hoping the parachute opens :slight_smile:

Will keep you updated once we put it up for review and probably during pre-release we are able to test…

Thanks

Ok just to update everybody, our game went live and this is what is happening:

  1. I click on the promoted IAP on the Appstore
  2. It asks me to download the game first, which I successfully do
  3. The game opens up, and after 3 seconds I get a dialogue asking if I wish to purchase the IAP
  4. I click yes, enter iTunes password and click done.
  5. The purchase gets completed and I got a popup alert saying Thank-you, you are all set.
  6. But I do not get any coins

Its the same behaviour as I get on Sandbox which I get on live app.

Unity, any updates? Any ideas?

@msureka83 It does look like we are receiving an incorrect ProductID, can you confirm the parameters you are receiving in ProcessPurchase [SKPaymentQueue]: Tried to send purchase intent: [IAP Product id] to delegate

The IAP ProductID reflected in ProcessPurchase [SKPaymentQueue] is the same that is put in the testing URL. This is the correct ID which is working when used directly from within the app.

Please find the below log when I press on the test link which opens the game and processes the payment.

UnityIAP UnityEarlyTransactionObserver: Payment queue shouldAddStorePayment

UnityIAP:UpdatedTransactions

[Daemon] [SKPaymentQueue]: Tried to send purchase intent: com.xxx.xxx.pack2 to delegate, delegate does not respond to method paymentQueue:shouldAddStorePayment:forProduct
[Common] _BSMachError: port 16827; (os/kern) invalid capability (0x14) “Unable to insert COPY_SEND”

→ applicationWillResignActive()

→ applicationDidBecomeActive()
UnityIAP:UpdatedTransactions

→ applicationWillResignActive()

Selected Product 1

Purchaser:ProcessPurchase(PurchaseEventArgs)

UnityEngine.Purchasing.PurchasingManager:ProcessPurchaseIfNew(Product)

UnityEngine.Purchasing.Extension.UnityUtil:Update()

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

ProcessPurchase: FAIL. Unrecognized product: ‘com.xxx.xxx.pack2’

Purchaser:ProcessPurchase(PurchaseEventArgs)

UnityEngine.Purchasing.PurchasingManager:ProcessPurchaseIfNew(Product)

UnityEngine.Purchasing.Extension.UnityUtil:Update()

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

UnityIAP:Finishing transaction 1000000362489293

@msureka83 Thank you for the additional information, we are continuing to investigate here.

I discussed with the IAP team here, and this is not an issue that we would be familiar with. If you could, please open a support ticket at Unity Cloud and include your project, if possible. Please remove the Library folder prior to zipping the project.

I have contacted the support team and have also uploaded the project for their reference.

If I get any solution, I will update this thread.

Thanks