iOS - 集成信用卡支付

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8762096/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 16:11:18  来源:igfitidea点击:

iOS - Integrating credit card payments

ioscredit-cardin-app

提问by Satyam

I'm aware that we can integrate in-app purchases with storekit. but i want to integrate payments using credit card. will apple allow to integrate such libraries? Are there any such libraries available where users can use their credit card for payment of products with in my app?

我知道我们可以将应用内购买与 storekit 集成。但我想使用信用卡整合付款。苹果会允许集成这样的库吗?是否有任何此类库可供用户使用他们的信用卡在我的应用程序中支付产品?

回答by David Brainer

Depending on what users are purchasing*, you should be just fine accepting payments in your app. Instead of trying to incorporate some type of payment library into the app I would recommend using a payment API that offloads the work. Take a look at http://stripe.com/for an example of an excellent payment system designed for ease of integration. Their API reference even mentions integration with iPhone apps.

根据用户购买的内容*,您应该可以在您的应用中接受付款。与其尝试将某种类型的支付库合并到应用程序中,我更建议使用可以卸载工作的支付 API。请查看http://stripe.com/以了解为易于集成而设计的出色支付系统示例。他们的 API 参考甚至提到了与 iPhone 应用程序的集成

*If you are trying to sell features or services of the app itself you will almost definitely be running afoul of Apple's guidelines, but based on the fact that you said "products" I am assuming this is not the case. In fact, while you must use the in-app purchase system for "content, functionality, or services in an app" you are specifically forbidden from using it for "physical goods or goods and services used outside of the application" (item 11.3 of Apple's App Store Review Guidelines).

*如果您试图销售应用程序本身的功能或服务,您几乎肯定会违反 Apple 的指导方针,但基于您所说的“产品”这一事实,我假设情况并非如此。事实上,虽然您必须将应用内购买系统用于“应用内的内容、功能或服务”,但您被明确禁止将其用于“在应用外使用的实体商品或商品和服务”(第 11.3 条)。 Apple 的 App Store 审核指南)。

回答by Ronen Morecki

Apple doesallow not Apple's IAP in-app payments for goods not consumed in the phone (Digital content) as stated above. See this example of an approved app that use external library for accepting credit cards in their app: iStash

苹果不会允许不是苹果的IAP应用程序内支付在手机(数字内容)不消费的商品如上面所述。请参阅以下已批准应用的示例,这些应用使用外部库在其应用中接受信用卡: iStash

In my opinion Stripe is good solution but not the ideal for in-app as it is a web based solution and focuses on web experience.

在我看来,Stripe 是不错的解决方案,但不是应用程序内的理想选择,因为它是基于 Web 的解决方案,并且专注于 Web 体验。

If you want a true mobile in-app experience I suggest you check out PayPal library or my company, ZooZ, which accepts both PayPal and Credit Cards in one integration.

如果您想要真正的移动应用程序内体验,我建议您查看 PayPal 库或我的公司ZooZ,它在一个集成中接受 PayPal 和信用卡。

回答by wasim

working project can be find hereon github stripe example.

工作项目可以发现这里在github条纹例子。

回答by Peter Kazazes

As an iOS dev you'd best have a good read through this. Specifically pertinent to you is section 11.2:

作为 iOS 开发人员,您最好仔细阅读. 与您特别相关的是第 11.2 节:

11.2Apps utilizing a system other than the In App Purchase API (IAP) to purchase content, functionality, or services in an app will be rejected

11.2使用应用程序内购买 API (IAP) 以外的系统购买应用程序中的内容、功能或服务的应用程序将被拒绝

They want the profit, and they get their cut if you use the IAP API. Hope that clears up any issues.

他们想要利润,如果你使用 IAP API,他们会得到他们的分成。希望能解决任何问题。

EDIT:I am assuming based on the wording of your question that the payment will unlock something transitory in the app. IAP are only appropriate when purchasing something digital. Ifwhat you are selling is physically tenable, then you shouldn't, and in fact are not allowed, to use the IAP API. In that case, something along the lines of Stripeor a web-based version of Paypal'sAPI would work.

编辑:我假设根据您问题的措辞,付款将解锁应用程序中的一些暂时性内容。IAP 仅适用于购买数字产品。如果您销售的产品在物理上是站得住脚的,那么您不应该,实际上也不允许使用 IAP API。在这种情况下,类似于Stripe或基于 Web 的PaypalAPI版本的东西会起作用。

回答by Lester

In support of David'sanswer, I would like to add that, using a payment API to accept payments for products/donation through your app would be ideal.

为了支持大卫的回答,我想补充一点,使用支付 API 通过您的应用程序接受产品/捐赠的付款将是理想的选择。

Apple Pay is now available (as of today) on iPhone 6 and 6 Plus, and active only in US.

Apple Pay 现在(截至今天)可在 iPhone 6 和 6 Plus 上使用,并且仅在美国有效。

But if you still want to add support in your app for devices that cannot use Apple Pay, Authorize.Netnow has an iOS SDK which you can use to integrate and enable credit card payments.

但是,如果您仍想在您的应用程序中为无法使用 Apple Pay 的设备添加支持,Authorize.Net现在有一个 iOS SDK,您可以使用它来集成和启用信用卡支付。