Subversion Repositories SmartDukaan

Rev

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

Rev 4207 Rev 5387
Line 65... Line 65...
65
    private String rtgsBranch;
65
    private String rtgsBranch;
66
    private String ifscCode;
66
    private String ifscCode;
67
    private String amount;
67
    private String amount;
68
    private String itemId;
68
    private String itemId;
69
    private String output;
69
    private String output;
-
 
70
    private String selfPickup;
70
    private Transaction transaction;
71
    private Transaction transaction;
71
    private Payment payment;
72
    private Payment payment;
72
 
73
 
73
    private Map<Transaction, Double> transactions;
74
    private Map<Transaction, Double> transactions;
74
    private List<LineItem> lineItems;
75
    private List<LineItem> lineItems;
Line 155... Line 156...
155
            if (user == null) {
156
            if (user == null) {
156
                addActionError("Could not find user by email: " + customerEmailId);
157
                addActionError("Could not find user by email: " + customerEmailId);
157
                hasError = true;
158
                hasError = true;
158
            }
159
            }
159
            else {
160
            else {
-
 
161
            	boolean selfPickupFlag = false;
-
 
162
            	if(selfPickup.equals("on")){
-
 
163
            		selfPickupFlag = true;
-
 
164
            	}
160
                transactionId = String.valueOf(createTransaction(user));
165
                transactionId = String.valueOf(createTransaction(user));
161
                createPayment(user);
166
                createPayment(user);
162
 
167
 
163
                Client transactionClient = new TransactionClient().getClient();
168
                Client transactionClient = new TransactionClient().getClient();
164
                transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.AUTHORIZED, "Payment received for the order");
169
                transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.AUTHORIZED, "Payment received for the order", selfPickupFlag);
165
                transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.IN_PROCESS, "RTGS Payment accepted");
170
                transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.IN_PROCESS, "RTGS Payment accepted", selfPickupFlag);
166
                log.info("Successfully created transaction: " + transactionId + " for amount: " + amount);
171
                log.info("Successfully created transaction: " + transactionId + " for amount: " + amount);
167
            }
172
            }
168
        } catch (UserContextException e) {
173
        } catch (UserContextException e) {
169
            addActionError("Error while finding customer: " + customerEmailId);
174
            addActionError("Error while finding customer: " + customerEmailId);
170
            log.error("Could not fetch user for email Id: " + customerEmailId, e);
175
            log.error("Could not fetch user for email Id: " + customerEmailId, e);
Line 428... Line 433...
428
    }
433
    }
429
 
434
 
430
    public void setOutput(String output) {
435
    public void setOutput(String output) {
431
        this.output = output;
436
        this.output = output;
432
    }
437
    }
-
 
438
 
-
 
439
	public void setSelfPickup(String selfPickup) {
-
 
440
		this.selfPickup = selfPickup;
-
 
441
	}
-
 
442
 
-
 
443
	public String getSelfPickup() {
-
 
444
		return selfPickup;
-
 
445
	}
433
}
446
}