#taha_docs

1 messages ¡ Page 1 of 1 (latest)

carmine helmBOT
#

👋 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/1384427987033657464

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

midnight stump
#

Hi! By saying Stripe Terminal test card, you are referring to the physical Stripe test card correct? If yes, then yeap you cna sue that.

lime canyon
#

Yes physical test card

#

But if I tap that to the back of the mobile device where the NFC is located, nothing happens, although I see a button with text 'TAP TO SIMULATE PAYMENT'. On clicking the button the payment is successfully processed.

midnight stump
#

Does the button appear when you tap the card?

lime canyon
#

Its already visible when stripe sdk takes over the screen

midnight stump
#

Give me a moment to look into it.

lime canyon
#

I can share the screenshot if that helps

midnight stump
#

Yeap that would be great!

lime canyon
#

Here it is

midnight stump
#

Are you doing the exact thing from the link above?

lime canyon
#

Yes

midnight stump
#

Do you mind sharing the code on how you are collecting the card payment?

lime canyon
#

sure

#

Retrieved payment intent

private val paymentIntentCallback by lazy {
object : PaymentIntentCallback {
override fun onSuccess(paymentIntent: PaymentIntent) {
updateTerminalState(TerminalState.PaymentIntentSuccess)
this@DefaultExtensiaPaymentManager.paymentIntent = paymentIntent
/**
Payment intent received, now collecting payment
* **/
collectPaymentMethod(paymentIntent)
}

        override fun onFailure(e: TerminalException) {
            updateTerminalState(
                TerminalState.PaymentIntentFailure(e.message.toString())
            )
        }
    }
}

private fun collectPaymentMethod(intent: PaymentIntent) {
paymentCancellable = Terminal.getInstance().collectPaymentMethod(
callback = collectPaymentIntentCallback,
intent = intent,
config = paymentCollectionConfig
)
}

private val collectPaymentIntentCallback by lazy {
object : PaymentIntentCallback {
override fun onFailure(e: TerminalException) {
updateTerminalState(
TerminalState.PaymentMethodCollectionFailure(e.message.toString())
)
}

        override fun onSuccess(paymentIntent: PaymentIntent) {
            updateTerminalState(TerminalState.PaymentMethodCollected)
            /**
            Confirming Payment
             * **/
            confirmPayment(paymentIntent)
        }
    }
}
midnight stump
lime canyon
#

Ok let me try

#

Debuggable applications are not supported in the production version of the Tap to Pay reader. Please use a simulated version of the reader by setting DiscoveryConfiguration.isSimulated to true

i am getting the above error

carmine helmBOT
young lance
#

Hey! Taking over for my colleague. What type of device are you using ?

lime canyon
#

Hey I am using Samsung Galaxy A15

young lance
#

Have you enabled developer/debug mode in it ?

lime canyon
#

Yes, I changed to release mode and it worked

#

along with TapToPayDiscoveryConfiguration.isSimulated to false

#

Thank you