#Monkey D. Luffy

1 messages · Page 1 of 1 (latest)

visual summitBOT
slate orchid
#

Can you share your code?

halcyon quarry
#

stripe.api_key = settings.STRIPE_SECRETE_KEY
resp = stripe.terminal.Reader.process_payment_intent(device_id, payment_intent=pm_id)
return resp

slate orchid
#

Where is that line coming from? Are you following a guide?

halcyon quarry
#

Yes

#

Step 2: Process Payment from that document

slate orchid
#

Ah, I'm sorry hold on. I gave you the wrong docs

#

These are for Terminal

#

Unless... are you using terminal?

halcyon quarry
#

yes I am using terminal

#

Server-Driven Integration

slate orchid
#

Ah, okay perfect. Then those are the ones you'll want

halcyon quarry
#

Ye

#

Any update on why I am getting error?

slate orchid
#

Are you using a simulated reader?

halcyon quarry
#

Yeah

slate orchid
#

Can you do a print() statement before the function call to see if stripe is initialized?

halcyon quarry
#

2022-11-15
Latest

#

<module 'stripe' from '/home/ajay/projects/pro-reader/venv/lib/python3.8/site-packages/stripe/init.py'>

slate orchid
#

Can you do print(stripe.terminal.Reader)?

halcyon quarry
#

ok

slate orchid
#

Does anything show up?

halcyon quarry
#

<class 'stripe.api_resources.terminal.reader.Reader'>

slate orchid
#

Ah, sorry, try:
import json print(stripe.terminal.Reader.json.dumps())

#

I want to see all the Reader object's attributes/methods

halcyon quarry
#

"type object 'Reader' has no attribute 'json'"

slate orchid
#

Ah sorry, I'm dumb. Python is weird.

Do: print(json.dumps(stripe.terminal.Reader))

visual summitBOT
halcyon quarry
#

"Object of type type is not JSON serializable"

slate orchid
#

What about print(json.dumps(stripe.terminal))

halcyon quarry
slate orchid
#

That looks like an IDE modal. Can you copy/paste the contents of the output from print(json.dumps(stripe.terminal))?

halcyon quarry
#

Its throwing error

slate orchid
#

What's the error?

halcyon quarry
#

"Object of type module is not JSON serializable"