3
我试图将卡添加到一个客户用下面的代码:异常产生条纹卡
cu = stripe.Customer.retrieve(customer_id)
cu.cards.create(card=token)
不过,我收到以下异常:
'ListObject' object has no attribute 'create'
似乎cu.cards没有“创建”方法。
我对Python使用1.12.0库。
我在这里做错了什么?
感谢您发布此信息。我遇到了同样的错误,但除了升级API版本之外,我不得不通过运行'pip install -U stripe'来升级python库 –