コード例 #1
0
    public static void logPurchase(XPurchase xPurchae)
    {
        Debug.Log("logPurchase");
        string productsString    = getProductList(xPurchae.getProductList());
        string xPropertiesString = getXProperties(xPurchae.getXProperties());

        CallLogRevenue(xPurchae.getOrderNo(), xPurchae.getRevenueType(), xPurchae.getCurrency(), productsString, xPropertiesString);
    }
コード例 #2
0
    public static string xPurchaseObjectToDictionary(XPurchase xPurchase)
    {
        Dictionary <string, object> dictionary = new Dictionary <string, object>();

        dictionary.Add("ordNo", xPurchase.getOrderNo());
        dictionary.Add("eventType", xPurchase.getRevenueType());
        dictionary.Add("curcy", xPurchase.getCurrency());
        dictionary.Add("product", getProductList(xPurchase.getProductList()));
        dictionary.Add("properties", getXProperties(xPurchase.getXProperties()));
        string json = Serializer.Serialize(dictionary);

        Debug.Log("xPurchase json string : " + json);
        return(json);
    }