Created
May 18, 2016 11:05
-
-
Save gladiatorAsh/a6d7d3d289b1743f006669d564a67e37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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