from django.urls import path

from ocyan.main.loading import get_ocyan_class
from .constants import APP_CODE, AVAILABLE_PAYMENT_METHODS


InvoicePaymentView = get_ocyan_class("payment_invoice.views", "InvoicePaymentView")

app_name = APP_CODE  # dit niet deleten het is echt nodig, lees urlconfig docs maar!
urlpatterns = [
    path("payment/invoice/%s" % method, InvoicePaymentView.as_view(method=method), name=method) for method in AVAILABLE_PAYMENT_METHODS
]
