【发布时间】:2015-07-09 22:54:51
【问题描述】:
这是关于 Stripe Payments API “https://stripe.com/docs/mobile/ios”
我想知道是否有人能够使用 iOS 应用程序中的 Stripe API 向信用卡收费,而不是将 stripeToken 发送到服务器。
一位开发人员可以在我们的应用程序的 android 版本上通过将条带 Java 客户端库添加到他的应用程序中来做到这一点。在 android/java 上是这样的
Stripe.apiKey = "sk_test_apikey";
Map<String, Object> chargeParams = new HashMap<String, Object>();
chargeParams.put("amount", 400);
chargeParams.put("currency", "usd");
chargeParams.put("source", "tok_321jlkj54545B");
chargeParams.put("description", "Charge for test@example.com");
Charge.create(chargeParams);
对于 Stripe Payments API,我需要上述 Android/Java 代码的 iOS 等价物。它可能是一个 post http 请求,或者可能在内置的 Stripe iOS 库中已经有一个方法。
我想知道是否有人能够做到这一点,或者我真的需要创建一个服务器来从 iOS 应用程序向信用卡收费。
谢谢!
【问题讨论】:
-
有 3rd 方工具可以为你处理服务器端的东西(基本上它们将你的公钥链接到你的私钥),stripe.com/docs/integrations 会列出一些
标签: objective-c swift stripe-payments