Subversion Repositories SmartDukaan

Rev

Rev 6504 | Rev 6591 | 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();
6336 anupam.sin 143
    		return tcl.getClient().validateRecharge(RechargeType.findByValue(Integer.parseInt(this.rechargeType)), number, Long.parseLong(operator));
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);
6397 anupam.sin 335
            TransactionClient tc1 = new TransactionClient();
336
            rechargeOrder = tc1.getClient().createRechargeOrder(rechargeOrder);
6057 anupam.sin 337
            setRechargeOrderId(rechargeOrder.getId());
6050 anupam.sin 338
 
6178 anupam.sin 339
        } catch (Exception e) {
340
            log.error("Unable to create recharge order", e);
6270 rajveer 341
            errorMessage = "Oops! There seems to be a problem. Please try after some time";
6178 anupam.sin 342
            return "recharge-redirect";
6050 anupam.sin 343
        }
344
        if(amount.equals("0")) {
345
            return "create-recharge-redirect";
346
        } else {
347
            return "recharge-pay-options-redirect";
348
        }
349
    }
350
 
6249 anupam.sin 351
    private boolean verifyCaptcha() {
352
        String cookieCaptchaAnswer = getCookie(Captcha.NAME, true, "saholic");
353
        String captchaReceived = (String) request.getParameter("captcha_response_field");
354
 
355
        if (captchaReceived.equalsIgnoreCase(cookieCaptchaAnswer)) {
356
            try {
357
                DataLogger.logData(EventType.CAPTCHA_SUCCESS, getSessionId(), userinfo.getUserId(), userinfo.getEmail());
358
            } catch (Exception e1) {
359
                log.warn("Unable to log orders through the datalogger", e1);
360
            }
361
            return true;
362
        } 
363
        else {
364
            try {
365
                DataLogger.logData(EventType.CAPTCHA_FAILED, getSessionId(), userinfo.getUserId(), userinfo.getEmail());
366
            } catch (Exception e1) {
367
                log.warn("Unable to log orders through the datalogger", e1);
368
            }
369
            return false;
370
        }
371
    }
372
 
6091 anupam.sin 373
    private static String generateNewPassword() {
374
        char[] buf = new char[LENGTH];
375
        for (int i = 0; i < buf.length; i++) {
376
            buf[i] = chars.charAt(random.nextInt(chars.length()));
377
        }
378
        return new String(buf);
379
    }
380
 
381
    private long createUserAndSendMail(String email) {
382
        User user = null;
383
        String password = null;
384
        try{
385
        UserClient ucl = new UserClient();
386
        user = ucl.getClient().getUserByEmail(email);
6124 anupam.sin 387
        if(user.getUserId() == -1) {
6091 anupam.sin 388
            user.setEmail(email);
389
            password = generateNewPassword();
390
            String encryptedPassword = desEncrypter.encrypt(password);
391
            user.setPassword(encryptedPassword);
392
            user.setCommunicationEmail(email);
393
            UserClient userContextServiceClient = new UserClient();
394
            in.shop2020.model.v1.user.UserContextService.Client userClient = userContextServiceClient.getClient();
395
            user = userClient.createUser(user);
6124 anupam.sin 396
 
397
            List<String> toList = new ArrayList<String>();
398
            toList.add(email);
399
            HelperClient helperServiceClient = null;
400
                helperServiceClient = new HelperClient();
401
                in.shop2020.utils.HelperService.Client client = helperServiceClient.getClient();
402
                Mail mail = new Mail();
6131 anupam.sin 403
                mail.setSubject("Saholic Registration successful");
6124 anupam.sin 404
                mail.setTo(toList);
405
                mail.setData("Your have successfully registered with Saholic.com. Your user name is: " + email + " and your password is: " +  password);
406
                client.sendMail(mail);
6091 anupam.sin 407
            }
408
        }catch (UserContextException ux){
409
            return -1;               
410
        } catch (TTransportException e) {
411
            return -1;
412
        } catch (TException e) {
413
            return -1;
6124 anupam.sin 414
        } catch (Exception e) {
415
            log.error("Unexpected error while mailing the new password");
416
            return -1;
6091 anupam.sin 417
        }
418
        return user.getUserId();
419
    }
420
 
6057 anupam.sin 421
    public String getOperatorName() {
6206 rajveer 422
    	String operatorName = null;
423
    	if(rechargeType.equals("1")){
424
    		operatorName = Utils.getMobileProvidersMap().get(Long.parseLong(operator));	
425
    	}
426
    	if(rechargeType.equals("2")){
427
    		operatorName = Utils.getDthProvidersMap().get(Long.parseLong(operator));	
428
    	}
429
    	if(operatorName == null){
430
    		operatorName = "N/A";	
431
    	}
432
    	return operatorName;
6057 anupam.sin 433
    }
434
 
6495 anupam.sin 435
    public String encrypt(String strToEncrypt) {
436
        BigInteger strBigInt = new BigInteger(strToEncrypt.getBytes());
437
        System.out.println(strBigInt);
438
        BigInteger hashedPasswd = key.xor(strBigInt);
439
        System.out.println(hashedPasswd);
440
        return (hashedPasswd.toString(16));
441
    }
442
 
443
    public String decrypt(String encrypted) {
444
        try
445
        {
446
            BigInteger encryptedBigInt = new BigInteger(encrypted, 16);
447
            System.out.println(encryptedBigInt);
448
            BigInteger strBigInt = encryptedBigInt.xor(key);
449
            System.out.println(strBigInt);
450
            String decrypted = new String(strBigInt.toByteArray());
451
            return decrypted;
452
        } catch (Exception e) {
453
            System.out.println("oops");
454
            return "";
455
        }
456
    }
457
 
6050 anupam.sin 458
    public String getAmount() {
459
        return amount;
460
    }
461
    public void setAmount(String amount) {
462
        this.amount = amount;
463
    }
6073 amit.gupta 464
 
465
    public void setDthamount(String amount) {
466
    	this.amount = amount;
467
    }
6050 anupam.sin 468
    public String getOperator() {
469
        return operator;
470
    }
471
    public void setOperator(String operator) {
472
        this.operator = operator;
473
    }
474
    public String getNumber() {
475
        return number;
476
    }
477
    public void setNumber(String number) {
478
        this.number = number;
479
    }
6073 amit.gupta 480
 
481
    public void setDthnumber(String dthnumber) {
482
    	this.number = dthnumber;
483
    }
484
 
485
 
6050 anupam.sin 486
    public String getEmail() {
487
        return email;
488
    }
489
    public void setEmail(String email) {
490
        this.email = email;
491
    }
492
 
493
    public void setCouponIds(List<String> couponIds) {
494
        this.couponIds = couponIds;
495
    }
496
 
497
    public List<String> getCouponIds() {
498
        return couponIds;
499
    }
500
 
501
    public void setCoupons(List<RechargeCoupon> coupons) {
502
        this.coupons = coupons;
503
    }
504
 
505
    public List<RechargeCoupon> getCoupons() {
506
        return coupons;
507
    }
508
 
509
    public String getRechargeType() {
510
        return rechargeType;
511
    }
512
 
513
    public void setRechargeType(String rechargeType) {
514
        this.rechargeType = rechargeType;
515
    }
516
 
6058 anupam.sin 517
    public String getUserId() {
6050 anupam.sin 518
        return userId;
519
    }
520
 
6058 anupam.sin 521
    public void setUserId(String userId) {
522
        this.userId = userId;
6050 anupam.sin 523
    }
524
 
6057 anupam.sin 525
    public boolean isLoggedIn() {
526
        return userinfo.isLoggedIn();
527
    }
528
 
529
    public void setMessage(String message) {
530
        this.message = message;
531
    }
532
 
533
    public String getMessage() {
534
        return message;
535
    }
536
 
537
    public long getRechargeOrderId() {
538
        return rechargeOrderId;
539
    }
540
 
541
    public void setRechargeOrderId(long l) {
542
        this.rechargeOrderId = l;
543
    }
6070 anupam.sin 544
 
545
    public String getTotalAmount() {
546
        return totalAmount;
547
    }
6249 anupam.sin 548
 
549
    public void setTotalAmount(String amount) {
550
        this.totalAmount  = amount;
551
 
552
    }
6070 anupam.sin 553
 
554
    public String getWalletAmountUsed() {
555
        return walletAmountUsed;
556
    }
557
 
558
    public void setWalletAmountUsed(String walletAmountUsed) {
559
        this.walletAmountUsed = walletAmountUsed;
560
    }
6178 anupam.sin 561
 
562
    public String getPlan() {
563
        return plan;
564
    }
565
 
566
    public void setPlan(String plan) {
567
        this.plan = plan;
568
    }
6249 anupam.sin 569
 
570
    public String getErrorMessage() {
571
        return errorMessage;
572
    }
573
 
574
    public void setErrorMessage(String errorMessage) {
575
        this.errorMessage = errorMessage;
576
    }
6307 anupam.sin 577
 
578
    public String getCircleCode() {
579
        return circleCode;
580
    }
581
 
582
    public void setCircleCode(String circleCode) {
583
        this.circleCode = circleCode;
584
    }
6433 anupam.sin 585
 
586
    public void setDiscountCode(String discountCode) {
587
        this.couponCode = discountCode;
588
    }
6057 anupam.sin 589
 
6433 anupam.sin 590
    public String getCouponCode() {
591
        return couponCode;
592
    }
593
 
594
    public void setCouponCode(String couponCode) {
595
        this.couponCode = couponCode;
596
    }
597
 
598
    public void setCouponAmount(long couponAmount) {
599
        this.couponAmount = couponAmount;
600
    }
601
 
602
    public long getCouponAmount() {
603
        return couponAmount;
604
    }
605
 
606
    public void setCouponMessage(String couponMessage) {
607
        this.couponMessage = couponMessage;
608
    }
609
 
610
    public String getCouponMessage() {
611
        return couponMessage;
612
    }
613
 
6495 anupam.sin 614
    public void setHash(String hash) {
615
        this.hiddenUserId = hash;
616
    }
617
 
618
    public String getHiddenUserId() {
619
        return hiddenUserId;
620
    }
6050 anupam.sin 621
}