#Nimisha
1 messages ยท Page 1 of 1 (latest)
Can you share your code that throws that error?
mense full code?
The particular block of code that is triggering the error in the screenshot
Not the full code of your application
ok
Are you creating an ephemeral key?
i have two key publisher key andSecret Key only
Yep, you're passing the wrong keys (your API keys). You need to create an ephemeral key for your customer to be passed to your CustomerSession class: https://stripe.com/docs/mobile/android/basic#set-up-ephemeral-key
ok,how we can generate ephemeral key
The doc above details all of this
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
Ok, and did you try it?
yes
Did it work?
No
Was there an error?
Hey, just getting some help from a colleague!