Subversion Repositories SmartDukaan

Rev

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

Rev 2247 Rev 2277
Line 39... Line 39...
39
        print "Unexpected exception"
39
        print "Unexpected exception"
40
        traceback.print_exc()
40
        traceback.print_exc()
41
 
41
 
42
def track_coupon_usage(transaction, userServiceClient):
42
def track_coupon_usage(transaction, userServiceClient):
43
    try:
43
    try:
44
        cart = userServiceClient.get_client().getCart(transaction.shopping_cart_id)
-
 
45
        coupon_code = cart.couponCode
44
        coupon_code = transaction.coupon_code
46
        
45
        
47
        if coupon_code is not None and coupon_code != '':
46
        if coupon_code is not None and coupon_code != '':
48
            PromotionClient().get_client().trackCouponUsage(coupon_code, transaction.id, transaction.customer_id);
47
            PromotionClient().get_client().trackCouponUsage(coupon_code, transaction.id, transaction.customer_id);
49
    except ShoppingCartException:
48
    except ShoppingCartException:
50
        print "Error occurred in reading CardId for transaction"
49
        print "Error occurred in reading CardId for transaction"