def get_processor_decline_html(params):
 payment_support_email = configuration_helpers.get_value('payment_support_email', settings.PAYMENT_SUPPORT_EMAIL)
 msg = _('Sorry! Our payment processor did not accept your payment. The decision they returned was {decision_text}, and the reason was {reason_text}. You were not charged. Please try a different form of payment. Contact us with payment-related questions at {email}.')
 formatted = msg.format(decision_text='<span class="decision">{}</span>'.format(params['decision']), reason_text='<span class="reason">{code}:{msg}</span>'.format(code=params['reasonCode'], msg=REASONCODE_MAP[params['reasonCode']]), email=payment_support_email)
 return '<p class="error_msg">{}</p>'.format(formatted)

def get_processor_decline_html ( params ) : payment_support_email = configuration_helpers . get_value ( 'payment_support_email' , settings . PAYMENT_SUPPORT_EMAIL ) msg = _ ( 'Sorry! Our payment processor did not accept your payment. The decision they returned was {decision_text}, and the reason was {reason_text}. You were not charged. Please try a different form of payment. Contact us with payment-related questions at {email}.' ) formatted = msg . format ( decision_text = '<span class="decision">{}</span>' . format ( params [ 'decision' ] ) , reason_text = '<span class="reason">{code}:{msg}</span>' . format ( code = params [ 'reasonCode' ] , msg = REASONCODE_MAP [ params [ 'reasonCode' ] ] ) , email = payment_support_email ) return '<p class="error_msg">{}</p>' . format ( formatted )
have to parse through the error codes to return a helpful message .