Stripe function has no attribute?

Viewed 50

Installed stripe on in my django project. Called Customer function shows error function has no attribute

Imported Stripe on top

import stripe


def charge(request):
    amount = 5
    if request.method == 'POST':
        print('Data:', request.POST)

        stripe.Customer.create(
            description="My First Test Customer (created for API docs)",
        )
        
    return redirect(reverse('success', args=[amount]))

Error while checking out

1 Answers

Would you happen to have a file in the same directory under the name stripe.py by any chance?

Related