Subversion Repositories SmartDukaan

Rev

Rev 6536 | Rev 6601 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6050 anupam.sin 1
package in.shop2020.serving.controllers;
2
 
6091 anupam.sin 3
import in.shop2020.datalogger.EventType;
6050 anupam.sin 4
import in.shop2020.model.v1.order.OrderType;
5
import in.shop2020.model.v1.order.RechargeCoupon;
6
import in.shop2020.model.v1.order.RechargeOrder;
7
import in.shop2020.model.v1.order.RechargeOrderStatus;
6397 anupam.sin 8
import in.shop2020.model.v1.order.RechargePlan;
6050 anupam.sin 9
import in.shop2020.model.v1.order.RechargeType;
6057 anupam.sin 10
import in.shop2020.model.v1.order.UserWallet;
6050 anupam.sin 11
import in.shop2020.model.v1.user.User;
12
import in.shop2020.model.v1.user.UserContextException;
13
import in.shop2020.serving.utils.DesEncrypter;
14
import in.shop2020.serving.utils.Utils;
15
import in.shop2020.thrift.clients.HelperClient;
6433 anupam.sin 16
import in.shop2020.thrift.clients.PromotionClient;
6050 anupam.sin 17
import in.shop2020.thrift.clients.TransactionClient;
18
import in.shop2020.thrift.clients.UserClient;
6228 anupam.sin 19
import in.shop2020.utils.DataLogger;
6091 anupam.sin 20
import in.shop2020.utils.Mail;
6050 anupam.sin 21
 
6495 anupam.sin 22
import java.math.BigInteger;
6050 anupam.sin 23
import java.util.ArrayList;
6433 anupam.sin 24
import java.util.HashMap;
6050 anupam.sin 25
import java.util.List;
6433 anupam.sin 26
import java.util.Map;
6091 anupam.sin 27
import java.util.Random;
6050 anupam.sin 28
 
6495 anupam.sin 29
import javax.mail.internet.AddressException;
30
import javax.mail.internet.InternetAddress;
31
 
6249 anupam.sin 32
import nl.captcha.Captcha;
33
 
6050 anupam.sin 34
import org.apache.log4j.Logger;
35
import org.apache.struts2.convention.annotation.Result;
36
import org.apache.struts2.convention.annotation.Results;
37
import org.apache.thrift.TException;
38
import org.apache.thrift.transport.TTransportException;
39
 
40
@Results({
6228 anupam.sin 41
    @Result(name="recharge-pay-options-redirect", type="redirectAction", params = {"actionName" , "recharge-pay-options", "rechargeOrderId", "${rechargeOrderId}"}),
6103 amit.gupta 42
    @Result(name="create-recharge-redirect", type="redirectAction", params = {"actionName" , "wallet-only-payment", "rechargeOrderId", "${rechargeOrderId}"}),
6270 rajveer 43
    @Result(name="recharge-redirect", type="redirectAction", params = {"actionName" , "recharge", "error", "${errorMessage}"})
6050 anupam.sin 44
})
45
 
46
public class ConfirmController extends BaseController{
47
 
48
    /**
49
     * 
50
     */
51
    private static final long serialVersionUID = 1L;
6057 anupam.sin 52
    private long rechargeOrderId = 0;
6050 anupam.sin 53
    private String amount = "";
6086 anupam.sin 54
    private String walletAmountUsed = "0";
6050 anupam.sin 55
    private String operator = "";
56
    private String number = "";
57
    private String email = "";
58
    private String rechargeType = "";
59
    private DesEncrypter desEncrypter = new DesEncrypter("saholic");
60
    private List<String> couponIds = null;
61
    private List<RechargeCoupon> coupons = null;
6058 anupam.sin 62
    private String userId;
6057 anupam.sin 63
    private String message = "";
6249 anupam.sin 64
    private String errorMessage = "";
6070 anupam.sin 65
    private String totalAmount = "";
6178 anupam.sin 66
    private String plan = "";
6307 anupam.sin 67
    private String circleCode;
6433 anupam.sin 68
    private String couponCode = "";
69
    private String couponMessage = "";
6495 anupam.sin 70
    private String hiddenUserId = "";
6433 anupam.sin 71
    private long couponAmount = 0;
6091 anupam.sin 72
    private static final String chars = "abcdefghijklmonpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
6495 anupam.sin 73
    private static final BigInteger key = new BigInteger("0333910847013829827302347601486730417451");
6504 anupam.sin 74
    private static final String COUPON_APPLIED_SUCCESSFULLY = "Coupon Applied";
6495 anupam.sin 75
 
6091 anupam.sin 76
    private static final Random random = new Random();
77
    private static final int LENGTH = 10;
6050 anupam.sin 78
    private static Logger log = Logger.getLogger(Class.class);
79
 
80
    public String index() {
81
        return "index";
82
    }
83
 
84
    public String create() {
6270 rajveer 85
    	errorMessage = validateRecharge();
86
    	if(!errorMessage.equals("SUCCESS")){
6108 amar.kumar 87
    		DataLogger.logData(EventType.PROVIDER_FETCH_FAILURE, getSessionId(), userinfo.getUserId(), userinfo.getEmail(),
88
    				rechargeType.toString(), number, operator);
6103 amit.gupta 89
    		return "recharge-redirect";
90
    	}
6433 anupam.sin 91
 
6294 rajveer 92
    	setErrorMessage("");
6086 anupam.sin 93
        setTotalAmount(amount);
6433 anupam.sin 94
 
6057 anupam.sin 95
        if(userinfo.isLoggedIn()) {
6124 anupam.sin 96
            setUserId("" + userinfo.getUserId());
6433 anupam.sin 97
            calculateAmounts();
6124 anupam.sin 98
        } else {
99
            long tempUserId = createUserAndSendMail(email);
100
            if(tempUserId == -1)
101
            {
6270 rajveer 102
            	errorMessage = "Oops! There seems to be a problem. Please try after some time";
6124 anupam.sin 103
                return "recharge-redirect";
104
            } else {
105
                setUserId("" + tempUserId);
106
            }
6057 anupam.sin 107
        }
6495 anupam.sin 108
 
109
        setHash(encrypt(getUserId()));
6050 anupam.sin 110
        return index();
111
    }
6433 anupam.sin 112
 
113
    private void calculateAmounts() {
114
 
115
        try {
116
            TransactionClient tc = new TransactionClient();
117
            UserWallet wallet = tc.getClient().getUserWallet(userinfo.getUserId());
118
            long amountA = 0;
119
            if(wallet.getAmount() == 0){
120
                setAmount("" + (Long.parseLong(totalAmount) - couponAmount));
121
                setMessage("");
122
            } else if ((amountA = wallet.getAmount() - (Long.parseLong(totalAmount) - couponAmount)) >= 0) {
123
                setAmount("0");
124
                setWalletAmountUsed("" + (wallet.getAmount() - amountA));
125
                setMessage("Amount used from RechargeWallet : Rs. " + walletAmountUsed
126
                        + "<br>Amount left in your RechargeWallet : Rs. " + amountA);
127
 
128
            } else {
129
                setAmount("" + (0-amountA));
130
                setWalletAmountUsed("" + wallet.getAmount());
131
                setMessage("Amount used from RechargeWallet : Rs. " + walletAmountUsed
132
                        + "<br>Amount left in your RechargeWallet : Rs.0");
133
            }
134
        } catch (Exception e) {
135
            log.error("Unable to get user wallet", e);
136
        }
137
    }
6050 anupam.sin 138
 
6270 rajveer 139
    public String validateRecharge(){
6103 amit.gupta 140
    	TransactionClient tcl;
141
    	try {
142
    		tcl = new TransactionClient();
6591 anupam.sin 143
    		return tcl.getClient().validateRecharge(RechargeType.findByValue(Integer.parseInt(this.rechargeType)), number, Long.parseLong(operator), request.getRemoteAddr());
6103 amit.gupta 144
    	} catch (Exception e) {
145
    		log.error("Unable to get service provider for Device number " + number + " and rechargeType : " +  rechargeType, e);
146
    	}
6270 rajveer 147
    	return "Oops! There seems to be a problem. Please try after some time";
6103 amit.gupta 148
 
149
    }
6495 anupam.sin 150
 
151
    private String validateFields() {
152
        if(amount == null || amount == "") {
153
            log.warn("Amount received is empty or null");
154
            return "Amount cannot be empty";
155
        }
156
 
157
        if(rechargeType == null || rechargeType == "") {
158
            log.warn("rechargeType received is empty or null");
159
            return "Oops! There seems to be a problem. Please try after some time";
160
        }
161
 
162
        if(email == null || email == "") {
163
            log.warn("Email received is empty or null");
164
            return "Email address cannot be empty";
165
        }
166
 
167
        try {
168
            InternetAddress emailAdd = new InternetAddress(email);
169
            emailAdd.validate();
170
        } catch (AddressException e1) {
171
            log.warn("Invalid email address : " + email, e1);
172
            return "ERROR : Invalid email address.";
173
        }
174
 
175
        if (RechargeType.findByValue(Integer.parseInt(this.rechargeType)) == RechargeType.DTH) {
6536 anupam.sin 176
            if (Long.parseLong(totalAmount) < 200 || Long.parseLong(totalAmount) > 2000) {
177
                return "DTH recharge amount should be between Rs.200 and Rs.2000";
6495 anupam.sin 178
            }
179
 
180
        } else if (RechargeType.findByValue(Integer.parseInt(this.rechargeType)) == RechargeType.MOBILE) {
181
            if (Long.parseLong(totalAmount) < 10 || Long.parseLong(totalAmount) > 1000) {
182
                return "Recharge amount should be between Rs.10 and Rs.1000";
183
            }
184
            if (number.length() != 10) {
185
                return "Number should be of 10 digits";
186
            }
187
 
188
        } else {
189
            log.warn("Invalid rechargeType : " + rechargeType);
190
            return "Oops! There seems to be a problem. Please try after some time";
191
        }
192
 
193
        if (operator == null || operator == "") {
194
            log.warn("Invalid operator : " + operator);
195
            return "Oops! There seems to be a problem. Please try after some time";
196
        }
197
        return "SUCCESS";
198
    }
6103 amit.gupta 199
 
6307 anupam.sin 200
    public boolean shouldPromptForWallet(){
201
        if(!isLoggedIn()) {
202
            try {
203
                TransactionClient tc = new TransactionClient();
204
                UserWallet wallet = tc.getClient().getUserWallet(Long.parseLong(userId));
205
                if(wallet.getAmount() != 0) {
206
                    return true;
207
                }
208
            } catch (Exception e) {
209
                log.error("Unable to get wallet for userId : " + userId, e);
210
            }
211
        }
212
        return false;
213
    }
214
 
6433 anupam.sin 215
    public String applyRechargeCoupon() {
216
        Map<Long, String> couponResult = null;
217
        try {
218
            PromotionClient pc = new PromotionClient();
219
            couponResult = pc.getClient().applyRechargeCoupon(couponCode, Long.parseLong(totalAmount), Long.parseLong(userId));
220
            if (couponResult != null) {
221
                for (long couponAmount : couponResult.keySet()) {
222
                    setCouponMessage(couponResult.get(couponAmount));
223
                    this.couponAmount = couponAmount;
224
                }
225
            }
6443 anupam.sin 226
 
227
            if(couponAmount == 0) {
6495 anupam.sin 228
                couponCode = "";
6443 anupam.sin 229
            }
230
 
6433 anupam.sin 231
            if(userinfo.isLoggedIn()) {
232
                calculateAmounts();
233
            } else {
234
                setAmount("" + (Long.parseLong(amount) - couponAmount));
235
            }
236
            return index();
237
        } catch (Exception e) {
238
            log.error("Unable to apply recharge coupon : " + couponCode, e);
239
            setCouponMessage("Currently this coupon is unavailable");
240
        }
241
        return index();
242
    }
243
 
6050 anupam.sin 244
    public String createRecharge(){
6249 anupam.sin 245
        if (amount.equals("0")) {
246
            if (!verifyCaptcha()) {
247
                setErrorMessage("Invalid captcha. Try Again.");
248
                log.info("Invalid captcha error msg has been added");
249
                return index();
250
            }
251
        }
6495 anupam.sin 252
 
253
        String decryptedUserId = decrypt(hiddenUserId);
254
        if(!userId.equals(decryptedUserId)) {
255
            log.warn("userId and hash do not match");
256
            errorMessage = "Oops! There seems to be a problem. Please try after some time";
257
            return "recharge-redirect";
258
        }
259
 
260
        errorMessage = validateFields();
261
        if (!errorMessage.equals("SUCCESS")) {
262
            return "recharge-redirect";
263
        }
264
 
6050 anupam.sin 265
        try {
6058 anupam.sin 266
            TransactionClient tc = new TransactionClient();
6397 anupam.sin 267
            List<RechargePlan> plans = tc.getClient().getPlansForOperator(Long.parseLong(operator));
268
            List<String> planNameList = new ArrayList<String>();
269
            if (plans == null || plans.isEmpty()) {
270
                setPlan("");
271
            } else {
272
                for (RechargePlan tempPlan : plans) {
273
                    planNameList.add(tempPlan.getName());
274
                }
275
                if (!planNameList.contains(plan)) {
276
                    errorMessage = "Oops! There seems to be a problem. Please try after some time";
277
                    log.warn("OperatorId : " + operator + " and plan : " + plan + " do not match");
278
                    return "recharge-redirect";
279
                }
280
            }
281
 
6433 anupam.sin 282
            if(userinfo.isLoggedIn()) {
283
                UserWallet wallet = tc.getClient().getUserWallet(userinfo.getUserId());
284
                if(wallet.getAmount() < Long.parseLong(walletAmountUsed)) {
285
                    errorMessage = "Oops! There seems to be a problem. Please try after some time";
286
                    log.warn("WalletAmount used : " + walletAmountUsed + " is greater than wallet Balance  : " + wallet.getAmount());
287
                    return "recharge-redirect";
288
                }
289
 
290
                if (userinfo.getUserId() != Long.parseLong(userId)) {
291
                    errorMessage = "Oops! There seems to be a problem. Please try after some time";
292
                    log.warn("Logged in user : " + userinfo.getUserId() + " does not match with userId sent by user  : " +  userId);
293
                    return "recharge-redirect";
294
                }
295
            }
296
 
297
            PromotionClient pc = new PromotionClient();
298
            Map<Long, String> couponResult = null;
299
            couponResult = pc.getClient().applyRechargeCoupon(couponCode, Long.parseLong(totalAmount), Long.parseLong(userId));
300
            if(couponResult != null) {
6504 anupam.sin 301
                if (!couponResult.containsValue(COUPON_APPLIED_SUCCESSFULLY)) {
6495 anupam.sin 302
                    couponCode = "";
303
                    couponAmount = 0;
6504 anupam.sin 304
                } else {
305
                    for (long couponAmount : couponResult.keySet()) {
306
                        this.couponAmount = couponAmount;
307
                    }
6495 anupam.sin 308
                }
309
            } else {
310
                couponCode = "";
311
                couponAmount = 0;
6433 anupam.sin 312
            }
313
 
314
            if (Long.parseLong(totalAmount) != Long.parseLong(amount) + Long.parseLong(walletAmountUsed) + couponAmount){
315
                errorMessage = "Oops! There seems to be a problem. Please try after some time";
316
                log.warn("WalletAmount : " + walletAmountUsed + " plus couponAmount : " + couponAmount + " plus amount to be paid : " +
317
                        amount + "do not match with rechargeAmount : " + totalAmount);
318
                return "recharge-redirect";
319
            }
320
 
321
 
6050 anupam.sin 322
            RechargeOrder rechargeOrder = new RechargeOrder();
6249 anupam.sin 323
            rechargeOrder.setTotalAmount(Long.parseLong(totalAmount));
6050 anupam.sin 324
            rechargeOrder.setUserEmailId(email);
6058 anupam.sin 325
            rechargeOrder.setUserId(Long.parseLong(userId));
6050 anupam.sin 326
            rechargeOrder.setDeviceNumber(number);
6178 anupam.sin 327
            rechargeOrder.setPlan(plan);
6050 anupam.sin 328
            rechargeOrder.setOperatorId(Long.parseLong(operator));
6057 anupam.sin 329
            rechargeOrder.setRechargeType(RechargeType.findByValue(Integer.parseInt(rechargeType)));
6050 anupam.sin 330
            rechargeOrder.setStatus(RechargeOrderStatus.PAYMENT_PENDING);
331
            rechargeOrder.setOrderType(OrderType.B2C);
6070 anupam.sin 332
            rechargeOrder.setWalletAmount(Long.parseLong(getWalletAmountUsed()));
6433 anupam.sin 333
            rechargeOrder.setCouponAmount(couponAmount);
334
            rechargeOrder.setCouponCode(couponCode);
6591 anupam.sin 335
            rechargeOrder.setIpAddress(request.getRemoteAddr());
6397 anupam.sin 336
            TransactionClient tc1 = new TransactionClient();
337
            rechargeOrder = tc1.getClient().createRechargeOrder(rechargeOrder);
6057 anupam.sin 338
            setRechargeOrderId(rechargeOrder.getId());
6050 anupam.sin 339
 
6178 anupam.sin 340
        } catch (Exception e) {
341
            log.error("Unable to create recharge order", e);
6270 rajveer 342
            errorMessage = "Oops! There seems to be a problem. Please try after some time";
6178 anupam.sin 343
            return "recharge-redirect";
6050 anupam.sin 344
        }
345
        if(amount.equals("0")) {
346
            return "create-recharge-redirect";
347
        } else {
348
            return "recharge-pay-options-redirect";
349
        }
350
    }
351
 
6249 anupam.sin 352
    private boolean verifyCaptcha() {
353
        String cookieCaptchaAnswer = getCookie(Captcha.NAME, true, "saholic");
354
        String captchaReceived = (String) request.getParameter("captcha_response_field");
355
 
356
        if (captchaReceived.equalsIgnoreCase(cookieCaptchaAnswer)) {
357
            try {
358
                DataLogger.logData(EventType.CAPTCHA_SUCCESS, getSessionId(), userinfo.getUserId(), userinfo.getEmail());
359
            } catch (Exception e1) {
360
                log.warn("Unable to log orders through the datalogger", e1);
361
            }
362
            return true;
363
        } 
364
        else {
365
            try {
366
                DataLogger.logData(EventType.CAPTCHA_FAILED, getSessionId(), userinfo.getUserId(), userinfo.getEmail());
367
            } catch (Exception e1) {
368
                log.warn("Unable to log orders through the datalogger", e1);
369
            }
370
            return false;
371
        }
372
    }
373
 
6091 anupam.sin 374
    private static String generateNewPassword() {
375
        char[] buf = new char[LENGTH];
376
        for (int i = 0; i < buf.length; i++) {
377
            buf[i] = chars.charAt(random.nextInt(chars.length()));
378
        }
379
        return new String(buf);
380
    }
381
 
382
    private long createUserAndSendMail(String email) {
383
        User user = null;
384
        String password = null;
385
        try{
386
        UserClient ucl = new UserClient();
387
        user = ucl.getClient().getUserByEmail(email);
6124 anupam.sin 388
        if(user.getUserId() == -1) {
6091 anupam.sin 389
            user.setEmail(email);
390
            password = generateNewPassword();
391
            String encryptedPassword = desEncrypter.encrypt(password);
392
            user.setPassword(encryptedPassword);
393
            user.setCommunicationEmail(email);
394
            UserClient userContextServiceClient = new UserClient();
395
            in.shop2020.model.v1.user.UserContextService.Client userClient = userContextServiceClient.getClient();
396
            user = userClient.createUser(user);
6124 anupam.sin 397
 
398
            List<String> toList = new ArrayList<String>();
399
            toList.add(email);
400
            HelperClient helperServiceClient = null;
401
                helperServiceClient = new HelperClient();
402
                in.shop2020.utils.HelperService.Client client = helperServiceClient.getClient();
403
                Mail mail = new Mail();
6131 anupam.sin 404
                mail.setSubject("Saholic Registration successful");
6124 anupam.sin 405
                mail.setTo(toList);
406
                mail.setData("Your have successfully registered with Saholic.com. Your user name is: " + email + " and your password is: " +  password);
407
                client.sendMail(mail);
6091 anupam.sin 408
            }
409
        }catch (UserContextException ux){
410
            return -1;               
411
        } catch (TTransportException e) {
412
            return -1;
413
        } catch (TException e) {
414
            return -1;
6124 anupam.sin 415
        } catch (Exception e) {
416
            log.error("Unexpected error while mailing the new password");
417
            return -1;
6091 anupam.sin 418
        }
419
        return user.getUserId();
420
    }
421
 
6057 anupam.sin 422
    public String getOperatorName() {
6206 rajveer 423
    	String operatorName = null;
424
    	if(rechargeType.equals("1")){
425
    		operatorName = Utils.getMobileProvidersMap().get(Long.parseLong(operator));	
426
    	}
427
    	if(rechargeType.equals("2")){
428
    		operatorName = Utils.getDthProvidersMap().get(Long.parseLong(operator));	
429
    	}
430
    	if(operatorName == null){
431
    		operatorName = "N/A";	
432
    	}
433
    	return operatorName;
6057 anupam.sin 434
    }
435
 
6495 anupam.sin 436
    public String encrypt(String strToEncrypt) {
437
        BigInteger strBigInt = new BigInteger(strToEncrypt.getBytes());
438
        System.out.println(strBigInt);
439
        BigInteger hashedPasswd = key.xor(strBigInt);
440
        System.out.println(hashedPasswd);
441
        return (hashedPasswd.toString(16));
442
    }
443
 
444
    public String decrypt(String encrypted) {
445
        try
446
        {
447
            BigInteger encryptedBigInt = new BigInteger(encrypted, 16);
448
            System.out.println(encryptedBigInt);
449
            BigInteger strBigInt = encryptedBigInt.xor(key);
450
            System.out.println(strBigInt);
451
            String decrypted = new String(strBigInt.toByteArray());
452
            return decrypted;
453
        } catch (Exception e) {
454
            System.out.println("oops");
455
            return "";
456
        }
457
    }
458
 
6050 anupam.sin 459
    public String getAmount() {
460
        return amount;
461
    }
462
    public void setAmount(String amount) {
463
        this.amount = amount;
464
    }
6073 amit.gupta 465
 
466
    public void setDthamount(String amount) {
467
    	this.amount = amount;
468
    }
6050 anupam.sin 469
    public String getOperator() {
470
        return operator;
471
    }
472
    public void setOperator(String operator) {
473
        this.operator = operator;
474
    }
475
    public String getNumber() {
476
        return number;
477
    }
478
    public void setNumber(String number) {
479
        this.number = number;
480
    }
6073 amit.gupta 481
 
482
    public void setDthnumber(String dthnumber) {
483
    	this.number = dthnumber;
484
    }
485
 
486
 
6050 anupam.sin 487
    public String getEmail() {
488
        return email;
489
    }
490
    public void setEmail(String email) {
491
        this.email = email;
492
    }
493
 
494
    public void setCouponIds(List<String> couponIds) {
495
        this.couponIds = couponIds;
496
    }
497
 
498
    public List<String> getCouponIds() {
499
        return couponIds;
500
    }
501
 
502
    public void setCoupons(List<RechargeCoupon> coupons) {
503
        this.coupons = coupons;
504
    }
505
 
506
    public List<RechargeCoupon> getCoupons() {
507
        return coupons;
508
    }
509
 
510
    public String getRechargeType() {
511
        return rechargeType;
512
    }
513
 
514
    public void setRechargeType(String rechargeType) {
515
        this.rechargeType = rechargeType;
516
    }
517
 
6058 anupam.sin 518
    public String getUserId() {
6050 anupam.sin 519
        return userId;
520
    }
521
 
6058 anupam.sin 522
    public void setUserId(String userId) {
523
        this.userId = userId;
6050 anupam.sin 524
    }
525
 
6057 anupam.sin 526
    public boolean isLoggedIn() {
527
        return userinfo.isLoggedIn();
528
    }
529
 
530
    public void setMessage(String message) {
531
        this.message = message;
532
    }
533
 
534
    public String getMessage() {
535
        return message;
536
    }
537
 
538
    public long getRechargeOrderId() {
539
        return rechargeOrderId;
540
    }
541
 
542
    public void setRechargeOrderId(long l) {
543
        this.rechargeOrderId = l;
544
    }
6070 anupam.sin 545
 
546
    public String getTotalAmount() {
547
        return totalAmount;
548
    }
6249 anupam.sin 549
 
550
    public void setTotalAmount(String amount) {
551
        this.totalAmount  = amount;
552
 
553
    }
6070 anupam.sin 554
 
555
    public String getWalletAmountUsed() {
556
        return walletAmountUsed;
557
    }
558
 
559
    public void setWalletAmountUsed(String walletAmountUsed) {
560
        this.walletAmountUsed = walletAmountUsed;
561
    }
6178 anupam.sin 562
 
563
    public String getPlan() {
564
        return plan;
565
    }
566
 
567
    public void setPlan(String plan) {
568
        this.plan = plan;
569
    }
6249 anupam.sin 570
 
571
    public String getErrorMessage() {
572
        return errorMessage;
573
    }
574
 
575
    public void setErrorMessage(String errorMessage) {
576
        this.errorMessage = errorMessage;
577
    }
6307 anupam.sin 578
 
579
    public String getCircleCode() {
580
        return circleCode;
581
    }
582
 
583
    public void setCircleCode(String circleCode) {
584
        this.circleCode = circleCode;
585
    }
6433 anupam.sin 586
 
587
    public void setDiscountCode(String discountCode) {
588
        this.couponCode = discountCode;
589
    }
6057 anupam.sin 590
 
6433 anupam.sin 591
    public String getCouponCode() {
592
        return couponCode;
593
    }
594
 
595
    public void setCouponCode(String couponCode) {
596
        this.couponCode = couponCode;
597
    }
598
 
599
    public void setCouponAmount(long couponAmount) {
600
        this.couponAmount = couponAmount;
601
    }
602
 
603
    public long getCouponAmount() {
604
        return couponAmount;
605
    }
606
 
607
    public void setCouponMessage(String couponMessage) {
608
        this.couponMessage = couponMessage;
609
    }
610
 
611
    public String getCouponMessage() {
612
        return couponMessage;
613
    }
614
 
6495 anupam.sin 615
    public void setHash(String hash) {
616
        this.hiddenUserId = hash;
617
    }
618
 
619
    public String getHiddenUserId() {
620
        return hiddenUserId;
621
    }
6050 anupam.sin 622
}