internal PayzaTransactionResponse(PayzaAccount usedAccount) { UsedAccount = usedAccount; Note = RawResponse = "Error getting response from Payza. Marked as successful."; ReferenceNumber = "X"; IsSuccess = true; }
internal PayzaTransactionResponse(PayzaAccount usedAccount, NameValuePairs response) { RawResponse = response.ToString(); UsedAccount = usedAccount; try { string refNo; response.TryGetValue("REFERENCENUMBER", out refNo); ReferenceNumber = refNo; ReturnCode = Convert.ToInt32(response["RETURNCODE"]); Note = response["DESCRIPTION"]; IsTestMode = response["TESTMODE"] == "1"; } catch (Exception e) { ErrorLogger.Log(e); } IsSuccess = (ReturnCode == SuccessCode); }