#Nimisha

1 messages ยท Page 1 of 1 (latest)

grand heronBOT
runic saddle
#

Can you share your code that throws that error?

final yew
#

mense full code?

runic saddle
#

The particular block of code that is triggering the error in the screenshot

#

Not the full code of your application

final yew
#

ok

runic saddle
#

Are you creating an ephemeral key?

final yew
runic saddle
final yew
#

ok,how we can generate ephemeral key

runic saddle
#

The doc above details all of this

final yew
#

ok

#

package com.stripedemo.utils

import androidx.annotation.Size
import com.stripe.android.EphemeralKeyProvider
import com.stripe.android.EphemeralKeyUpdateListener

class StripeDemoEphemeralKeyProvider(private val ephemeralKeyRawJson: String) : EphemeralKeyProvider {

override fun createEphemeralKey(@Size(min = 4) apiVersion: String, keyUpdateListener: EphemeralKeyUpdateListener)
{
    keyUpdateListener.onKeyUpdate(ephemeralKeyRawJson)
}

}

#

this is the code for EphemeralKey generating

runic saddle
#

Ok, and did you try it?

final yew
#

yes

runic saddle
#

Did it work?

final yew
#

No

runic saddle
#

Was there an error?

final yew
#

actually it is not generating by this code ..bcz it's gives null

runic saddle
#

Hey, just getting some help from a colleague!

frosty briar
#

Hi there ๐Ÿ‘‹ I'm jumping in to lend a hand, please bear with me a moment while I catch up on the context here.

#

What is the value of ephemeralKeyRawJson passed to StripeDemoEphemeralKeyProvider constructor at runtime?