Reply
Highlighted
Member
Posts: 1
Registered: ‎01-19-2019

Exceptions Handling Flask (Python)

Hey Everyone,

 

I am using py_authorize 1.4. 

 

result = authorize.Transaction.sale({
            'amount': data2.price,
            'credit_card': {
                'card_number': card_number,
                'card_code': card_code,
                'expiration_date': month + '/' + year,
            }
        })
        result.transaction_response.trans_id

 

When the card transaction gets declined, it shows an error 500 in blank screen. How do I fix that it shows the decline message instead of going blank.    When debug mode is on this screen is showing itself