[Resolve]Unity iap and European Strong Customer Authentication (SCA) / Interrupted purchases

We recently got an email by apple on Strong Customer Authentication that will be active on December 31
This triggers an Interrupted purchases. I have tested our app and a blank app and it not working.

The purchase flow stop a step 9 here of section Test an Interrupted Purchase:
https://developer.apple.com/documen…g_in-app_purchases_with_sandbox?language=objc

Here the paste bin of the log:2020-12-21 13:28:37.710636-0500 montessoriacademy[9910:198660] UnityIAP UnityEar - Pastebin.com

I have debug a little bit the file UnityPurchasing.m Especially the paymentQueue function.
Only SKPaymentTransactionStatePurchasing and SKPaymentTransactionStateFailed seem to by returned

I found a similar issue here:

Does anyone have info on that?

On our app
We are using unity 2019.4.14
The package version is 2.1.1
and the plugin version is 2.2.2

On the blank test app
We are using unity 2019.4.14
The package version is 2.1.1
and the plugin version is 2.2.5

Resolve: I just created a new sandbox account and it worked.

Please place numerous Debug.Log statements in your purchasing code to follow the flow and provide the device logs via XCode How To - Capturing Device Logs on iOS Also, I might recommend adding the following code and add similar Debug.Log statements. These callbacks generally do not provide additional transaction information, but simply and immediately let you know that you should expect a ProcessPurchase some time in the future. It’s not determined if the stores would call these callbacks in the SCA flow.

The iOS Ask to Buy deferred listener is described here:

For Android, the code would look similar to:

m_GoogleExtensions = extensions.GetExtension<IGooglePlayStoreExtensions>();
m_GoogleExtensions?.SetDeferredPurchaseListener(OnPurchaseDeferred);

Yes I tested with extensions.GetExtension().RegisterPurchaseDeferredListener
The same thing occur. Here the log.

6646714–759046–Test.txt (11.4 KB)

I wouldn’t expect any different behavior when testing with the deferred listener, as described. Do normal purchases succeed? Only these deferred purchases fail?

Yes if i buy without Interrupted purchases it work as expected.
May I add I’m testing on xcode simulator so the test flow is a bit different.
Testing In-App Purchases in Xcode | Apple Developer Documentation The flow stop at step 6 of “Test an Interrupted Purchase” so I do not even see the transaction in the Xcode debug windows

My initial test were on testflight I use the simulator for faster iteration.
Thanks

Please confirm on an actual iOS device per the Apple instructions (“…on the device”)

It does not work more on device. RegisterPurchaseDeferredListener is not called either.
Here the log

6646873–759076–test2.txt (10.4 KB)

Thanks for checking, we will look into this.

Reading the Apple instructions, it appears that an original OnPurchaseFailed is expected (Step 6 under Begin Testing), followed later by the ProcessPurchase (Step 12). Did you receive the Terms and Conditions popup on the device (Step 8)? Once clearing this, the ProcessPurchase would be expected. Testing In-App Purchases with sandbox | Apple Developer Documentation

Yes step 8 go as expected. I can do step 9 but step 10 never come. I never receive SKPaymentTransactionStatePurchased

Got it, I’m doing the same test here now and will follow up with my results.

I tested using the Sample IAP project, and I see both the initial OnPurchaseFailed callback, followed by the ProcessPurchase callback when I clear the Terms and Conditions. It seems to be working as expected Sample IAP Project

Thanks I will test with that.

Nope not working here the log.
New was tested with 2.2.5
Old was tested with the iap version in the sample
I tested with unity 2019.4.14

I tested with a subscription purchase because we do not have consumable.

What was your step and environment?

6647212–759106–old.txt (7.21 KB)
6647212–759109–new.txt (6.5 KB)

Yes, I tested with a subscription also, using IAP 2.2.5. I’m not using Codeless however, I suspect that is the issue. Please test with the first (scripted) Sample IAP project. I would not recommend Codeless at this time especially with iOS as it does not currently support receipt validation (an Apple requirement) nor SubscriptionManager.

It dosent work either.
Here my step:

  • Open the project with unity 2019.4.14
  • Update asset database
  • Update unity iap
  • Change the subscription product id to ours
  • link unity service
  • change Bundle id
  • Build
  • Clicked play on xcode
  • Buy subscription
  • Failed

Here the log.
My colleague will test on his mac.

Edit: I tested initially with the codeless sample. This test was with the other sample

6647422–759151–log.txt (6.55 KB)

You need to publish to Apple first, define your products, create the screenshots, etc. I tested here without issue. The Sample IAP project writes the debug info to the UI, you should see failed followed by success after you accept the Terms and Conditions. Also, ensure you are using In App Purchasing package manager version 2.2.1 and IAP 2.2.5

Yes I was testing with our apple store app that is already published.
The package version is 2.2.1 and the plugin is 2.2.5
I build directly on my ipad.

Edit: my colleague tested and it does not work either.

6647422–759151–log.txt (6.55 KB)

Unfortunately I don’t have additional suggestions. Perhaps try making a video (perhaps using a second phone) of the end-to-end testing process. Create a new subscription product if necessary, and create a new test account if necessary. Ensure both OnPurchaseFailed and ProcessPurchase write to MyDebug.

Can you enumerate your exact step from the sample download to buy success?
Maybe you could send your log and video that could help me debug on my side?

here the video
https://drive.google.com/file/d/12eeXgorQVZHjV-ITB5Kc7No3P1BsHIHK/view?usp=sharing

It would really bother us to create a new subscription product because we have a big user base.