How to make paypal api calls for IOS deploy?
I get this error trying to get accestoken from Paypal in the IOS deploy while in any other it works.
HTTP load failed (error code: -999 [1:89]) for Task . > WWW Error: The operation couldn’t be > completed. (NSURLErrorDomain error > -1012.) UnityEngine.DebugLogHandler:Internal_Log(LogType, > String, Object) > UnityEngine.DebugLogHandler:LogFormat(LogType, > Object, String, Object[]) > UnityEngine.Debug:LogException(Exception) > UnityEngine.Logger:Log(LogType, > Object) > System.Collections.ObjectModel.Collection`1:Remove(T) > UnityEngine.Debug:Log(Object) > c__Iterator0:MoveNext() > UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, > IntPtr)
You can test with clientID and secret
string clientID = "AYDK0o1OoZ2KwlzKELb7FabVtPBhEFOoHJVxWZlzCKFQIszSqOOpsysSa1KnbZky6-AOtbv8gf5HIZUW";
string secret = "EBahyWiumNukGFtgW-DE-DXsoYKXbsk8rLAwU_iOaqwmus2Bv8ETmgE_4SFmEU0aurIizeOSZCWmW9Sd";
Dictionary headers = new Dictionary();
headers.Add("Accept","application/json");
headers.Add("Accept-Language","en_US");
headers.Add("Authorization","Basic " + System.Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes( clientID + ":" + secret)));
WWWForm postData = new WWWForm();
postData.AddField("grant_type", "client_credentials");
string endpointURL = StoreProperties.INSTANCE.isUsingSandbox () ?
"https://api.sandbox.paypal.com/v1/oauth2/token" :
"https://api.paypal.com/v1/oauth2/token";
WWW www = new WWW(endpointURL, postData.data,headers);
Debug.Log("Making call to: " + endpointURL);
yield return www;
Answer by digiteyezer · Feb 13, 2018 at 03:02 PM
same error...code is working fine on android & desktop but not iOS...