#ceo_code

1 messages ยท Page 1 of 1 (latest)

balmy crownBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

thorny stagBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

wooden epoch
#

๐Ÿ‘‹ happy to help

river granite
#

tml_EZMp4AeQ0i5Bw7

#

We are trying to implement Stripe Tap to Pay on IOS and have this issue at the moment.

wooden epoch
#

what's the request that is failing?

tiny kestrel
#

hello, if we want to implement tap to pay through react native, it is necessary to made some setting in the stripe dashboard platform to be allowed to use it ?

tiny kestrel
#

I tried to do this, but I didn't find that tab in apple platform, there is no tab with that name

wooden epoch
#

you mean the additional capabilities?

tiny kestrel
#

yes, additional capabilities

wooden epoch
#

looking now

#

give me a second please

#

what page are you on, on the apple side?

balmy crownBOT
kind obsidian
#

hmm I don't know sorry, these are just the instructions we get from Apple and it's their site and docs. I'd suggest keep looking and maybe reach out to Apple developer support for clarity or open a support ticket at https://support.stripe.com/?contact=true and maybe someone internally knows more about this.

balmy crownBOT
kind obsidian
river granite
#

@tiny kestrel

river granite
#

is the main account

#

we do pay yearly for their membership too

tiny kestrel
#

however, somehow I managed to discover a reader through discoverReader function with localMobile method, but that reader has an address in US and when I tried to connectLocalMobileReader with that reader it gives me an error as I am in Romania and I have no merchant.

My first question is: how discoverReader works with localMobile prop, what exactly it does ?

#

That discoverReader function discover readers which are related to that tokenProvider or not ?

kind obsidian
tiny kestrel
#

so if I am a developer in Romania , I cannot implement this feature for UK, I have to be in uk ? or I have to fake somehow location of my device ?

kind obsidian
#

I'm not 100% sure. it's quite likely though. Let's start with :

when I tried to connectLocalMobileReader with that reader it gives me an error as I am in Romania and I have no merchant.
what exact error mesage and stack trace do you have?

tiny kestrel
#

this is the error

#

this is the reader which discoverReader function finds

kind obsidian
#

based on reading the error message : have you considered then creating a Location object in a supported country and using that?
Step 1 : https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=ios&reader-type=tap-to-pay#create-location and pass the Location ID in Step 3 : https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=ios&reader-type=tap-to-pay#connect-reader
I'd also suggest using a Stripe account in a supported country(not your own RO dev account which it sounds like is what you're using).

tiny kestrel
#

ok, Step 1 , is server side, so on the server side I have to create a continuationToken which I have to pass to StripeTerminalProvider through tokenProvider and discoverReaders will find the right one ?

balmy crownBOT
river granite
#

I have provided the above screenshot

kind obsidian
#

can you leave the chat to us developers instead please?

tiny kestrel
#

but for the second with reader, Is it requierd to asign a location to the stripeClient ?

#

as you see above in the screenshots from @river granite , there are some testLocations created on that stripeClient api_key, but somehow can you leave the chat to us developers instead please?

kind obsidian
#

that's what the error message is telling you ".. as determined by the Location this reader is registered to, none - used merchant"
the reason it says "none" is probably because you did not pass a Location

#

if you're having difficulty, share the actual code you're writing so we can look and potentially help

tiny kestrel
kind obsidian
#

then help us to help you by sharing the exact code you're writing and the values of the variables you're passing and ID of the location.

tiny kestrel
#

const { discoverReaders, discoveredReaders, cancelDiscovering, connectLocalMobileReader } =
useStripeTerminal({
onUpdateDiscoveredReaders: (readers) => {
console.log(">>>> readers:", readers)
handleDiscoverAReader(readers)
},
onDidChangeConnectionStatus: (status) => {
console.log(">>>> status:", status)
},
});

const handleDiscoverAReader =async (readerDiscovered:any) =>{
  console.log(">>> handleReader: ", readerDiscovered)
  if (readerDiscovered.length > 0){
    const {reader, error} = await connectLocalMobileReader({
      reader: readerDiscovered[0],
      locationId:'tml_EZMp4AeQ0i5Bw7'
    })
    if (error) {
      console.log('connectLocalMobileReader error:', error);
      return;
    }
    
    console.log('Reader connected successfully', reader);
   }
}


useEffect(() => {
  console.log('Starting reader discovery...')

  const discover = async () => {
    // console.log('Calling discoverReaders...')

    const { error } = await discoverReaders({
      discoveryMethod: 'localMobile',
      simulated: true, // false gives an error
    })

    if (error) {
      console.log('Error discovering readers:', error)
    } else {
      console.log('discoverReaders called successfully.')
    }
  }
  discover();

  return () => {
    console.log('Cancelling reader discovery...')
    cancelDiscovering()
  }
}, [discoverReaders, cancelDiscovering])
#

I think is clearer in this screenshot (is the same code as above)

#

readerDiscovered[0] variable is this:

stray saddle
#

You still seem to be passing simulated: true to the discoverReaders function? Since you have a real location (tml_xxx) you should omit that really

#

Not even sure if TTP supports simulated readers

tiny kestrel
#

ok, I'll change it and retry

#

ok, back to square 1, after i change that I receive this, so the entitlements, I'll write to apple, think this is the next normal step

stray saddle
#

Yeah I think passing simulated: true is masking the real issue here which is the above

#

If you pass simulated: true then it forgoes the registered location for the reader (GB) and probably uses the location of your device (which is obviously unsupported)

#

To use Tap to Pay on iPhone to accept payments, your application must request and configure the Tap to Pay on iPhone entitlement from your Apple Developer account. Review the instructions for requesting this entitlement.
https://developer.apple.com/documentation/proximityreader/setting-up-the-entitlement-for-tap-to-pay-on-iphone?language=objc

Apple Developer Documentation

Request and configure the required entitlement to support Tap to Pay on iPhone.

river granite
#

There is no tap to pay in our account

#

using the owner login credentials

stray saddle
#

Then that's probably a question for Apple, not Stripe

river granite
#

we can try to register a new idenfifier

balmy crownBOT