Subversion Repositories SmartDukaan

Rev

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

Rev 18772 Rev 18774
Line 440... Line 440...
440
    if new_status == TransactionStatus.FAILED:
440
    if new_status == TransactionStatus.FAILED:
441
        for order in transaction.orders:
441
        for order in transaction.orders:
442
            order.status = OrderStatus.PAYMENT_FAILED
442
            order.status = OrderStatus.PAYMENT_FAILED
443
            order.statusDescription = "Payment Failed"
443
            order.statusDescription = "Payment Failed"
444
    elif new_status == TransactionStatus.AUTHORIZED or new_status == TransactionStatus.FLAGGED:                    
444
    elif new_status == TransactionStatus.AUTHORIZED or new_status == TransactionStatus.FLAGGED:                    
445
        if transaction.payment_option == capitalFloatPayMethod:
-
 
446
            total_amount = 0
-
 
447
            singleOrder = transaction.orders[0]
-
 
448
            for order in transaction.orders:
-
 
449
                total_amount = total_amount + order.total_amount + order.shippingCost - order.gvAmount
-
 
450
            
-
 
451
            creditObj = __creditHistoryObj(singleOrder.customer_id, 1, transaction.id, total_amount, CreditTxnType.BLOCKED, str(transaction.id))
-
 
452
            creditTxns = []
-
 
453
            creditTxns.append(creditObj)
-
 
454
            process_credit_transaction(transaction.id, singleOrder.customer_id, 1, creditTxns)
-
 
455
 
445
 
456
        for order in transaction.orders:
446
        for order in transaction.orders:
457
            if new_status == TransactionStatus.AUTHORIZED:
447
            if new_status == TransactionStatus.AUTHORIZED:
458
                order.status = OrderStatus.SUBMITTED_FOR_PROCESSING
448
                order.status = OrderStatus.SUBMITTED_FOR_PROCESSING
459
                order.statusDescription = "Submitted to warehouse"
449
                order.statusDescription = "Submitted to warehouse"
Line 533... Line 523...
533
            
523
            
534
            catalog_client = CatalogClient().get_client() 
524
            catalog_client = CatalogClient().get_client() 
535
            voucherAmount = catalog_client.getVoucherAmount(item_id, VoucherType.SPICEDECK_MOBILE)
525
            voucherAmount = catalog_client.getVoucherAmount(item_id, VoucherType.SPICEDECK_MOBILE)
536
            if voucherAmount:
526
            if voucherAmount:
537
                __create_recharge_voucher_tracker(order, voucherAmount, VoucherType.SPICEDECK_MOBILE)
527
                __create_recharge_voucher_tracker(order, voucherAmount, VoucherType.SPICEDECK_MOBILE)
-
 
528
                
-
 
529
            if transaction.payment_option == capitalFloatPayMethod:
-
 
530
                total_amount = 0
-
 
531
                singleOrder = transaction.orders[0]
-
 
532
                for order in transaction.orders:
-
 
533
                    total_amount = total_amount + order.total_amount + order.shippingCost - order.gvAmount
-
 
534
                
-
 
535
                creditObj = __creditHistoryObj(singleOrder.customer_id, 1, transaction.id, total_amount, CreditTxnType.BLOCKED, str(transaction.id))
-
 
536
                creditTxns = []
-
 
537
                creditTxns.append(creditObj)
-
 
538
                process_credit_transaction(transaction.id, singleOrder.customer_id, 1, creditTxns)
538
                                
539
                                
539
    elif new_status == TransactionStatus.COD_IN_PROCESS:
540
    elif new_status == TransactionStatus.COD_IN_PROCESS:
540
        for order in transaction.orders:
541
        for order in transaction.orders:
541
            order.status = OrderStatus.COD_VERIFICATION_PENDING
542
            order.status = OrderStatus.COD_VERIFICATION_PENDING
542
            order.statusDescription = "Verification Pending"
543
            order.statusDescription = "Verification Pending"