Subversion Repositories SmartDukaan

Rev

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

Rev 14814 Rev 14815
Line 70... Line 70...
70
                    resp['result'] = 'ORDER_ALREADY_CREATED_IGNORED'
70
                    resp['result'] = 'ORDER_ALREADY_CREATED_IGNORED'
71
                    
71
                    
72
            except:
72
            except:
73
                #Write all cases here for Order Not created Known
73
                #Write all cases here for Order Not created Known
74
                try:
74
                try:
75
                    if 'Securely redirecting you' in soup.h3.text:
75
                    if 'Securely redirecting you' in soup.h3.text.strip():
76
                        resp['result'] = 'ORDER_NOT_CREATED_KNOWN'
76
                        resp['result'] = 'ORDER_NOT_CREATED_KNOWN'
77
                    else:
77
                    else:
78
                        raise
78
                        raise
79
                except:
79
                except:
80
                    try:
80
                    try:
81
                        if soup.h1.text in ['This is a duplicate order', 'There was a problem with your payment.']:
81
                        if soup.h1.text.strip() in ['This is a duplicate order', 'There was a problem with your payment.']:
82
                            resp['result'] = 'ORDER_NOT_CREATED_KNOWN'
82
                            resp['result'] = 'ORDER_NOT_CREATED_KNOWN'
83
                        else:
83
                        else:
84
                            raise
84
                            raise
85
                    except:
85
                    except:
86
                        if soup.h3.text == 'Web page not available':
86
                        if soup.h3.text.strip() == 'Web page not available':
87
                            resp['result'] = 'ORDER_NOT_CREATED_KNOWN'
87
                            resp['result'] = 'ORDER_NOT_CREATED_KNOWN'
88
            return resp
88
            return resp
89
            
89
            
90
        else:
90
        else:
91
            try:
91
            try: