Subversion Repositories SmartDukaan

Rev

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

Rev 9416 Rev 12653
Line 74... Line 74...
74
    private String itemId;
74
    private String itemId;
75
    private String output;
75
    private String output;
76
    private String pickUp;
76
    private String pickUp;
77
    private String orderType;
77
    private String orderType;
78
    private String tinNumber;
78
    private String tinNumber;
-
 
79
    private String poRefNumber;
79
    private int productCondition;
80
    private int productCondition;
80
    private int taxType;
81
    private int taxType;
81
    private Transaction transaction;
82
    private Transaction transaction;
82
    private Payment payment;
83
    private Payment payment;
83
 
84
 
Line 178... Line 179...
178
                createPayment(user);
179
                createPayment(user);
179
                
180
                
180
                in.shop2020.model.v1.order.Attribute orderAttribute = new in.shop2020.model.v1.order.Attribute();
181
                in.shop2020.model.v1.order.Attribute orderAttribute = new in.shop2020.model.v1.order.Attribute();
181
                orderAttribute.setName("tinNumber");
182
                orderAttribute.setName("tinNumber");
182
                orderAttribute.setValue(tinNumber);
183
                orderAttribute.setValue(tinNumber);
-
 
184
                
-
 
185
                in.shop2020.model.v1.order.Attribute orderAttribute1 = new in.shop2020.model.v1.order.Attribute();
-
 
186
                orderAttribute1.setName("poRefNumber");
-
 
187
                orderAttribute1.setValue(poRefNumber);
183
 
188
 
184
                Client transactionClient = new TransactionClient().getClient();
189
                Client transactionClient = new TransactionClient().getClient();
185
                if(!tinNumber.equals("") && !(tinNumber == null)) {
190
                if(!tinNumber.equals("") && !(tinNumber == null)) {
186
                    transactionClient.setOrderAttributeForTransaction(Long.parseLong(transactionId), orderAttribute);
191
                    transactionClient.setOrderAttributeForTransaction(Long.parseLong(transactionId), orderAttribute);
187
                }
192
                }
-
 
193
                if(!poRefNumber.equals("") && !(poRefNumber == null)) {
-
 
194
                    transactionClient.setOrderAttributeForTransaction(Long.parseLong(transactionId), orderAttribute1);
-
 
195
                }
188
                transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.AUTHORIZED, "Payment received for the order", PickUpType.valueOf(pickUp).getValue(), OrderType.valueOf(orderType), OrderSource.WEBSITE);
196
                transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.AUTHORIZED, "Payment received for the order", PickUpType.valueOf(pickUp).getValue(), OrderType.valueOf(orderType), OrderSource.WEBSITE);
189
                transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.IN_PROCESS, "RTGS Payment accepted", PickUpType.valueOf(pickUp).getValue(), OrderType.valueOf(orderType), OrderSource.WEBSITE);
197
                transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.IN_PROCESS, "RTGS Payment accepted", PickUpType.valueOf(pickUp).getValue(), OrderType.valueOf(orderType), OrderSource.WEBSITE);
190
                log.info("Successfully created transaction: " + transactionId + " for amount: " + amount);
198
                log.info("Successfully created transaction: " + transactionId + " for amount: " + amount);
191
            }
199
            }
192
        } catch (UserContextException e) {
200
        } catch (UserContextException e) {
Line 496... Line 504...
496
	}
504
	}
497
 
505
 
498
	public void setTaxType(int taxType) {
506
	public void setTaxType(int taxType) {
499
		this.taxType = taxType;
507
		this.taxType = taxType;
500
	}
508
	}
-
 
509
	
-
 
510
	public String getPoRefNumber() {
-
 
511
		return poRefNumber;
-
 
512
	}
-
 
513
 
-
 
514
	public void setPoRefNumber(String poRefNumber) {
-
 
515
		this.poRefNumber = poRefNumber;
-
 
516
	}
-
 
517
 
-
 
518
	public static void main(String[] args) {
-
 
519
		BulkOrderController blc = new BulkOrderController();
-
 
520
		blc.setCustomerEmailId("neavins@amazon.com");
-
 
521
		blc.setRtgsId("rtgsId");
-
 
522
		blc.setRtgsBank("rtgsBank");
-
 
523
		blc.setRtgsBranch("rtgsBranch");
-
 
524
		blc.setIfscCode("ifscCode");
-
 
525
		blc.setAmount("3400");
-
 
526
		blc.setItemId("10661");
-
 
527
		//blc.setOutput();
-
 
528
		blc.setPickUp("COURIER");
-
 
529
		blc.setOrderType("B2Cbulk");
-
 
530
		//blc.setTinNumber();
-
 
531
		blc.setProductCondition(0);
-
 
532
		blc.setTaxType(0);
-
 
533
		
-
 
534
		
-
 
535
		blc.index();
-
 
536
		/*
-
 
537
		 * = "ifscCode";
-
 
538
    private static final String RTGS_BRANCH = "rtgsBranch";
-
 
539
    private static final String RTGS_BANK   = "rtgsBank";
-
 
540
    private static final String RTGS_ID     = "rtgsId";
-
 
541
		 * private String customerEmailId;
-
 
542
	    private String rtgsId;
-
 
543
	    private String rtgsBank;
-
 
544
	    private String rtgsBranch;
-
 
545
	    private String ifscCode;
-
 
546
	    private String amount;
-
 
547
	    private String itemId;
-
 
548
	    private String output;
-
 
549
	    private String pickUp;
-
 
550
	    private String orderType;
-
 
551
	    private String tinNumber;
-
 
552
	    private int productCondition;
-
 
553
	    private int taxType;*/
-
 
554
		//blc.set
-
 
555
	}
501
    
556
    
502
}
557
}