| Line 308... |
Line 308... |
| 308 |
cpo.setAmount(createRechargeRequest.getRechargeAmount());
|
308 |
cpo.setAmount(createRechargeRequest.getRechargeAmount());
|
| 309 |
pp.add(cpo);
|
309 |
pp.add(cpo);
|
| 310 |
rr.setPaymentOptions(pp);
|
310 |
rr.setPaymentOptions(pp);
|
| 311 |
return rr;
|
311 |
return rr;
|
| 312 |
}
|
312 |
}
|
| 313 |
@RequestMapping(value = ProfitMandiConstants.URL_CREATE_RECHARGE , method=RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
|
- |
|
| 314 |
@ApiImplicitParams({
|
- |
|
| 315 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token",
|
- |
|
| 316 |
required = true, dataType = "string", paramType = "header")
|
- |
|
| 317 |
})
|
- |
|
| 318 |
|
313 |
|
| 319 |
@PostConstruct
|
314 |
@PostConstruct
|
| 320 |
private void setRechargeCredentials() {
|
315 |
private void setRechargeCredentials() {
|
| 321 |
rechargeTransactionMobileCredential = new RechargeCredential();
|
316 |
rechargeTransactionMobileCredential = new RechargeCredential();
|
| 322 |
rechargeTransactionMobileCredential.setRechargeUrl(thinkWalnutDigitalRechargeTransactionMobileUrl);
|
317 |
rechargeTransactionMobileCredential.setRechargeUrl(thinkWalnutDigitalRechargeTransactionMobileUrl);
|
| Line 329... |
Line 324... |
| 329 |
rechargeTransactionDthCredential.setRechargeUserName(thinkWalnutDigitalRechargeTransactionDthUserName);
|
324 |
rechargeTransactionDthCredential.setRechargeUserName(thinkWalnutDigitalRechargeTransactionDthUserName);
|
| 330 |
rechargeTransactionDthCredential.setRechargePassword(thinkWalnutDigitalRechargeTransactionDthPassword);
|
325 |
rechargeTransactionDthCredential.setRechargePassword(thinkWalnutDigitalRechargeTransactionDthPassword);
|
| 331 |
rechargeTransactionDthCredential.setRechargeAuthKey(thinkWalnutDigitalRechargeAuthKey);
|
326 |
rechargeTransactionDthCredential.setRechargeAuthKey(thinkWalnutDigitalRechargeAuthKey);
|
| 332 |
}
|
327 |
}
|
| 333 |
|
328 |
|
| - |
|
329 |
@RequestMapping(value = ProfitMandiConstants.URL_CREATE_RECHARGE , method=RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
|
| 334 |
|
330 |
@ApiImplicitParams({
|
| - |
|
331 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token",
|
| - |
|
332 |
required = true, dataType = "string", paramType = "header")
|
| 335 |
|
333 |
})
|
| 336 |
|
334 |
|
| 337 |
public ResponseEntity<?> createRecharge(HttpServletRequest request, @RequestBody CreateRechargeRequest createRechargeRequest)
|
335 |
public ResponseEntity<?> createRecharge(HttpServletRequest request, @RequestBody CreateRechargeRequest createRechargeRequest)
|
| 338 |
throws ProfitMandiBusinessException{
|
336 |
throws ProfitMandiBusinessException{
|
| 339 |
int userId = (int)request.getAttribute(ProfitMandiConstants.USER_ID);
|
337 |
int userId = (int)request.getAttribute(ProfitMandiConstants.USER_ID);
|
| 340 |
int retailerId = userAccountRepository.selectRetailerIdByUserId(userId);
|
338 |
int retailerId = userAccountRepository.selectRetailerIdByUserId(userId);
|
| Line 428... |
Line 426... |
| 428 |
Optional::get)));
|
426 |
Optional::get)));
|
| 429 |
|
427 |
|
| 430 |
return responseSender.ok(commissionMap.values());
|
428 |
return responseSender.ok(commissionMap.values());
|
| 431 |
}
|
429 |
}
|
| 432 |
|
430 |
|
| 433 |
@RequestMapping(value = ProfitMandiConstants.URL_RECHARGE_RESULT , method=RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
|
- |
|
| 434 |
@ApiImplicitParams({
|
- |
|
| 435 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token",
|
- |
|
| 436 |
required = true, dataType = "string", paramType = "header")
|
- |
|
| 437 |
})
|
- |
|
| 438 |
|
- |
|
| 439 |
@PostConstruct
|
431 |
@PostConstruct
|
| 440 |
private void setRechargeEnquiryCredentials() {
|
432 |
private void setRechargeEnquiryCredentials() {
|
| 441 |
thinkWalnutDigitalRechargeEnquiryCredential = new RechargeCredential();
|
433 |
thinkWalnutDigitalRechargeEnquiryCredential = new RechargeCredential();
|
| 442 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeUrl(thinkWalnutDigitalRechargeEnquiryUrl);
|
434 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeUrl(thinkWalnutDigitalRechargeEnquiryUrl);
|
| 443 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeUserName(thinkWalnutDigitalRechargeEnquiryUserName);
|
435 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeUserName(thinkWalnutDigitalRechargeEnquiryUserName);
|
| 444 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargePassword(thinkWalnutDigitalRechargeEnquiryPassword);
|
436 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargePassword(thinkWalnutDigitalRechargeEnquiryPassword);
|
| 445 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeAuthKey(thinkWalnutDigitalRechargeAuthKey);
|
437 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeAuthKey(thinkWalnutDigitalRechargeAuthKey);
|
| 446 |
}
|
438 |
}
|
| - |
|
439 |
|
| - |
|
440 |
@RequestMapping(value = ProfitMandiConstants.URL_RECHARGE_RESULT , method=RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
|
| - |
|
441 |
@ApiImplicitParams({
|
| - |
|
442 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token",
|
| - |
|
443 |
required = true, dataType = "string", paramType = "header")
|
| - |
|
444 |
})
|
| - |
|
445 |
|
| - |
|
446 |
|
| 447 |
public ResponseEntity<?> rechargeResult(HttpServletRequest request, @RequestParam(value="requestId") String requestId ) throws ProfitMandiBusinessException{
|
447 |
public ResponseEntity<?> rechargeResult(HttpServletRequest request, @RequestParam(value="requestId") String requestId ) throws ProfitMandiBusinessException{
|
| 448 |
RechargeOrder rechargeOrder = null;
|
448 |
RechargeOrder rechargeOrder = null;
|
| 449 |
RechargeResultPojo rrp = null;
|
449 |
RechargeResultPojo rrp = null;
|
| 450 |
|
450 |
|
| 451 |
|
451 |
|