#mkoenke-customer-payments

1 messages ยท Page 1 of 1 (latest)

placid summit
solid scaffold
#

thanks! We are trying to use that (in ruby) and getting an error NoMethodError: undefined method 'search' for Stripe::PaymentIntent:Class

#

example: Stripe::PaymentIntent.search({query:'email:\'cadcheckoutffon@gmail.com\''})

placid summit
solid scaffold
#

hmmm looking through the logs and dont see anything for payment intents - do you know the api endpoint I can search by? is it /v1/payment_methods ?

#

doubt it

placid summit
#

You would want to make sure that GET is included in your search filter. Let me see if I can find the endpoint

#

Here it is: /v1/payment_intents/search

solid scaffold
#

ok hold on

#

no results

placid summit
#

Very odd. Are you able to confirm you're in test mode versus non-test-mode?

#

Or rather, can you confirm if the request was made using a test-mode key? If so, make sure the Dashboard is in test-mode

solid scaffold
#

yes, I am in test mode on the dashboard and executing from my local environment where everything is in test mode

placid summit
#

Ah! Okay, are you initializing Stripe somewhere?

#

it sounds like the stripe object may not be accessible to the section of the code that's running the search

solid scaffold
#

hmm - I put a binding.pry in the code right before we do a Stripe::PaymentIntent.create call, and that call works, so I think we do have a stripe instance

placid summit
#

I don't think the call is working if there are no logs and you're getting that error, unless I'm overlooking something. Are you able to make other Ruby calls via the same file?

solid scaffold
#

yep! I can run Stripe::PaymentIntent.create( charge_params, idempotency_key: idempotency_key( transaction, capture_method, ), )

#

that gives me a response

austere falcon
#

Hi ๐Ÿ‘‹ I'm stepping in for @placid summit .

#

What is your syntax for using the Search API?

solid scaffold
#

Stripe::PaymentIntent.search({query:'email:\'cadcheckoutffon@gmail.com\''})

austere falcon
solid scaffold
#

ooo we use that in other places, that could work

#

awesome - i'll try that out

austere falcon
#

Sure thing! Happy to help ๐Ÿ™‚