1 package com.dotmarketing.util; 2 3 import org.apache.commons.lang.builder.ToStringBuilder; 4 5 public class CreditCardProcessorResponse { 6 private String avs; 7 8 private String ordernum; 9 10 private String error; 11 12 private String approved; 13 14 private String code; 15 16 private String message; 17 18 private String time; 19 20 private String ref; 21 22 private String tdate; 23 24 private String score; 25 26 public boolean orderApproved() { 27 return approved.trim().toUpperCase().equals("APPROVED"); 28 } 29 30 public CreditCardProcessorResponse(String approved, String avs, 31 String code, String error, String message, String ordernum, 32 String ref, String score, String tdate, String time) { 33 super(); 34 this.approved = approved; 35 this.avs = avs; 36 this.code = code; 37 this.error = error; 38 this.message = message; 39 this.ordernum = ordernum; 40 this.ref = ref; 41 this.score = score; 42 this.tdate = tdate; 43 this.time = time; 44 } 45 46 51 public String getApproved() { 52 return approved; 53 } 54 55 64 public String getAvs() { 65 return avs; 66 } 67 68 72 public String getCode() { 73 return code; 74 } 75 76 80 public String getError() { 81 return error; 82 } 83 84 88 public String getMessage() { 89 return message; 90 } 91 92 96 public String getOrdernum() { 97 return ordernum; 98 } 99 100 104 public String getRef() { 105 return ref; 106 } 107 108 116 public String getTdate() { 117 return tdate; 118 } 119 120 124 public String getTime() { 125 return time; 126 } 127 128 135 public String getScore() { 136 return score; 137 } 138 139 @Override  140 public String toString() { 141 return ToStringBuilder.reflectionToString(this); 142 } 143 144 145 } 146
| Popular Tags
|