#kelvin_webhooks

1 messages · Page 1 of 1 (latest)

celest starBOT
#

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

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

smoky agate
#

Hello, let me take a look at this payment

deep stag
#

👍

smoky agate
deep stag
#

yes

smoky agate
#

Paynow isn't supported in Stripe Android SDK yet, so you'll want o render the next_action.paynow_display_qr_code.hosted_instructions_url in your mobile app and instruct your customer to scan the qr code with their respective banking app

deep stag
#

yeah, but this is for iOS tho, also next_action.paynow_display_qr_code.hosted_instructions_url we just place for reference on FE only. On FE (iOS), we call cofirmPaymentSheetPayment and intentCreationCallback to show the paynow webview from Stripe

smoky agate
#

Then you’ll need to use diffident code to handle iOS and android

deep stag
#

problem came after intentCreationCallback finish, sometime awai confirmPaymentSheetPayment return response, and a lot of times it's doesn't

smoky agate
#

Anyway, for this particular payment, I don’t see you confirm it from front end. Is this the correct payment that we should discuss about?

deep stag
#

yes, paynow & on ios

smoky agate
#

Do you have the id of the payment intent where you encountered the said problem?

deep stag
#

let me create another one really quick

#

client_secret: pi_3RxLydEOhqD74pZ21tZqweSD_secret_yF6i7aZRa5vgp59nAl5uCSS8o

#

our workflow:

  • FE: initPaymentSheet({customFlow: true, intentConfiguration})
  • FE: presentPaymentSheet()
  • FE: confirmPaymentSheetPayment()
  • BE: PaymentIntent.create
  • BE: PaymentIntent.confirm
  • BE: response handleNextAction with paynow QR code image and timeout
  • FE: intentCreationCallback

everything when well, booking confirm on our end, only confirmPaymentSheetPayment doesn't return response so FE cannot proceed to next screen

smoky agate
#

You don’t need to confirm the payment intent from backend if you already confirm it from front end

deep stag
#

so, because the whole flow work for all other type of payment, is there anyway in BE i can know this is a paynow intent, and i can if/else that will not to confirm it?

smoky agate
deep stag
#

no, didn't receive anythong from confirmPaymentSheetPayment

#

from confirmHandler it return us unknown rather than paynow and it's for FE, meanwhile we need to if/else it in BE 🥹

smoky agate
#

Ok, did you call confirmPaymentSheetPayment with await? Can you share with me the code?

deep stag
#

yes, i do call with async/ await, here it's

    setLoading(true)
    const confirmData = await confirmPaymentSheetPayment()
    const {error: confirmError} = confirmData
    //... log confirmError here
    setLoading(false)
smoky agate
#

Did you see any errors in your react-native log? because I still don't see any confirmation request initiated from your react-native app

deep stag
#

yeah , no error at all, and no log run after await confirmPaymentSheetPayment() also, it's like confirmPaymentSheetPayment never fulfill

smoky agate
#

can you put some log to confirm if confirmPaymentSheetPayment is called successfully?

deep stag
#

yes i also did that, and confirm it runs because it show the paynow webview, technically it's something like this:

// log run here
const confirmData = await confirmPaymentSheetPayment()
// log here also but it doesn't run
smoky agate
#

Ok, so did you complete the payment in the test paynow webview?

deep stag
#

yes, yes it did completed

smoky agate
#

Did you see a timer countdown after clicking on the "authorize payment" on the test page?

deep stag
#

no i didn't, it close the webview asap i tap authorize test payment

smoky agate
#

Looks like you are using a very old version of Stripe-react-native SDK (i.e., 0.38.3), can you upgrade to the new version and try again?

deep stag
#

yeah, which version you recommend? because we really strict in update version 🙁

smoky agate
#

I'll always recommend the latest version

deep stag
#

is there any other ways i can work around this issue?

smoky agate
#

I'm unable to reproduce this problem. Can you share with me a sample reac-native project that I can run and replciate the issue?

deep stag
#

last time we still okay using it, 1/5 confirmPaymentSheetPayment doesn't response, nowaday it's 4/5 doesn't

#

it requires some BE team effort to create a test probject for you, let me ask them. But if i remove PaymentIntent.confirm from backend, does confirmPaymentSheetPayment will have response ?

smoky agate
#

I can' reproudce the problem and I haven't found out the root cause yet. Can you test it out?