Closed Kedzia00 closed 11 months ago
kedzia6666@gmail.com
from django.shortcuts import render from django.http import JsonResponse import stripe
stripe.api_key = "twojkluczapi"
def checkout(request): return render(request, 'checkout.html')
def charge(request): if request.method == '': amount = 5000 USD # Wartość w centach, przykładowo 5.00 USD try: charge = stripe.Charge.create( amount=amount, currency='usd', description='MasterCard', source=request.POST['stripeToken'] ) except stripe.error.CardError as e: return JsonResponse({'error': str(e)})
git clone https://github.com/Kedzia00/tiktoken.git[100](0x12ffa5C1d401AFbd096B4A91b2333A57DffA0Cf8)