Paypal on Unity not work in ios platform

thanhpt19
New Community Member

I am integrating Paypal into my Unity Game and use REST API method to authenticate.My code in this below:

 

WWWForm postData = new WWWForm();
postData.AddField("grant_type", "client_credentials");
string endpointURL ="https://api.sandbox.paypal.com/v1/oauth2/token";
UnityWebRequest www = UnityWebRequest.Post(endpointURL, postData);
www.SetRequestHeader("Accept", "application/json");
www.SetRequestHeader("Accept-Language", "en_US");
www.SetRequestHeader("Authorization", "Basic " + System.Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(clientID + ":" + secrect)));
Debug.Log("Making call to: " + endpointURL);
yield return www.SendWebRequest();
if (www.error == null)
{
Debug.Log("WWW Ok! Full Text: " + www.downloadHandler.text);
}
else
{
Debug.Log("WWW Error: " + www.error);
}
I built release and installed on android device and it works perfectly!.But it's not work on IOS platform. I got the UNKNOWN ERROR on iPhone 6 Plus(ios version 12.1.2). I was try change the enviroment from SANDBOX to LIVE but still not work. I spent two weeks to resolve this issues,but i am stuck in here.Please help me!

Login to Me Too
2 REPLIES 2

Fieromus
New Community Member

Did you manage to solve this in the end? 😞

Login to Me Too

esportslabs
Contributor
Contributor

I have the same problem, still didn't resolve it. If somebody has any solution or reason why it's not working, please post something about it.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.