Subversion Repositories SmartDukaan

Rev

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

Rev 3224 Rev 4246
Line 116... Line 116...
116
			this.redirectUrl = errorUrl + "?paymentId=" + merchantPaymentId;
116
			this.redirectUrl = errorUrl + "?paymentId=" + merchantPaymentId;
117
			return "index";
117
			return "index";
118
		}
118
		}
119
 
119
 
120
		if(gatewayTxnStatus.equals("0")){
120
		if(gatewayTxnStatus.equals("0")){
121
			//Update payment status as authorized
121
			//Update payment status as authorized if payment is authorized.
122
			try {
122
			try {
123
				paymentServiceClient.getClient().updatePaymentDetails(merchantPaymentId, gatewayPaymentId,
123
				paymentServiceClient.getClient().updatePaymentDetails(merchantPaymentId, gatewayPaymentId,
124
						"", gatewayTxnStatus, description, "", "", "", "", PaymentStatus.AUTHORIZED, "", attributes);
124
						"", gatewayTxnStatus, description, "", "", "", "", PaymentStatus.AUTHORIZED, "", attributes);
125
			} catch (PaymentException e) {
125
			} catch (PaymentException e) {
126
				log.error("Unable to mark the payment as authorized", e);
126
				log.error("Unable to mark the payment as authorized", e);
127
			} catch (TException e) {
127
			} catch (TException e) {
128
			    log.error("Unable to mark the payment as authorized", e);
128
			    log.error("Unable to mark the payment as authorized", e);
129
			}
129
			}
130
 
130
 
-
 
131
			if(isFlagged.equals("YES")){
131
			CommonPaymentService.processSuccessfulTxn(txnId, userServiceClient, transactionServiceClient);
132
				CommonPaymentService.processSuccessfulTxn(txnId, userServiceClient, transactionServiceClient, true);
132
            this.redirectUrl = successUrl + "?paymentId=" + merchantPaymentId;
133
	            this.redirectUrl = successUrl + "?paymentId=" + merchantPaymentId;
-
 
134
			}else{
-
 
135
				CommonPaymentService.processSuccessfulTxn(txnId, userServiceClient, transactionServiceClient, false);
-
 
136
	            this.redirectUrl = successUrl + "?paymentId=" + merchantPaymentId;	
-
 
137
			}
-
 
138
 
-
 
139
			
133
			
140
			
134
//			Map<String, String> captureResult = EbsPaymentService.capturePayment(payment, gatewayPaymentId);
141
//			Map<String, String> captureResult = EbsPaymentService.capturePayment(payment, gatewayPaymentId);
135
//			String captureStatus = captureResult.get(IPaymentService.STATUS);
142
//			String captureStatus = captureResult.get(IPaymentService.STATUS);
136
//
143
//
137
//			if("".equals(captureStatus)){
144
//			if("".equals(captureStatus)){