| Line 82... |
Line 82... |
| 82 |
trialForm.setStatus(ProfitMandiConstants.Status.PENDING);
|
82 |
trialForm.setStatus(ProfitMandiConstants.Status.PENDING);
|
| 83 |
trialForm.setCreatedOn(LocalDateTime.now());
|
83 |
trialForm.setCreatedOn(LocalDateTime.now());
|
| 84 |
trialOnboardingRepository.persist(trialForm);
|
84 |
trialOnboardingRepository.persist(trialForm);
|
| 85 |
trialService.sentMailToTrialUser(trialForm);
|
85 |
trialService.sentMailToTrialUser(trialForm);
|
| 86 |
trialService.sentMailForTrialUser(trialForm);
|
86 |
trialService.sentMailForTrialUser(trialForm);
|
| - |
|
87 |
// Add-on: mirror the trial into lead management + notify BGC L2/L3
|
| - |
|
88 |
// (tarun.verma@ + kamini.sharma@ on CC). Runs in its own REQUIRES_NEW
|
| - |
|
89 |
// transaction and the call is wrapped here too — so no failure in this
|
| - |
|
90 |
// add-on can ever affect the trial registration response.
|
| - |
|
91 |
try {
|
| - |
|
92 |
trialService.createLeadAndNotifyBgcForTrial(trialForm);
|
| - |
|
93 |
} catch (Exception addonErr) {
|
| - |
|
94 |
logger.error("Trial add-on (Lead + BGC mail) failed for mobile=" + trialForm.getMobile(), addonErr);
|
| - |
|
95 |
}
|
| 87 |
return responseSender.ok(trialForm);
|
96 |
return responseSender.ok(trialForm);
|
| 88 |
|
97 |
|
| 89 |
} catch (Exception e) {
|
98 |
} catch (Exception e) {
|
| 90 |
e.printStackTrace();
|
99 |
e.printStackTrace();
|
| 91 |
return responseSender.internalServerError("Registration failed: " + e.getMessage());
|
100 |
return responseSender.internalServerError("Registration failed: " + e.getMessage());
|