#Monkey D. Luffy
1 messages · Page 1 of 1 (latest)
Can you share your code?
stripe.api_key = settings.STRIPE_SECRETE_KEY
resp = stripe.terminal.Reader.process_payment_intent(device_id, payment_intent=pm_id)
return resp
Where is that line coming from? Are you following a guide?
Yes
Step 2: Process Payment from that document
Ah, I'm sorry hold on. I gave you the wrong docs
These are for Terminal
Unless... are you using terminal?
Ah, okay perfect. Then those are the ones you'll want
Are you using a simulated reader?
Yeah
Can you do a print() statement before the function call to see if stripe is initialized?
What version of the Stripe API are you on? You can view that here: https://dashboard.stripe.com/test/developers
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
2022-11-15
Latest
<module 'stripe' from '/home/ajay/projects/pro-reader/venv/lib/python3.8/site-packages/stripe/init.py'>
Can you do print(stripe.terminal.Reader)?
ok
Does anything show up?
<class 'stripe.api_resources.terminal.reader.Reader'>
Ah, sorry, try:
import json print(stripe.terminal.Reader.json.dumps())
I want to see all the Reader object's attributes/methods
"type object 'Reader' has no attribute 'json'"
Ah sorry, I'm dumb. Python is weird.
Do: print(json.dumps(stripe.terminal.Reader))
"Object of type type is not JSON serializable"
What about print(json.dumps(stripe.terminal))
That looks like an IDE modal. Can you copy/paste the contents of the output from print(json.dumps(stripe.terminal))?
Its throwing error
What's the error?
"Object of type module is not JSON serializable"