Subversion Repositories SmartDukaan

Rev

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

Rev 5411 Rev 5412
Line 610... Line 610...
610
    try:
610
    try:
611
        payment_client = PaymentClient().get_client()
611
        payment_client = PaymentClient().get_client()
612
        capture_result = payment_client.capturePayment(txnId)
612
        capture_result = payment_client.capturePayment(txnId)
613
        if capture_result:
613
        if capture_result:
614
            logging.info("Successfully captured payment for merchant txn:" + str(txnId))
614
            logging.info("Successfully captured payment for merchant txn:" + str(txnId))
615
            change_transaction_status(txnId, TransactionStatus.IN_PROCESS, "Payment received")
615
            change_transaction_status(txnId, TransactionStatus.IN_PROCESS, "Payment received", False)
616
        else:
616
        else:
617
            raise TransactionServiceException(115, "Payment capture failed.")
617
            raise TransactionServiceException(115, "Payment capture failed.")
618
    except PaymentException as e:
618
    except PaymentException as e:
619
        if e.error_code == 106:
619
        if e.error_code == 106:
620
            order.status = OrderStatus.CAPTURE_IN_PROCESS
620
            order.status = OrderStatus.CAPTURE_IN_PROCESS