forked from uncloud/uncloud
implement credit card listing
This commit is contained in:
parent
e2c4a19049
commit
e225bf1cc0
12 changed files with 183 additions and 63 deletions
|
|
@ -7,8 +7,13 @@
|
|||
Welcome to uncloud, checkout the following locations:
|
||||
|
||||
<ul>
|
||||
<li><a href="/api/">The API</a>
|
||||
<li><a href="/cc/reg/">The CC registration</a>
|
||||
<li><a href="{% url 'api-root' %}">The uncloud API</a>
|
||||
<li><a href="{% url 'cc_register' %}">Register a credit card</a>
|
||||
(this is required to be done via Javascript so that we never see
|
||||
your credit card, but it is sent directly to stripe)
|
||||
|
||||
You can list your credit card via the API.
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -72,10 +72,12 @@ router.register(r'v1/user/register', authviews.AccountManagementViewSet, basenam
|
|||
router.register(r'v2/net/wireguardvpn', netviews.WireGuardVPNViewSet, basename='wireguardvpnnetwork')
|
||||
router.register(r'v2/net/wireguardvpnsizes', netviews.WireGuardVPNSizes, basename='wireguardvpnnetworksizes')
|
||||
|
||||
# Payment related
|
||||
router.register(r'v2/payment/credit-card', payviews.CreditCardViewSet, basename='credit-card')
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path(r'api/', include(router.urls)),
|
||||
path(r'api/', include(router.urls), name='api'),
|
||||
|
||||
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')), # for login to REST API
|
||||
path('openapi', get_schema_view(
|
||||
|
|
@ -92,8 +94,6 @@ urlpatterns = [
|
|||
path('admin/', admin.site.urls),
|
||||
|
||||
path('cc/reg/', payviews.RegisterCard.as_view(), name="cc_register"),
|
||||
path('cc/list/', payviews.ListCards.as_view(), name="cc_list"),
|
||||
path('cc/delete/<payment_method_id>', payviews.DeleteCard.as_view(), name="cc_delete"),
|
||||
|
||||
path('', uncloudviews.UncloudIndex.as_view(), name="uncloudindex"),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue