#gaz_error

1 messages ยท Page 1 of 1 (latest)

tawny veldtBOT
#

๐Ÿ‘‹ 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.

drifting shell
#

anyone there?

tall karmaBOT
buoyant jacinth
#

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

Accept contactless payments on a compatible iPhone or Android device with the Stripe Terminal SDK.

Connect your application to a Stripe Terminal reader.

drifting shell
tawny veldtBOT
drifting shell
#

when i run it i get

#

class=DefaultOfflineTraceManager message="Failed to fetch token"
com.stripe.stripeterminal.external.models.ConnectionTokenException: Creating connection token failed

fresh apex
#

๐Ÿ‘‹ stepping in

drifting shell
#

hey @fresh apex thank for the help

fresh apex
drifting shell
#

yes backend was deployed to render

#

and added to gradle properties file

fresh apex
#

You'll need to add logging in that case to see why you aren't receiving a connection token as expected

drifting shell
#

not ure about keys though

#

sure

fresh apex
#

Oh yeah you do need to set your keys

#

So that very well could be the issue

drifting shell
#

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

fresh apex
drifting shell
#

oh yeh i did that

fresh apex
#

Then as noted you need to add logging and debug on your end. I can't troubleshoot for you.

drifting shell
#

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?

fresh apex
#

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.

drifting shell
#

lol

#

i dont really see what i can do then because it simply throws ConnectionTokenException

fresh apex
#

Have you logged out that you are successfully creating a connection token in the backend?

drifting shell
#

well ive logged that it fails doing that Creating connection token failed

fresh apex
#

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

drifting shell
#

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

fresh apex
#

I am helping freely? But I don't control your code so I can't debug it...

drifting shell
#

oh i get you

fresh apex
#

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.

drifting shell
#

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

GitHub

A simple, easy-to-deploy backend that you can use to run the Stripe Terminal example apps - stripe/example-terminal-backend

GitHub

Stripe Terminal Android SDK. Contribute to stripe/stripe-terminal-android development by creating an account on GitHub.

#

not sure what else i can say

fresh apex
#

What does:

ive entered the key put the url in the example app
mean?

#

You are using Render?

#

Heroku?

drifting shell
#

yes using render

fresh apex
#

Since the issue is the actual creation of the connection token it seems

drifting shell
#

i guess i can only see output if i run locally

fresh apex
#

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?

drifting shell
#

ah it does have logs

fresh apex
#

Okay yeah I would have been a bit surprised if it didn't

drifting shell
#

i usually tarted with the example app to make ure it work

#

damn this keyboard man

#

making life o difficult

#

wrong key! lol

fresh apex
#

๐Ÿ‘

drifting shell
#

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"

fresh apex
#

Are you using a test card?

drifting shell
#

just using my credit card

fresh apex
#

That won't work

#

You have to use a test card to test

drifting shell
#

how do i get one of them ?

fresh apex
#

You can order one via your Dashboard

drifting shell
#

ah, what aah, can i not use a real card and just enter small amounts?

fresh apex
#

No I can't recommend that -- it is against card network regulations to test in live mode.

drifting shell
#

alo shouldnt the "collecy payment" button launch a new screen?

fresh apex
#

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.

drifting shell
#

yeh no prompt

fresh apex
#

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

drifting shell
#

yeh im assuming the sdk would fire up a new screen saying please tap card tc

fresh apex
#

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.

drifting shell
#

do u know if render can be used to do anything but tests?

fresh apex
#

I don't know, sorry.

drifting shell
#

have you ued the java example (not kotlin) ?

#

used

fresh apex
#

No I have not

tawny veldtBOT
drifting shell
#

ok since tap to pay on stripe does not work i guess i need to find alternatives, thanks for the help anyway mate

uncut quartz
#

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

drifting shell
#

the "collect payment" utton doesnt do anything in the demo

#

no amount of logging can fix that ๐Ÿ™‚

uncut quartz
#

I'm not sure what demo you are referring to

#

Are you still seeing the errors about connection tokens not being created?

drifting shell
#

no that it is ok if i use a test key

#

when i hit collect payment nothing happens

#

is your implementation available?

uncut quartz
drifting shell
#

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)

uncut quartz
#

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?

drifting shell
#

yep,

#

not sure why you havent tested the demo app

#

considering you seem to work for them

uncut quartz
#

Because I find building my own implementations to be more useful in learning how the tech works

#

It only took a couple hours too

drifting shell
#

is that implementation private or can i try it?

uncut quartz
#

It's private.

drifting shell
#

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

uncut quartz
#

its calling on their intent even
This statement makes no sense

drifting shell
#

that why i concluded the sdk is broken omehow

uncut quartz
#

The intent object must be on your account

drifting shell
#

it makes perfect sense,

uncut quartz
#

And you have create a location that will be used to manage your reader

drifting shell
#

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

uncut quartz
#

Nope that still doesn't make sense. Are you saying that the function that creates the Payment Intent is not working?

drifting shell
#

im saying this line does nothing service.createPaymentIntent(createPaymentIntentParams).enqueue(callback)

#

which is part of the demo code

#

and thats inside their sdk

uncut quartz
#

I use that same function and it works

drifting shell
#

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?

uncut quartz
#

Have you verified that you have set up your publishable key to be used when initializing Stripe Terminal?

drifting shell
#

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

uncut quartz
#

Yup

#

So it sounds like you need to change the currency param

drifting shell
#

yes, and enter 100, not 1

uncut quartz
#

Yeah, that is below our minimum charge threshold

drifting shell
#

so that was in test mode, can i try it for real somehow ?

#

i guess ill just try

uncut quartz
#

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.

drifting shell
#

right yeh, just want to test once really

#

that was kotlin one gonna try java one now

drifting shell
#

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

uncut quartz
#

It's more than just loading CC details, we handle tokenization to encrypt and not pass raw PANs back to the network.

drifting shell
#

right yes

#

doesnt even ask for the csv etc

uncut quartz
#

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

drifting shell
#

ah yeh

#

its very cool indeed

uncut quartz
#

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.

drifting shell
#

oh nice

#

well the idea is to build it into apps for clients

#

but thats good to know

uncut quartz
#

Okay cool. I just wanted to make sure you knew you could get started immediately that way

drifting shell
#

yep thanks