Subversion Repositories SmartDukaan

Rev

Rev 2118 | Rev 2157 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2118 Rev 2134
Line 219... Line 219...
219
	
219
	
220
	public String getId() {
220
	public String getId() {
221
		return id;
221
		return id;
222
	}
222
	}
223
 
223
 
224
	private boolean validatePaymentParams(double amount, Payment payment){
224
	private boolean validatePaymentParams(double returnedAmount, Payment payment){
225
		if(payment==null || payment.getAmount()!= amount){
225
		if(!(payment != null && Math.abs(payment.getAmount() - returnedAmount) <= 0.50)){
226
			// We did not request this payment or the authorised amount is different.
226
			// We did not request this payment or the authorised amount is different.
227
			log.error("Checks and balance failed on returned data");
227
			log.error("Checks and balance failed on returned data");
228
			return false;
228
			return false;
229
		}
229
		}
230
		return true;
230
		return true;