Subversion Repositories SmartDukaan

Rev

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

Rev 16561 Rev 16780
Line 78... Line 78...
78
                        resp['result'] = 'ORDER_NOT_CREATED_KNOWN'
78
                        resp['result'] = 'ORDER_NOT_CREATED_KNOWN'
79
                    else:
79
                    else:
80
                        raise
80
                        raise
81
                except:
81
                except:
82
                    try:
82
                    try:
83
                        if soup.h1.text.strip() in ['This is a duplicate order', 'There was a problem with your payment.', 'Your Orders']:
83
                        if soup.h1.text.strip() in ['This is a duplicate order', 'There was a problem with your payment.', 'Your Orders', 'Your Shopping Cart is empty.']:
84
                            resp['result'] = 'ORDER_NOT_CREATED_KNOWN'
84
                            resp['result'] = 'ORDER_NOT_CREATED_KNOWN'
85
                        else:
85
                        else:
86
                            raise
86
                            raise
87
                    except:
87
                    except:
88
                        try:
88
                        try:
Line 123... Line 123...
123
                        try:
123
                        try:
124
                            self.parseCancelled(merchantOrder, soup)
124
                            self.parseCancelled(merchantOrder, soup)
125
                            resp['result'] = 'ORDER_CANCELLED'
125
                            resp['result'] = 'ORDER_CANCELLED'
126
                        except:
126
                        except:
127
                            try:
127
                            try:
128
                                if soup.h1.span.text=="Account" or soup.h1 in ["Your Account"]:
128
                                if soup.h1.span.text=="Account" or soup.h1.text.strip() in ["Your Account"]:
129
                                    resp['result'] = 'DETAIL_NOT_CREATED_KNOWN'
129
                                    resp['result'] = 'DETAIL_NOT_CREATED_KNOWN'
130
                                else:
130
                                else:
131
                                    raise
131
                                    raise
132
                            except:
132
                            except:
133
                                if soup.find(id="ap_signin_pagelet_title").h1.text.strip()=="Sign In":
133
                                if soup.find(id="ap_signin_pagelet_title").h1.text.strip()=="Sign In":