| | 11 | public PlatnosciEcard Payment { get; set; } |
| | 12 | public string SystemKsiegowy { get; set; } |
| | 13 | public string Hash { get; set; } |
| | 14 | public string LinkFail { get; set; } |
| | 15 | public string LinkOk { get; set; } |
| | 16 | public string Error {get; set;} |
| | 17 | |
| | 18 | public void IsValid() |
| | 19 | { |
| | 20 | if (Payment == null) Error = "payment"; |
| | 21 | else if (Payment != null) |
| | 22 | { |
| | 23 | if (Payment.AMOUNT == null) Error = "amount"; |
| | 24 | else if (Payment.AUTODEPOSIT != true) Error = "autodeposit"; |
| | 25 | else if (String.IsNullOrEmpty(Payment.ORDERDESCRIPTION)) Error = "orderdescription"; |
| | 26 | else if (String.IsNullOrEmpty(Payment.CURRENCY)) Error = "currency"; |
| | 27 | else if (String.IsNullOrEmpty(Payment.NAME)) Error = "name"; |
| | 28 | else if (String.IsNullOrEmpty(Payment.SURNAME)) Error = "surname"; |
| | 29 | else if (String.IsNullOrEmpty(Payment.LANGUAGE)) Error = "language"; |
| | 30 | else if (Payment.ORDERNUMBER < 1) Error = "ordernumber"; |
| | 31 | } |
| | 32 | else if (Hash == BAD_HASH || Hash == "" || Hash == HASH_ERROR_INFO) Error = "hash"; |
| | 33 | else if (String.IsNullOrEmpty(Id)) Error = "id"; |
| | 34 | else if (String.IsNullOrEmpty(Password)) Error = "password"; |
| | 35 | else if (String.IsNullOrEmpty(Hash)) Error = "hash"; |
| | 36 | else if (String.IsNullOrEmpty(LinkFail)) Error = "linkfail"; |
| | 37 | else if (String.IsNullOrEmpty(LinkOk)) Error = "linkok"; |
| | 38 | } |