bec*_*kah 3 android stripe-payments
我在我的Android应用程序中使用Stripe作为支付处理器,并尝试按照文档中所述对卡进行充电:https://stripe.com/docs/charges
我的问题具体是它无法解决Stripe.apiKey,或can not resolve symbol apiKey
我正在从文档中实现的代码:
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
Stripe.apiKey = "sk_test_********************";//this is where i hit a wall
// Token is created using Stripe.js or Checkout!
// Get the payment token submitted by the form:
String token = request.getParameter("stripeToken");
// Charge the user's card:
Map<String, Object> params = new HashMap<String, Object>();
params.put("amount", 1000);
params.put("currency", "usd");
params.put("description", "Example charge");
params.put("source", token);
Charge charge = Charge.create(params);
Run Code Online (Sandbox Code Playgroud)
我也在import com.stripe.android.*;我的文件顶部导入.
在我的Gradle文件中,我导入了Stripe库:
compile 'com.stripe:stripe-android:2.0.2'
Run Code Online (Sandbox Code Playgroud)
为什么Android无法解决Stripe.apiKey?
| 归档时间: |
|
| 查看次数: |
1023 次 |
| 最近记录: |