在Swift应用程序中支付给另一个用户

时间:2021-02-14 07:33:34

I have this problem. I'm making an iOS application in Swift that sells user images and videos. I've got my own server, so all media is saved there. But now I've come to a point where I need make possible that user can buy some content from another user using a credit card or PayPal account. Other users can be found on a map, they have added their payment information to their profile (it's not visible to others) so that transactions could be made.

我有这个问题。我正在Swift中制作一个销售用户图像和视频的iOS应用程序。我有自己的服务器,因此所有媒体都保存在那里。但现在我已经到了一个点,我需要使用户可以使用信用卡或PayPal帐户从其他用户那里购买一些内容。其他用户可以在地图上找到,他们已将他们的付款信息添加到他们的个人资料中(其他人看不到),以便可以进行交易。

I've done some research on this topic and I know that a powerful tool for payments in Swift is Stripe. However, as far as I read about it, users can only pay to one account that you register. Basically, they can make purchases as if buying from a store. But in my case, I need to provide the possibility to pay to another user.

我已经对这个主题做了一些研究,我知道在Swift中付费的强大工具是Stripe。但是,据我所知,用户只能支付您注册的一个帐户。基本上,他们可以像从商店购买一样购物。但就我而言,我需要提供支付给其他用户的可能性。

Also, I need to integrate PayPal. For this I found API's like Auth0 and PayPal API, but can't seem to find any more information on inter-user transactions.

另外,我需要整合PayPal。为此,我发现API类似于Auth0和PayPal API,但似乎无法找到有关用户间事务的更多信息。

And there is In-App Purchases option, of course, but I'm not sure if I can use that in this case, because most of my purchases will be done from a Web App.

当然还有应用程序内购买选项,但我不确定在这种情况下是否可以使用它,因为我的大部分购买都是通过Web应用程序完成的。

Can somebody please help me, by giving some tips on how to move forward from here and implement this payment system?

有人可以通过提供一些如何从这里向前推进并实施这个支付系统的技巧来帮助我吗?

2 个解决方案

#1


8  

There are several considerations to take into account, the three most important being price, ease of implementation and availability. I'll briefly discuss each point of the 3 options you mentioned:

需要考虑几个因素,其中最重要的三个因素是价格,易于实施和可用性。我将简要讨论您提到的3个选项中的每个要点:


Stripe:

Implementation: Stripe has a native SDK for iOS and has a functionality called Stripe Connect which enables payment between users directly, without having the money to go through your account, yet allows you to take a cut of the transaction if you'd like: https://support.stripe.com/questions/can-i-enable-my-users-to-receive-payments-from-others https://stripe.com/docs/connect

实施:Stripe有一个适用于iOS的原生SDK,并且具有一个名为Stripe Connect的功能,可以直接在用户之间进行支付,无需通过您的帐户进行支付,但如果您愿意,可以让您减少交易:https ://support.stripe.com/questions/can-i-enable-my-users-to-receive-payments-from-others https://stripe.com/docs/connect

Price: Stripe has a starting fee of 0.3$ and takes 2.9 % of the full amount.

价格:Stripe的起始费为0.3美元,占全额的2.9%。

Availability: Currently Stripe is only available in 9 countries worldwide and available as a beta in another 15 countries: https://stripe.com/global

可用性:目前Stripe仅在全球9个国家/地区提供,并在另外15个国家/地区提供测试版:https://stripe.com/global


PayPal:

Implementation: PayPal has a native SDK for iOS, but a very fractioned history of SDK libraries depending on how complex functionality you need (Which Pryo's answer underlined). Paypal has something called Adaptive Payments which allows for peer-to-peer payments: https://developer.paypal.com/docs/classic/products/adaptive-payments/

实施:PayPal有一个适用于iOS的原生SDK,但是根据您需要的复杂功能,SDK库的历史非常精细(Pryo的答案有下划线)。 Paypal有一种称为自适应支付的东西允许点对点支付:https://developer.paypal.com/docs/classic/products/adaptive-payments/

Price: PayPal has a lot of mixed information about pricing (currency conversion, cross border transfer, etc.), but roughly it is a starting fee of 0.3$ and another 3.9 %.

价格:PayPal有很多关于定价的混合信息(货币转换,跨境转移等),但大致是0.3美元和另外3.9%的起始费用。

Availability: PayPal is available in 203 countries/markets around the world: https://www.paypal.com/webapps/mpp/country-worldwide

可用性:PayPal可在全球203个国家/地区销售:https://www.paypal.com/webapps/mpp/country-worldwide


In-App Purchase:

Implementation: This money will always go directly to the developer, so this means you will need to implement some sort of service which takes money from your account to the final user. So the flow goes: buyer -> you -> receiver.

实施:这笔钱将永远直接发给开发者,这意味着您需要实施某种服务,从您的帐户向最终用户收取资金。所以流程是:买家 - >你 - >接收者。

Price: Apple will take 30 % of the total amount.

价格:Apple将占总金额的30%。

Availability: In-App Purchase is available in every country where you would be able to distribute the iOS app.

可用性:在您可以分发iOS应用程序的每个国家/地区都可以使用应用程序内购买。


Conclusion:

  • Don't use the In-App Purchase option for user-to-user sales, it's simply too complex and expensive out of the three options.
  • 不要将应用程序内购买选项用于用户到用户的销售,这三个选项中的过于复杂和昂贵。

  • PayPal has a strong brand that people trust and is available in many countries, which makes it a stronger candidate than Stripe, but IMHO I would choose Stripe due to its simplicity and cheaper pricing.
  • PayPal拥有一个人们信赖的强大品牌,并且在许多国家都有销售,这使得它成为比Stripe更强大的候选者,但恕我直言,我会选择Stripe,因为它简单,价格便宜。

#2


0  

If you want to implement in the swift Paypal has already SDK, which you can use to make between users to make simple payment:
https://github.com/paypal/PayPal-iOS-SDK

如果您想在swift中实现Paypal已经有SDK,您可以使用它来在用户之间进行简单的支付:https://github.com/paypal/PayPal-iOS-SDK

or if you need some more advanced feature like (third-party, parallel, and chained payments ) you can check old MPL library by Paypal: https://github.com/paypal/sdk-packages/tree/gh-pages/MPL

或者,如果您需要一些更高级的功能,如(第三方,并行和链式支付),您可以通过Paypal检查旧的MPL库:https://github.com/paypal/sdk-packages/tree/gh-pages/MPL

For the In-App Purchases payment can be made by valid app store user only and there is mostly no facility of inter-user in general case in-app payments are made to app owner

对于应用程序内购买,付费只能由有效的应用程序商店用户进行,并且通常没有跨用户设施,一般情况下,应用程序所有者向应用程序内所有者付款

#1


8  

There are several considerations to take into account, the three most important being price, ease of implementation and availability. I'll briefly discuss each point of the 3 options you mentioned:

需要考虑几个因素,其中最重要的三个因素是价格,易于实施和可用性。我将简要讨论您提到的3个选项中的每个要点:


Stripe:

Implementation: Stripe has a native SDK for iOS and has a functionality called Stripe Connect which enables payment between users directly, without having the money to go through your account, yet allows you to take a cut of the transaction if you'd like: https://support.stripe.com/questions/can-i-enable-my-users-to-receive-payments-from-others https://stripe.com/docs/connect

实施:Stripe有一个适用于iOS的原生SDK,并且具有一个名为Stripe Connect的功能,可以直接在用户之间进行支付,无需通过您的帐户进行支付,但如果您愿意,可以让您减少交易:https ://support.stripe.com/questions/can-i-enable-my-users-to-receive-payments-from-others https://stripe.com/docs/connect

Price: Stripe has a starting fee of 0.3$ and takes 2.9 % of the full amount.

价格:Stripe的起始费为0.3美元,占全额的2.9%。

Availability: Currently Stripe is only available in 9 countries worldwide and available as a beta in another 15 countries: https://stripe.com/global

可用性:目前Stripe仅在全球9个国家/地区提供,并在另外15个国家/地区提供测试版:https://stripe.com/global


PayPal:

Implementation: PayPal has a native SDK for iOS, but a very fractioned history of SDK libraries depending on how complex functionality you need (Which Pryo's answer underlined). Paypal has something called Adaptive Payments which allows for peer-to-peer payments: https://developer.paypal.com/docs/classic/products/adaptive-payments/

实施:PayPal有一个适用于iOS的原生SDK,但是根据您需要的复杂功能,SDK库的历史非常精细(Pryo的答案有下划线)。 Paypal有一种称为自适应支付的东西允许点对点支付:https://developer.paypal.com/docs/classic/products/adaptive-payments/

Price: PayPal has a lot of mixed information about pricing (currency conversion, cross border transfer, etc.), but roughly it is a starting fee of 0.3$ and another 3.9 %.

价格:PayPal有很多关于定价的混合信息(货币转换,跨境转移等),但大致是0.3美元和另外3.9%的起始费用。

Availability: PayPal is available in 203 countries/markets around the world: https://www.paypal.com/webapps/mpp/country-worldwide

可用性:PayPal可在全球203个国家/地区销售:https://www.paypal.com/webapps/mpp/country-worldwide


In-App Purchase:

Implementation: This money will always go directly to the developer, so this means you will need to implement some sort of service which takes money from your account to the final user. So the flow goes: buyer -> you -> receiver.

实施:这笔钱将永远直接发给开发者,这意味着您需要实施某种服务,从您的帐户向最终用户收取资金。所以流程是:买家 - >你 - >接收者。

Price: Apple will take 30 % of the total amount.

价格:Apple将占总金额的30%。

Availability: In-App Purchase is available in every country where you would be able to distribute the iOS app.

可用性:在您可以分发iOS应用程序的每个国家/地区都可以使用应用程序内购买。


Conclusion:

  • Don't use the In-App Purchase option for user-to-user sales, it's simply too complex and expensive out of the three options.
  • 不要将应用程序内购买选项用于用户到用户的销售,这三个选项中的过于复杂和昂贵。

  • PayPal has a strong brand that people trust and is available in many countries, which makes it a stronger candidate than Stripe, but IMHO I would choose Stripe due to its simplicity and cheaper pricing.
  • PayPal拥有一个人们信赖的强大品牌,并且在许多国家都有销售,这使得它成为比Stripe更强大的候选者,但恕我直言,我会选择Stripe,因为它简单,价格便宜。

#2


0  

If you want to implement in the swift Paypal has already SDK, which you can use to make between users to make simple payment:
https://github.com/paypal/PayPal-iOS-SDK

如果您想在swift中实现Paypal已经有SDK,您可以使用它来在用户之间进行简单的支付:https://github.com/paypal/PayPal-iOS-SDK

or if you need some more advanced feature like (third-party, parallel, and chained payments ) you can check old MPL library by Paypal: https://github.com/paypal/sdk-packages/tree/gh-pages/MPL

或者,如果您需要一些更高级的功能,如(第三方,并行和链式支付),您可以通过Paypal检查旧的MPL库:https://github.com/paypal/sdk-packages/tree/gh-pages/MPL

For the In-App Purchases payment can be made by valid app store user only and there is mostly no facility of inter-user in general case in-app payments are made to app owner

对于应用程序内购买,付费只能由有效的应用程序商店用户进行,并且通常没有跨用户设施,一般情况下,应用程序所有者向应用程序内所有者付款