#BLOCK("WITH_FORM_ERROR",#FormError)
#IF(#FormError)

{InputError}

#IF(#FormErrors.Reason.CanNotDeleteDefault) {CanNotDeleteDefault} #ELSIF(#OBJECT_EXISTS) {ObjectExists} #ELSIF(#FormErrors.Reason.SETTINGS_INCOMPLETE) {PaymentSettingsIncomplete} #ELSE {PleaseCorrectErrors} #ENDIF

#ENDIF #IF(#DELETE)

{Warning}

{AcceptAction}

#LOOP(#DeleteObjects)#ENDLOOP #ELSE #IF(#FeatureMaxValueReached) #IF(#DEFINED(#FeatureName) AND #FeatureName EQ "PaymentMethods")

{Notification}

{NoNewPaymentMethod}
{FeatureMaxValuePaymentMethods} #Shop.FeatureMaxValue.PaymentMethods #INCLUDE("FeaturePromotion")
#ELSE

{Notification}

{CouldNotCreatepaymentMethod}
#ENDIF #ELSIF(#COUNT(#PaymentMethods) >= #Shop.FeatureMaxValue.PaymentMethods)

{Notification}

{FeatureMaxValueReached}
{FeatureMaxValuePaymentMethods} #Shop.FeatureMaxValue.PaymentMethods #INCLUDE("FeaturePromotion")
#ELSIF(#NoSecondInstanceAllowed)

{Notification}

{NoSecondInstanceAllowed}
#ENDIF #ENDIF #IF(#INVISIBLE_DEFAULT)

{DeactivateDefault}

#ENDIF #IF(#DELETE) #LOOP(#DeleteObjects) #ENDLOOP #ELSE #LOOP(#PaymentMethods) #ENDLOOP #LOCAL("CantAddNewMethod", 1) #IF(#COUNT(#PaymentMethods) < #Shop.FeatureMaxValue.PaymentMethods) #SET("CantAddNewMethod", 0) #ENDIF #ENDLOCAL #ENDIF
{PaymentMethod} {PaymentType} {IsDefault} {Position}
#NameOrAlias #PaymentType.NameOrAlias #Position
#NameOrAlias #IF(NOT #UsableAtStorefront) {DoComplete} #ENDIF #IF(#COUNT(#CustomerGroups)) #ENDIF #IF(#Region) #ENDIF #PaymentType.NameOrAlias
#LOCAL("MyNewPaymentTypeID",#NewPaymentTypeID OR #INPUT.NewPaymentTypeID) #ENDLOCAL
#IF(#DELETE) #ELSE #IF(#COUNT(#PaymentMethods)) #ENDIF #ENDIF
#ENDBLOCK
#IF(NOT #DELETE)
#BLOCK("MENU","PaymentBanner")#INCLUDE(#Template)#ENDBLOCK
#ENDIF