#gaz_error
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1297923952470917241
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
anyone there?
Hi ๐ our guide for implementing Tap to Pay for Android starts here:
https://docs.stripe.com/terminal/payments/setup-reader/tap-to-pay?platform=android
Then is continued through the rest of our docs for building a terminal integration.
This covers connecting to the correct reader, which is the biggest difference from a typical terminal integration:
https://docs.stripe.com/terminal/payments/connect-reader
hey! thanks, i should just be able to build and run this right? https://github.com/stripe/stripe-terminal-android
when i run it i get
class=DefaultOfflineTraceManager message="Failed to fetch token"
com.stripe.stripeterminal.external.models.ConnectionTokenException: Creating connection token failed
๐ stepping in
hey @fresh apex thank for the help
If you are trying to run the sample app you need to ensure you are setting your keys correctly and deploying the backend as noted in https://github.com/stripe/example-terminal-backend
You'll need to add logging in that case to see why you aren't receiving a connection token as expected
where is that explained?
if i miss an "s" it due to keyboard, today "s" stopped working
yeh i think it must be, saw no mention of keys
Yep all explained in the README for https://github.com/stripe/example-terminal-backend
oh yeh i did that
Then as noted you need to add logging and debug on your end. I can't troubleshoot for you.
ok i did all that in the kotlin example so i will go back to that
its just a time out though
hmm it said timeout earlier not doing that now
what shall i output to the log?
Sorry that's not how this works. If you have specific questions about our API then I'm happy to help. But I can't do your debugging for you. I'd add logs in each step of the flow and see where it errors specifically. Then log out all relevant variables needed and see what the issue is from there.
lol
i dont really see what i can do then because it simply throws ConnectionTokenException
Have you logged out that you are successfully creating a connection token in the backend?
well ive logged that it fails doing that Creating connection token failed
Great, so have you logged out that Stripe is getting initialized correctly with your secret key in the backend?
Like I said you need to do each step here
I can't do this for you
yeh just wondering why you cannot help freely?
never heard that before
i mean theres not a lot to do apart from enter the right url
I am helping freely? But I don't control your code so I can't debug it...
oh i get you
If you have any specific questions then I am happy to help!
But I can't just tell you to do x then y then z
That just isn't realistic or how this server works.
ok cool i`ll be very specific about my questions i guess
ive set up a location on backend, ive deployed this backend successfully https://github.com/stripe/example-terminal-backend ive entered the key put the url in the example app at https://github.com/stripe/stripe-terminal-android i run it it says com.stripe.stripeterminal.external.models.ConnectionTokenException: Creating connection token failed
not sure what else i can say
What does:
ive entered the key put the url in the example app
mean?
You are using Render?
Heroku?
yes using render
Okay yeah I've never gone through the flow with Render so I don't know how that works really. Still though the next step would be to add logs within https://github.com/stripe/example-terminal-backend/blob/master/web.rb
Since the issue is the actual creation of the connection token it seems
i guess i can only see output if i run locally
Ah does Render not give you any view into logs?
That seems surprising
Why are you trying to spin up the Example app to begin with?
What are you trying to accomplish here and why not build your own app?
ah it does have logs
Okay yeah I would have been a bit surprised if it didn't
i usually tarted with the example app to make ure it work
damn this keyboard man
making life o difficult
ok o error is Error: you used a live mode secret key to set up the example backend. Please use your test mode secret key. For more information, see https://stripe.com/docs/keys#test-live-modes
wrong key! lol
๐
my ultimate aim i to allow tap to pay on a device without a reader
gonna fix the key issue now
ok that works, i tap collect payment, entered a payment, now it should recognise my card? doesnt seem to do it though
tapping "collect payment" id expect it to show a screen aking me to hold my card to the phone
connect reader->edit payment details-> (entered 10)->collect payment
ut that doesnt do anything the last utton "collect payment"
Are you using a test card?
just using my credit card
how do i get one of them ?
You can order one via your Dashboard
ah, what aah, can i not use a real card and just enter small amounts?
No I can't recommend that -- it is against card network regulations to test in live mode.
alo shouldnt the "collecy payment" button launch a new screen?
Generally it does not, no. It would just prompt you for your card usually. But I also don't know the exact implementation of this example app.
yeh no prompt
I'm not an Android dev but you would want to check the frontend code in that case to see what should be happening
And then similar to as we discussed before, you may need to add more logging to debug
yeh im assuming the sdk would fire up a new screen saying please tap card tc
Yeah not sure. Overall I don't think that it would necessarily be a new screen, but there should be some indicator once you indicate you want to take payment about collecting the card.
do u know if render can be used to do anything but tests?
I don't know, sorry.
No I have not
ok since tap to pay on stripe does not work i guess i need to find alternatives, thanks for the help anyway mate
Hi ๐
I'm stepping in as my colleague needed to go. I can say that tap to pay does work and I have successfully implemented it in Android (Kotlin)
But it sounds like you need to do more logging of your code and debug where connection token creations are failing
the "collect payment" utton doesnt do anything in the demo
no amount of logging can fix that ๐
I'm not sure what demo you are referring to
Are you still seeing the errors about connection tokens not being created?
no that it is ok if i use a test key
when i hit collect payment nothing happens
is your implementation available?
I built it myself following our guides for
- Connecting to a reader: https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=android&reader-type=tap-to-pay
- Collect card payments: https://docs.stripe.com/terminal/payments/collect-card-payment
but your code is not available?
ive spent 2 days trying to get the demos to work with no luck
and i cant afford to spend another 2 days to see if it might work, surely stripes own demos should work
maybe it needs me to be in a supported country?
i have uk card but im outside uk right now
basically this line doesnt work
service.createPaymentIntent(createPaymentIntentParams).enqueue(callback)
Sorry but that is nowhere near enough information to assist in what is going wrong here.
Have you verified that requests to your back-end are successful?
You say you have returned a connection token, do you log it in the Android app?
Do you successfully create a payment intent?
yep,
not sure why you havent tested the demo app
considering you seem to work for them
Because I find building my own implementations to be more useful in learning how the tech works
It only took a couple hours too
is that implementation private or can i try it?
It's private.
you see if the demo app itself doesnt work, made by the company, why would mine work
its calling on their intent even
so i cant see how me rewriting it all would help
its calling on their intent even
This statement makes no sense
that why i concluded the sdk is broken omehow
The intent object must be on your account
it makes perfect sense,
And you have create a location that will be used to manage your reader
that intent is in one of these
implementation "com.stripe:stripeterminal-localmobile:2.20.0"
implementation "com.stripe:stripeterminal-core:2.20.0"
which i dont have src for
Nope that still doesn't make sense. Are you saying that the function that creates the Payment Intent is not working?
im saying this line does nothing service.createPaymentIntent(createPaymentIntentParams).enqueue(callback)
which is part of the demo code
and thats inside their sdk
I use that same function and it works
yeh thats why im here, to ask for help
to see why it wont work
could u maybe set up the demo app to test it?
Have you verified that you have set up your publishable key to be used when initializing Stripe Terminal?
doh...
just saw log on render site
Error creating PaymentIntent! The card_present source type with currency usd is not supported in GB.
Finally it does something
nice, detected card too
yes, and enter 100, not 1
Yeah, that is below our minimum charge threshold
We strongly discourage testing in live mode. I understand if you want to try it out but repeated testing in Live mode can get your account flagged as fraudulent by card networks.
right yeh, just want to test once really
that was kotlin one gonna try java one now
so do u know how it works, is it simply just reading cc details and passing them to stripe api?
like could someone write one from scratch, im not sure what nfc can read from a card
It's more than just loading CC details, we handle tokenization to encrypt and not pass raw PANs back to the network.
Yeah that is because card_present is treated differently that card payment methods
The idea being that, the card holder is physically present not just entering card details on a website
Honestly, if you are in a rush to accept Tap To Pay payments and you don't need your own custom app, the Stripe app for Android allows you to collect payments directyl as well.
oh nice
well the idea is to build it into apps for clients
but thats good to know
Okay cool. I just wanted to make sure you knew you could get started immediately that way
yep thanks