Skip to content

Instantly share code, notes, and snippets.

@gladiatorAsh
Created May 18, 2016 11:05
Show Gist options
  • Save gladiatorAsh/a6d7d3d289b1743f006669d564a67e37 to your computer and use it in GitHub Desktop.
Save gladiatorAsh/a6d7d3d289b1743f006669d564a67e37 to your computer and use it in GitHub Desktop.
public bool HasError()
{
int responseCode = (int)StatusCode;
return responseCode >= 400;
}
PaymentResponse response = _networking.SendRequest(request);
PaymentValidationResult result = PaymentValidationResult.Success;
if (response.StatusCode.Is(400))
{
result = PaymentValidationResult.Failure;
}
else if (response.HasError())
{
result = PaymentValidationResult.Error;
}
return result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment