Subversion Repositories SmartDukaan

Rev

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

Rev 14227 Rev 14228
Line 130... Line 130...
130
        try:
130
        try:
131
            response = urllib2.urlopen(orderRequest).read()
131
            response = urllib2.urlopen(orderRequest).read()
132
            response = json.loads(response)['response']
132
            response = json.loads(response)['response']
133
            payment = response['payment']
133
            payment = response['payment']
134
            orders = response['orders']
134
            orders = response['orders']
135
            items = response['items']
135
            items = response['itemsMap']
136
            orders[0]
136
            orders[0]
137
            merchantOrder = Order(orderId, userId, subTagId, self.store_id, orderSuccessUrl)
137
            merchantOrder = Order(orderId, userId, subTagId, self.store_id, orderSuccessUrl)
138
            merchantOrder.merchantOrderId = payment['merchantTxnId']
138
            merchantOrder.merchantOrderId = payment['merchantTxnId']
139
            merchantOrder.createdOn = datetime.strftime(datetime.fromtimestamp(orders[0]['created_timestamp']/1000),"%d %B %Y")
139
            merchantOrder.createdOn = datetime.strftime(datetime.fromtimestamp(orders[0]['created_timestamp']/1000),"%d %B %Y")
140
            merchantOrder.paidAmount = payment['amount']
140
            merchantOrder.paidAmount = payment['amount']