#Monkey D. Luffy

1 messages · Page 1 of 1 (latest)

abstract perchBOT
late adder
#

Hi
Can you share more details please ?

noble star
#

Yeah sure

#

stripe.terminal.Reader.process_payment_intent(device_id, payment_intent=pm_id)
I am using above method to process payment intent from stripe terminal and I am getting the above mentioned error

late adder
noble star
#

I didn't get any error It's 500

#

It's saying it didn't has this method
process_payment_intent

late adder
noble star
#

Let me send you full code

#

def pos_process_payment_intent(self, device_id, pm_id):
try:
stripe.api_key = settings.STRIPE_SECRETE_KEY
resp = stripe.terminal.Reader.process_payment_intent(device_id, payment_intent=pm_id)
return resp

    except stripe.error.StripeError as e:
        raise ValidationError(str(e).split(":")[1].strip())
#

Its saying terminal.Reader doesn't have process_payment_intent Method

late adder
#

Can you share your accountId ?

noble star
#

Where can I find account id?

late adder
noble star
#

AccountID:

noble star
late adder
#

Are you getting this error 500 from Stripe API ?

#

Share the complete Stacktrace

noble star
#

Yes

late adder
noble star
#

type object 'Reader' has no attribute 'process_payment_intent'

late adder
#

Can you share a screenshot of the error

noble star
late adder
#

That's not a Stripe API, who is the maintainer of that endpoint ?

#

/store/cart/...

noble star
#

its not stripe API can you see the method I am using in that SS

late adder
#

Yes is the value of pm_id?

noble star
#

device_id: tmr_FCyeVAhlnw5xuu
pm_id: pi_3N8ic9LmCssJZxZe1hUjHvQb

#

From documentation
stripe.terminal.Reader.process_payment_intent("tmr_xxx", payment_intent="pi_xxx")

late adder
#

Yes, but the error message not clear from where you are getting it.

late adder
noble star
#

acct_1ICRDKLmCssJZxZe

late adder
#

What Stripe Python SDK version you are using ?

noble star
#

stripe==2.56.0

late adder
#

it uses the method stripe.terminal.Reader.process_payment_intent

noble star
#

Yeah sure

late adder
#

try using a more recent version of Stripe python SDK e.g. 5.4.0

#

You need to upgrade Stripe SDK

noble star
#

Okay Sure

abstract perchBOT