#zishaansunderji-Terminal

1 messages ยท Page 1 of 1 (latest)

thorn bluff
#

Hello, "unknown error occurred" is hard to diagnose ๐Ÿ˜ฆ Could you check in your Dashboard log, to see if there is any error to that PaymentIntent creation call?

balmy holly
#

Hey! Yeah give me a sec!

#

So the payment intent status is processing

#
The user has completed the payment and Stripe is waiting for the funds from their bank.
Stripe is currently processing the payment.
#

This is the message I see

thorn bluff
#

How about the call the Confirm PaymentIntent?

#

that "An unknown error occurred"

balmy holly
#

The exact section of the code it fails, is this:

Terminal.getInstance().processPayment(collectedIntent, object : PaymentIntentCallback {
                            override fun onSuccess(@Nonnull confirmedIntent: PaymentIntent) {
                                val intentMap = Arguments.createMap()
                                var currency: String? = ""
                                Log.wtf("Reader payment success: ", "Success!!!");
                                if (options != null && options.hasKey(constants.CURRENCY)) {
                                    currency = options.getString(constants.CURRENCY)
                                }
                                intentMap.putMap(LiveFolders.INTENT, serializePaymentIntent(confirmedIntent, currency))
                                sendEvent(constants.EVENT_PAYMENT_CREATION, intentMap)
                            }

                            override fun onFailure(@Nonnull e: TerminalException) {
                                val errorMap = Arguments.createMap()
                                Log.wtf("Reader payment error: ", e.localizedMessage);
                                errorMap.putString(constants.ERROR, e.errorMessage)
                                errorMap.putInt(constants.CODE, e.errorCode.ordinal)
                                var currency: String? = ""
                                if (options != null && options.hasKey(constants.CURRENCY)) {
                                    currency = options.getString(constants.CURRENCY)
                                }
                                errorMap.putMap(LiveFolders.INTENT, serializePaymentIntent(collectedIntent, currency))
                                sendEvent(constants.EVENT_PAYMENT_CREATION, errorMap)
                            }
                        })
#

Sorry if it's not well formatted - just copied from Android Studio and it hits onFailure

#

the payment intent id comes out fine - and yeah confirmPaymentIntent responds successfully which I pass as collectedIntent

#
PaymentIntent(id=pi_3K3u8CG9SJKhrigu06bQBfP5, amount=717, amountCapturable=0, amountReceived=0, application=null, applicationFeeAmount=0, canceledAt=0, cancellationReason=null, captureMethod=manual, charges=null, clientSecret=pi_3K3u8CG9SJKhrigu06bQBfP5_secret_nWqncbxfKGdsjCbvuCuFCfw9L, confirmationMethod=null, created=1638846856, currency=usd, customer=null, description=Terminal Payment at Vine Street Cafe, invoice=null, lastPaymentError=null, livemode=true, metadata=null, onBehalfOf=null, paymentMethodId=null, receiptEmail=null, review=null, setupFutureUsage=null, statementDescriptor=null, status=REQUIRES_PAYMENT_METHOD, transferGroup=null)
#

so if you have a way to look - this is the latest request I tried with

#

so I just a payment right now - got the same error - but according to Stripe - it mostly looks good - besides the terminal telling me an Unknown error occurred:

thorn bluff
#

Yeah I see the Creation and Confirmation API both succeed

balmy holly
#

It seems like it's just toResult that fails: ConfirmPaymentResponseExtensions.toResult(ConfirmPaymentResponseExtensions.kt:18)

#

So I got messages from my apple card that it worked

#

but here's a visual reference of what I see from the reader

#

so the transaction is going through - it's just failing at the toResult code

thorn bluff
#

Hmm I see, interesting

balmy holly
#

but I just checked - sorry I didn't look at my phone - the transactions are fulfilled end to end - it just gives the user a card declined error

#

and we're supposed to navigate to another screen in the tablet app - which it didn't because of the card declined message

thorn bluff
#

Found nothing from the Android Terminal SDK repo

#

I am sorry I don't have an effective way to investigate for now. Could you please write into Support? We can spend more resource to look at it further, as a team. Maybe my colleague could have known ๐Ÿ™‡โ€โ™‚๏ธ

balmy holly
#

So I've used our codebase on the Wisepad 3, Chipper 2x and M2 chipper and this is the first one that I'm having trouble with processing a payment lol

thorn bluff
#

Please also mention that

balmy holly
#

Yeah for sure! What's the url for the Support page?

#

Sounds good!!

odd palmBOT
#

:question: Have a non-technical question, account issue, or need one-on-one support?
We wish we could help, but this community is focused on developers and technical discussions. Our support team will be able to assist you better than we can: https://support.stripe.com/contact

balmy holly
#

Awesome! Thanks for taking the time!! I really appreciate it!!

thorn bluff
#

(This is technical question), just the bot message template!

#

Thank you!

balmy holly
#

Gotcha! Sounds good! Thanks!!