Subversion Repositories SmartDukaan

Rev

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

Rev 4252 Rev 4258
Line 1536... Line 1536...
1536
    order.previousStatus = order.status
1536
    order.previousStatus = order.status
1537
    order.status = OrderStatus.CANCEL_REQUEST_RECEIVED
1537
    order.status = OrderStatus.CANCEL_REQUEST_RECEIVED
1538
    order.statusDescription = "Cancellation request received from user"
1538
    order.statusDescription = "Cancellation request received from user"
1539
    session.commit()
1539
    session.commit()
1540
    
1540
    
1541
def mark_order_as_payment_flag_removed(orderId):
1541
def mark_transaction_as_payment_flag_removed(transactionId):
1542
    """
1542
    """
1543
    If we and/or payment has decided to accept the order, this method needs to be called.
1543
    If we and/or payment gateway has decided to accept the payment, this method needs to be called.
1544
    Changed order status and payment status
1544
    Changed transaction and all orders status to payment accepted.
1545
 
1545
 
1546
    Parameters:
1546
    Parameters:
1547
     - orderId
1547
     - transactionId
1548
    """
1548
    """
-
 
1549
    transaction = get_transaction(transactionId)
-
 
1550
    transaction.status = TransactionStatus.AUTHORIZED
1549
    order = get_order(orderId)
1551
    for order in transaction.orders:
1550
    order.status = OrderStatus.SUBMITTED_FOR_PROCESSING
1552
        order.status = OrderStatus.SUBMITTED_FOR_PROCESSING
1551
    order.statusDescription = "Submitted to warehouse"
1553
        order.statusDescription = "Submitted to warehouse"
1552
    session.commit()
1554
    session.commit()
1553
    
1555
    
1554
def mark_order_cancellation_request_denied(orderId):
1556
def mark_order_cancellation_request_denied(orderId):
1555
    """
1557
    """
1556
    If we decide to not to cancel order, we will move the order ro previous status.
1558
    If we decide to not to cancel order, we will move the order ro previous status.