Exemplo n.º 1
0
    private void onTransactionFailed(string array)
    {
        string[] data;
        data = array.Split("|" [0]);

        string prodcutId = data [0];
        int    e         = System.Convert.ToInt32(data [2]);
        IOSTransactionErrorCode erroCode = (IOSTransactionErrorCode)e;


        SendTransactionFailEvent(prodcutId, data [1], erroCode);
    }
            public void onTransactionFailed(string message)
            {
                string[] data;
                data = message.Split("|" [0]);

                string prodcutId = data [0];
                int    e         = System.Convert.ToInt32(data [2]);
                IOSTransactionErrorCode erroCode = (IOSTransactionErrorCode)e;

                if (erroCode == IOSTransactionErrorCode.SKErrorPaymentCanceled)
                {
                    StansAssetsGrowIntegration.instance.OnMarketPurchaseCancelled(prodcutId);
                }
                else
                {
                    StansAssetsGrowIntegration.instance.OnMarketPurchaseFailed();
                }

                DelegateMessage(message);
            }
    private void SendTransactionFailEvent(string productIdentifier, string errorDescribtion, IOSTransactionErrorCode errorCode)
    {
        IOSStoreKitResponse response = new IOSStoreKitResponse();

        response.productIdentifier = productIdentifier;
        response.state             = InAppPurchaseState.Failed;


        response.error             = new IOSStoreKitError();
        response.error.description = errorDescribtion;
        response.error.code        = errorCode;



        dispatch(TRANSACTION_COMPLETE, response);
        OnTransactionComplete(response);
    }
Exemplo n.º 4
0
    private void SendTransactionFailEvent(string productIdentifier, string errorDescribtion, IOSTransactionErrorCode errorCode)
    {
        IOSStoreKitResult response = new IOSStoreKitResult(productIdentifier, new SA.Common.Models.Error((int)errorCode, errorDescribtion));

        OnTransactionComplete(response);
    }