Subversion Repositories SmartDukaan

Rev

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

Rev 3616 Rev 3649
Line 160... Line 160...
160
		
160
		
161
		paymentHandler.updatePayment(payment, attrMap);
161
		paymentHandler.updatePayment(payment, attrMap);
162
		return true;
162
		return true;
163
	}
163
	}
164
 
164
 
-
 
165
	/**
-
 
166
	 * Creates a ticket in CRM tool for each customer whose payment got failed.
-
 
167
	 * Later, CRM agents follow-up with the users and try making a sale.
-
 
168
	 *
-
 
169
	 * We swallow the exceptions raised and just log them at error level. This is
-
 
170
	 * done to not make Website unaffected by any CRM related issues.
-
 
171
	 *
165
	// Creates tickets for payment failures in CRM
172
	 * @param payment  the payment object that failed.
-
 
173
	 */
166
	private void createTicketForFailedPayment(in.shop2020.payment.domain.Payment payment) {
174
	private void createTicketForFailedPayment(in.shop2020.payment.domain.Payment payment) {
167
        try {
175
        try {
168
            Client crmClient = new CRMClient().getClient();
176
            Client crmClient = new CRMClient().getClient();
-
 
177
 
-
 
178
            // This call is aync (oneway). This ensures that website response
-
 
179
            // is sent in time.
169
            crmClient.processPaymentFailure(payment.getUserId());
180
            crmClient.processPaymentFailure(payment.getUserId());
170
        } catch (TTransportException e) {
181
        } catch (TTransportException e) {
171
            logger.error("Could not create CRM client", e);
182
            logger.error("Could not create CRM client", e);
172
        } catch (TException e) {
183
        } catch (TException e) {
173
            logger.error("Could not process paymentId: " + payment.getId(), e);
184
            logger.error("Could not process paymentId: " + payment.getId(), e);