在Android中进行条带化集成并创建令牌 [英] Stripe integration in android and create token
问题描述
我想在Android中集成Stripe,并使用可发布的密钥测试代码.我想在与卡成功交易后创建令牌,将任何建议的代码作为参数.
I want to integrate stripe in android and test the code with publishable key. I want to create token after successful transaction with the card params any suggested code.
推荐答案
您不应在Android应用程序内付费.客户端(这里是您的App)应该只获得Stripe令牌,然后将此令牌发送到您的后端(您的服务器),然后使用此令牌创建带有Stripe的费用.
You should not make a charge inside the Android app. The client (here your App), should only get a Stripe token, then send this token to your backend (your server), and then use this token to create a charge with stripe.
您不能创建收费客户端,因为它不安全:您的密钥不应该在应用程序内部,因为它不再是秘密了.
You must not create a charge client side as it is not secure : your secret key should not be inside the app, as it won't be secret anymore.
这就是lib stripe-android
不具有charge类的原因:这不是为了这个. stripe-java
库用于在Java服务器上使用.
This is the reason why the lib stripe-android
does not have the charge class : it is not meant for that.
The stripe-java
lib is meant to be used on a java server.
这篇关于在Android中进行条带化集成并创建令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!