<%Links::Payment::add_method_submit%>
<%unless method_success%>
  <%set already_submitted = 1%>
  <%set error_message = 'Could not save payment method: '%>
  <%if method_invalid%>
    <%set error_message_2 = $method%>
    <%set error_message_3 = ' is not a valid payment method.'%>
  <%elsif method_used%>
    <%set error_message_2 = $method%>
    <%set error_message_3 = ' has already been set up.'%>
  <%elsif method_failed%>
    <%set error_message_2 = 'Could not load '%>
    <%set error_message_3 = $method%>
    <%set error_message_4 = ' payment module:<br>'%>
    <%set error_message_5 = $method_failed_reason%>
  <%elsif method_insufficient%>
    <%set error_message_2 = 'Insufficient information provided:<br><br>'%>
    <%set error_message_3 = $method_insufficient%>
  <%else%>
    <%set error_message_2 = 'An unknown error has occured.'%>
  <%endif%>
  <%include payment_methods_add_method.html%>
  <%endparse%>
<%endunless%>

<html>
<head>
  <title>Gossamer Links - Payments - <%if modify%>Modify<%else%>Add<%endif%> Method - <%payment_name%></title>
</head>

<body bgcolor="white">
<%set font_tag = '<font face="Tahoma,Arial,Helvetica" size="2">'%>
<%if modify%>
  <%set header_title = "Modify Payment Method"%>
  <%set success_message = "The changes to the payment method have been successfully saved."%>
<%else%>
  <%set header_title = "Add Payment Method"%>
  <%set success_message = "The payment method has been successfully added."%>
<%endif%>
<%set header_description = ""%>
<%include payment_header.html%>
<br>
<%include payment_methods_display_existing.html%>

</body>
</html>
