#harshil-ahir_code
1 messages ¡ Page 1 of 1 (latest)
đ 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/1265536654865858620
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Yes you shouldn't do this at all
What do you want to implement? We recommend to use Checkout or Elements, where you let Stripe collect the card for you
I have to generate a token for the card and store that token in database and with the help of that i have to show the user that these are the card you have added till now while it was an mobile application
If you have the card information (number) in your server, you would need to be PCI compliance. Normally you shouldn't and should avoid the PCI burden
So how can i do these ,can these will be done from the frontend side by Android/Ios developer will this will be possible that they can directly save that card and also with the customer id they can show the all cards that can be saved by the user
No, Android and iOS should use our official Android SKD or iOS SDK, which securely collect the information for you
so how can i show the user multiple card which he have added in the application ,can from Android/iOS i can get token of the card and i will save it in my database and attach that token to customer and with the help of customer i will get all the token and from that i can get the card details
No, you let Stripe tokenize the card and give back you a Payment Method Id pm_xxx, alongside with its last4. You can then display last4 for your customer with asterisk (*) before it, and link with the Id
PaymentSheet already does it for you (a component within iOS and Android SDK)
also i have seen online that there is a functionality of Process payments unsafely in my dashboard and if i enable it then it will work but i am not able to find that funcationality in my dashboard
It's not simple like that. Enabling that one will requires you on the highest level of PCI compliance and you will need to submit 40+ page document to Stripe every year, otherwise your account will be rejected
I would recommend staying away from PCI
Can you refer the code where i can show all the cards for a specific user for both android and ios
okay and how i can take the card for the payment can you reffer that too
also i have reffered link but it only provide solution for ios it shows this feature is in beta for android
Okie, you can use PaymentSheet instead which already has built in features for showing customer saved PaymentMethod when creating a new Payment
Choosing iOS or Android here: https://docs.stripe.com/payments/accept-a-payment?platform=ios
Currently we are using test mode in which the Android developer are using the default option for saving the card details in in the payment information still its not saving the card for the next payment for the same customer
Are they (your Android developer) using PaymentSheet? Please provide the request id req_xxx where you create a PaymentIntent for it
class StripePaymentHandler(
private val listener: StripePaymentListener,
private val fragment: Fragment
) {
private val paymentSheetResultCallback = PaymentSheetResultCallback {
when (it) {
PaymentSheetResult.Completed -> {
listener.onPaymentSuccess()
}
PaymentSheetResult.Canceled -> {
listener.onPaymentCancelled()
}
is PaymentSheetResult.Failed -> {
listener.onPaymentFailed()
}
}
}
private val paymentSheet = PaymentSheet(fragment, paymentSheetResultCallback)
fun initiatePayment(data: InitiatePaymentResponse) {
println("customer ${data.customerId.toString()}")
val paymentIntentClientSecret = data.payamentIntenetClientSecretKey
val customerConfig = PaymentSheet.CustomerConfiguration(
data.customerId.toString(),
data.ephemeralKey.toString()
)
PaymentConfiguration.init(fragment.requireContext(), data.publishableKey.toString())
paymentSheet.presentWithPaymentIntent(
paymentIntentClientSecret = paymentIntentClientSecret.toString(),
configuration = PaymentSheet.Configuration(
merchantDisplayName = fragment.requireContext().getString(R.string.app_name),
customer = customerConfig,
allowsDelayedPaymentMethods = false
)
)
}
}
this is my code how can i send the request id
and i have same doubt for ios also
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.