Subversion Repositories SmartDukaan

Rev

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

Rev 2157 Rev 2183
Line 150... Line 150...
150
				} catch (PaymentException e) {
150
				} catch (PaymentException e) {
151
					log.error("Error while updating failed capture payment attempt: ", e);
151
					log.error("Error while updating failed capture payment attempt: ", e);
152
				} catch (TException e) {
152
				} catch (TException e) {
153
					log.error("Error while updating failed capture payment attempt: ", e);
153
					log.error("Error while updating failed capture payment attempt: ", e);
154
				}
154
				}
155
				DataLogger.logData(Event.PAYMENT_FAILURE.name(), Long.toString(userinfo.getUserId()), userinfo.getEmail(), Long.toString(merchantPaymentId), gatewayPaymentId,
155
				DataLogger.logData(Event.PAYMENT_FAILURE.name(), session.getId(), Long.toString(userinfo.getUserId()), userinfo.getEmail(), Long.toString(merchantPaymentId), gatewayPaymentId,
156
                        gatewayTxnStatus, description, errorCode);
156
                        gatewayTxnStatus, description, errorCode);
157
				this.redirectUrl = errorUrl + "?paymentId=" + merchantPaymentId;
157
				this.redirectUrl = errorUrl + "?paymentId=" + merchantPaymentId;
158
			}else{
158
			}else{
159
				//Success
159
				//Success
160
				try {
160
				try {
Line 170... Line 170...
170
				}
170
				}
171
				
171
				
172
				CommonPaymentService.processSuccessfulTxn(txnId, userServiceClient, transactionServiceClient);
172
				CommonPaymentService.processSuccessfulTxn(txnId, userServiceClient, transactionServiceClient);
173
 
173
 
174
				CommonPaymentService.sendTxnEmail(txnId, transactionServiceClient);
174
				CommonPaymentService.sendTxnEmail(txnId, transactionServiceClient);
175
				DataLogger.logData(Event.PAYMENT_SUCCESS.name(), Long.toString(userinfo.getUserId()), userinfo.getEmail(), Long.toString(merchantPaymentId), gatewayPaymentId,
175
				DataLogger.logData(Event.PAYMENT_SUCCESS.name(), session.getId(), Long.toString(userinfo.getUserId()), userinfo.getEmail(), Long.toString(merchantPaymentId), gatewayPaymentId,
176
                        gatewayTxnStatus, description, captureStatus);
176
                        gatewayTxnStatus, description, captureStatus);
177
				this.redirectUrl = successUrl + "?paymentId=" + merchantPaymentId;				
177
				this.redirectUrl = successUrl + "?paymentId=" + merchantPaymentId;				
178
			}
178
			}
179
		}else{
179
		}else{
180
			try {
180
			try {
Line 185... Line 185...
185
			} catch (TException e) {
185
			} catch (TException e) {
186
				e.printStackTrace();
186
				e.printStackTrace();
187
			}
187
			}
188
			
188
			
189
			CommonPaymentService.processFailedTxn(txnId, transactionServiceClient);
189
			CommonPaymentService.processFailedTxn(txnId, transactionServiceClient);
190
			DataLogger.logData(Event.PAYMENT_FAILURE.name(), Long.toString(userinfo.getUserId()), userinfo.getEmail(), Long.toString(merchantPaymentId), gatewayPaymentId,
190
			DataLogger.logData(Event.PAYMENT_FAILURE.name(), session.getId(), Long.toString(userinfo.getUserId()), userinfo.getEmail(), Long.toString(merchantPaymentId), gatewayPaymentId,
191
                    gatewayTxnStatus, description);
191
                    gatewayTxnStatus, description);
192
 
192
 
193
			this.redirectUrl = errorUrl + "?paymentId=" + merchantPaymentId;
193
			this.redirectUrl = errorUrl + "?paymentId=" + merchantPaymentId;
194
		}
194
		}
195
		
195