Beispiel #1
0
    private void checkExecutePaymentAPI_Response()
    {
        ExecutePaymentAPI_Call executePaymentAPI_Call = this.gameObject.GetComponent <ExecutePaymentAPI_Call>();

        if (executePaymentAPI_Call != null && executePaymentAPI_Call.API_SuccessResponse != null && executePaymentAPI_Call.API_SuccessResponse.state == "approved")
        {
            transitionToSuccess();
        }

        if (executePaymentAPI_Call != null && executePaymentAPI_Call.API_SuccessResponse != null && executePaymentAPI_Call.API_SuccessResponse.state == "failed")
        {
            transitionToFailure();
        }
    }
Beispiel #2
0
    private void pollPayPalExecutePaymentAPI()
    {
        ExecutePaymentAPI_Call lastAPIcall = this.GetComponent <ExecutePaymentAPI_Call>();

        if (lastAPIcall != null)
        {
            Destroy(lastAPIcall);
        }

        ExecutePaymentAPI_Call apiCall = this.gameObject.AddComponent <ExecutePaymentAPI_Call>();

        apiCall.accessToken = accessToken;
        apiCall.paymentID   = payID;
        apiCall.payerID     = GetComponent <ShowPaymentAPI_Call>().API_SuccessResponse.payer.payer_info.payer_id;
    }
Beispiel #3
0
    private void pollPayPalExecutePaymentAPI()
    {
        ExecutePaymentAPI_Call lastAPIcall = this.GetComponent <ExecutePaymentAPI_Call> ();

        if (lastAPIcall == null)
        {
            Debug.Log("no previous call exists");
        }
        else
        {
            Debug.Log("not yet verified");
            Destroy(lastAPIcall);
        }

        Debug.Log("creating new api call");
        ExecutePaymentAPI_Call apiCall = this.gameObject.AddComponent <ExecutePaymentAPI_Call> ();

        apiCall.accessToken = accessToken;
        apiCall.paymentID   = payID;
        apiCall.payerID     = GetComponent <ShowPaymentAPI_Call> ().API_SuccessResponse.payer.payer_info.payer_id;
    }