Subversion Repositories SmartDukaan

Rev

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

Rev 7175 Rev 7188
Line 89... Line 89...
89
            if order:
89
            if order:
90
                amount = order.totalAmount
90
                amount = order.totalAmount
91
                isStoreOrder = False
91
                isStoreOrder = False
92
            else:
92
            else:
93
                order = RechargeTransaction.get_by(spiceTID = key)
93
                order = RechargeTransaction.get_by(spiceTID = key)
-
 
94
                if not order:
-
 
95
                    continue
94
                isStoreOrder = True
96
                isStoreOrder = True
95
                amount = order.amount
97
                amount = order.amount
96
            if order.status == RechargeOrderStatus.RECHARGE_FAILED_REFUNDED:
98
            if order.status == RechargeOrderStatus.RECHARGE_FAILED_REFUNDED:
97
                print "Refund is already processed."
99
                print "Refund is already processed."
98
                continue
100
                continue
99
            if order.status not in (RechargeOrderStatus.RECHARGE_SUCCESSFUL, RechargeOrderStatus.PAYMENT_SUCCESSFUL):
101
            if order.status not in (RechargeOrderStatus.RECHARGE_SUCCESSFUL, RechargeOrderStatus.PAYMENT_SUCCESSFUL, RechargeOrderStatus.RECHARGE_UNKNOWN):
100
                print "Recharge/Payment is not successful. There is something wrong."
102
                print "Recharge/Payment is not successful. There is something wrong."
101
                continue
103
                continue
102
            if amount != refundAmount:
104
            if amount != refundAmount:
103
                print "Refund amount is not same as transaction amount"
105
                print "Refund amount is not same as transaction amount"
104
                continue
106
                continue