Beispiel #1
0
    private void checkAPI_Response()
    {
        ShowPaymentAPI_Call lastAPIcall = GetComponent <ShowPaymentAPI_Call>();

        if (lastAPIcall != null && lastAPIcall.API_SuccessResponse != null && lastAPIcall.API_SuccessResponse.payer.status == "VERIFIED")
        {
            CancelInvoke("pollPayPalShowPaymentAPI");
            transitionToVerified();
        }
    }
Beispiel #2
0
    private void pollPayPalShowPaymentAPI()
    {
        ShowPaymentAPI_Call lastAPIcall = this.GetComponent <ShowPaymentAPI_Call>();

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

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

        apiCall.accessToken = accessToken;
        apiCall.payID       = payID;
    }
Beispiel #3
0
    private void pollPayPalShowPaymentAPI()
    {
        ShowPaymentAPI_Call lastAPIcall = this.GetComponent <ShowPaymentAPI_Call> ();

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

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

        apiCall.accessToken = accessToken;
        apiCall.payID       = payID;
    }