Search Unity

Huawei IAP system

Discussion in 'Unity IAP' started by ttermeer-reboundcg, May 23, 2019.

Thread Status:
Not open for further replies.
  1. ttermeer-reboundcg

    ttermeer-reboundcg

    Joined:
    Jul 12, 2017
    Posts:
    62
    Just wondering since Unity is US based, there is no chance to get any support for Huawei IAP system with the official Unity IAP plugin ?
     
    Cuicui_Studios likes this.
  2. evilock

    evilock

    Joined:
    Sep 19, 2016
    Posts:
    20
  3. ttermeer-reboundcg

    ttermeer-reboundcg

    Joined:
    Jul 12, 2017
    Posts:
    62
    Thank you. Didn't see they have a Unity SDK.
    However I am still interested to know what Unity IAP plugin will do because having only one plugin that handles all IAP is better to manage.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    vakabaka and ttermeer-reboundcg like this.
  5. flashmandv

    flashmandv

    Joined:
    Mar 26, 2015
    Posts:
    156
    @JeffDUnity3D I'm just integrating our top game to Huawei App Gallery and I need Unity plugin for their IAP.
    Is there any plugin/code sample or anything useful ?

    This September/October Huawei are releasing their Mate 30 Pro with HongMeng/Harmony OS and we need to keep up.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry, we only have the official release that supports Google Play.
     
  7. flashmandv

    flashmandv

    Joined:
    Mar 26, 2015
    Posts:
    156
    JeffDUnity3D likes this.
  8. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    345
    Anyone in canada able to register as a developer?
     
  9. Cuicui_Studios

    Cuicui_Studios

    Joined:
    May 3, 2014
    Posts:
    72
    A little bump here.
    We successfully registered and are trying to implement the system, but the Huawei docs are, let's say, not as useful as we would like them to be. Has anyone found decent docs/examples on how to implement the Huawei IAP system?

    [Edit to add some code and examples]

    So, after tinkering a bit with the API to make a GetProductCode the only thing we get are these errors:

    ConfigInfoUtility GetApplicationID Reflect Java Exception
    and
    ConfigInfoUtility GetMerchantID Reflect Java Exception

    We are following the setup instructions here and the sample code from here.

    Code (CSharp):
    1. Purchasing.Initialise();
    2.  
    3. string codeList = "";  // some product codes separated by "|"
    4. string requestId = DateTime.Now.ToString("yyyyMMddhhmmssfff");
    5.  
    6. ProductDetailsRequestBuild pdrb = new ProductDetailsRequestBuild().Info(requestId, codeList);
    7. ProductDetailsRequest req = pdrb.Build();
    8.         //req.applicationID = set in android.manifest.xml
    9.         //req.merchantId = no clue where to set it into
    10.  
    11. Purchasing.GetProductDetail(req, new ProductDetailImpl());
    And the ProductDetailImpl class:

    Code (CSharp):
    1. public class ProductDetailImpl : IProductDetailHandler
    2. {
    3.     public void OnResult(int resultCode, ProductDetailsResponse response)
    4.     {
    5.         Debug.Log("HUAWEI STORE: GETPRODUCTDETAIL-----------");
    6.         Debug.Log("resultCode: " + resultCode.ToString());
    7.         Debug.Log("requestId: " + response.requestId);
    8.         Debug.Log("FailList:");
    9.         foreach (var item in response.failList)
    10.         {
    11.             Debug.Log("code: "+ item.code.ToString());
    12.             Debug.Log("msg: " + item.msg);
    13.             Debug.Log("productNo: " + item.productNo);
    14.         }
    15.         Debug.Log("productList: ");
    16.         foreach (var item in response.productList)
    17.         {
    18.             Debug.Log(item.ToString());
    19.         }
    20.     }
    21. }
    Still we get those errors. Both happen inside ProductDetailsRequestBuild().Info() function, and it seems like they come from fetching the values in the android.manifest file (which has the appid and cpid values properly set) but we have no clue.
    Since the docs in Huawei site are worthless, does anyone have any idea of what we are doing wrong?

    Thanks guys.
     
    Last edited: Feb 10, 2020
  10. primebit

    primebit

    Joined:
    Jun 24, 2015
    Posts:
    14
    We followed the same instructions and also got
    ConfigInfoUtility GetApplicationID Reflect Java Exception
    ConfigInfoUtility GetMerchantID Reflect Java Exception
    Did you get any further with that?
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please reach out directly to Huawei support.
     
Thread Status:
Not open for further replies.