Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huawei Unity IAP Did Not Worked. #488

Closed
MushoodMunir opened this issue Apr 28, 2024 · 9 comments
Closed

Huawei Unity IAP Did Not Worked. #488

MushoodMunir opened this issue Apr 28, 2024 · 9 comments
Assignees
Labels
details requested Details requested for the issue new

Comments

@MushoodMunir
Copy link

Describe the bug & problem
I am trying to implement Huawei IAP in my Unity Project. However, I am not able to launch Huawei payment flow when clicking on my IAP's button. I followed the online available tutorials and created the IAP products on Huawei app gallery console. According to my understanding everything is configured correctly but receiving error when IAP is initialized.

Expected behavior
IAP should work and payment screen should launch successfully.

Screenshots & Detailed log
Screen Shot 2024-04-28 at 1 48 48 PM
Screen Shot 2024-04-28 at 1 44 15 PM
Screen Shot 2024-04-28 at 2 06 17 PM
Screen Shot 2024-04-28 at 2 06 55 PM
Screen Shot 2024-04-28 at 1 27 35 PM

Environment

  • Unity Version 2021.3.2f1
  • HMS Unity Plugin Version V2.3.4

Smartphone

  • Device: Huawei (HONOR 8S)
Copy link

Thank you for reporting this issue/advice.

We will get back to you as soon as possible.
Would you like to star our plugin to support us? ✨

@MushoodMunir
Copy link
Author

Is there any update on this?

@Andronovo-bit
Copy link
Collaborator

Andronovo-bit commented Apr 30, 2024

Hi @MushoodMunir. We are under review. If you want, you can try the suggestions below until this process is complete.

  • Did you use AccountKitManager(AccountKit) ? Before any IAP operation, you must sign in. For this you look at this demo scene;

https://github.com/EvilMindDevs/hms-unity-plugin/tree/master/Assets/Huawei/Demos/IAP/Second%20Demo-Menu_Store

@MushoodMunir
Copy link
Author

No, I didn't use any AccountKitManager before IAP operation. I directly tried to initialize the IAP flow by checking "Initialize On Start" option from Kit Settings -> IAP dialogue. And it failed to Initialize straight away. Is't AccountKitManager will come into play after the purchases are initialized successfully and at the time user will try to buy any IAP? Or AccountKitManager has something to do with the successful Initialization of IAP's? If there is some kind of dependency between these two can you please guide me to workflow of it?

@Andronovo-bit
Copy link
Collaborator

Basically, if the user can't login, they can't do any IAP operations. This is normal, because this transaction has to belong to an account.

The purpose of the "Initialize On Start" option is to prepare your IAP products for use. Don't be related to any account or user operation.

If you look at the at the below demo scene file, you can see the guide in the code file. Writes in comment line what you need to do, and you can also see how to do user operations or start operations.

https://github.com/EvilMindDevs/hms-unity-plugin/blob/master/Assets/Huawei/Demos/IAP/Second%20Demo-Menu_Store/MainMenuManager.cs

@MushoodMunir
Copy link
Author

Got it, As you said that The purpose of the "Initialize On Start" option is to prepare your IAP products for use. Don't be related to any account or user operation. Here i get the problem as products are not being Initialized at all and i get some error code in response visible in screenshots that i attached.

@Andronovo-bit
Copy link
Collaborator

Andronovo-bit commented May 1, 2024

Did you follow the 5-step instructions in the code file I shared above and the structure in the "Start" method? Are you still getting an error?

Also, can you try with another Android device ?

Or

Can you update the HMS Core version of of your device (Honor 8S)? (Grater than 3.0 Hms core version) @MushoodMunir

@Andronovo-bit Andronovo-bit added investigating We are investigating the current problem details requested Details requested for the issue and removed investigating We are investigating the current problem labels May 2, 2024
@MushoodMunir
Copy link
Author

It worked with singing in using AccountKit before performing any IAP operations.

Copy link

github-actions bot commented May 6, 2024

Thank you for using our repository! We're glad we could help solve your issue. If you found our repository helpful, please consider giving us a star ⭐ on GitHub: https://github.com/EvilMindDevs/hms-unity-plugin

Your support helps us continue to improve our repository and provide valuable resources for others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
details requested Details requested for the issue new
Projects
None yet
Development

No branches or pull requests

3 participants