您的位置:首页 > 移动开发

芒果iOS开发之Apple Pay Programming Guide part1

2016-03-09 10:51 423 查看
主要内容:

1.前言

2.翻译前言

3.About Apple Pay(关于苹果支付)

4.Working with Apple Pay(和Apple Pay一起工作)

5.翻译原文

6.致各位读者

7.内容提要

一、前言

最近,苹果公司在中国大陆开放了Apple Pay,也就是苹果支付功能。作为用户来说可能仅仅关注如果使用Apple Pay就可以了。但是做为开发者我们更应该第一时间去学习如何让自己的App支持Apple Pay。从以往的经验来看如果苹果发布新技术新知识,如果你不学,到最后肯定会被行业需求和市场方向逼的被迫学习新技术。有了前车之鉴所以大家需要第一时间去学习Apple
Pay。

二、翻译前言

任何的技术博客和文章都不如苹果自己的开发文档全面详细,因为他人的文章里边肯定都带有自己的理解。所以如果有英文基础还是推荐大家看原汁原味的Apple
Pay Programming Guide 。肯定会有英文不太好的所以这次我打算为大家先翻译苹果关于Apple Pay的开发文档,然后在后续的文章中介绍Apple Pay的详细集成步骤。

三、About Apple Pay(关于苹果支付)

苹果支付是一个移动支付技术,可以让用户给你他们的真实的商品和服务的支付信息。 这样既方便又安全的。

在应用程序内的数字商品和服务的交易,看应用程序内购编程指南。App内购编程指南



四、Working with Apple Pay(和Apple Pay一起工作)

应用程序使用苹果支付需要使用Xcode中的苹果支付能力。你也可以注册一个商户标示符和设置密钥,用于安全的发送数据到你的服务器。

    开始一个支付,你的应用程序需要创建一个支付请求。这个请求包含服务项目的小计和购买的商品,而且还包含任何的附加费用(附加税)、航运、或者折扣。将这个请求传递给一个支付授权的试图控制器,显示用的请求和任何需要提示的信息,比如运输和账单地址。你的代理被调用为更新用户交互的请求在这个试图控制器中。

接着用户授权支付,苹果支付会对支付信息进行加密,防止一个未被授权的第三方访问他。在设备上,苹果支付发送付款请求到一个安全的元件,这是一个专用的芯片在用户的设备上。安全元件为指定的卡片和商户添加付款数据,创建一个加密的支付令牌。然后将这个令牌传送给苹果的服务器,在哪里他将重新加密使用你的商户标示证书。最后,服务器通过令牌返回给应用程序处理。

支付令牌从来不访问或者存储在苹果的服务器上,服务器知识使用你的证书重新加密令牌。这个过程让你的应用程序安全的加密支付信息,没有它不必分发你的商户标示符证书做为应用程序的一部分。

有关苹果支付安全性的更多信息,请参阅iOS安全指南

在大多数情况下,你的应用程序通过加密的支付令牌向第三方支付平台解密和处理付款。但是,如果你的团队拥有一个现有的支付基础设施,你可以解密和处理付款在你的服务器上。

有关支持苹果支付的支付平台的更多信息,请参阅苹果开发者网站苹果支付指南

五、翻译原文

About Apple Pay
Apple Pay is a mobile payment technology that lets users give you their payment information for real-world goods and services in a way that is both convenient and secure.
For digital goods and services delivered within the app, see In-App Purchase Programming Guide.

About Apple Pay
Apple Pay is a mobile payment technology that lets users give you their payment information for real-world goods and services in a way that is both convenient and secure.
For digital goods and services delivered within the app, see In-App Purchase Programming Guide.
Apps that use Apple Pay need to enable the Apple Pay capabilities in Xcode. You also register a merchant identifier and set up cryptographic keys, which are used to securely send payment data to your server.
To initiate a payment, your app creates a payment request. This request includes the subtotal for the services and goods purchased, as well as any additional charges for tax, shipping, or discounts. Pass this request to
a payment authorization view controller, which displays the request to the user and prompts for any needed information, such as a shipping or billing address. Your delegate is called to update the request as the user interacts with the view controller.
As soon as the user authorizes the payment, Apple Pay encrypts payment information to prevent an unauthorized third party from accessing it. On the device, Apple Pay sends the payment request to the Secure Element, which
is a dedicated chip on the user’s device. The Secure Element adds the payment data for the specified card and merchant, creating an encrypted payment token. It then passes this token to Apple’s servers, where it is reencrypted using your Merchant Identifier
certificate. Finally, the servers pass the token back to your app for processing.
The payment token is never accessed or stored on Apple’s servers. The servers simply reencrypt the token using your certificate. This process lets your app securely encrypt the
payment information without it having to distribute your Merchant Identifier certificate as part of the app.
For more information about Apple Pay’s security, see iOS Security Guide.
In most cases, your app passes the encrypted payment token to a third-party payment platform to decrypt and process the payment. However, if your team has an existing payment infrastructure, you can decrypt and process the
payment on your own server.
For information about payment platforms that support Apple Pay, see developer.apple.com/apple-pay/.

六、致各位读者

看到这里的读者说明你已经忍者各种疑惑和对我拙劣翻译技术的吐槽,在这还是各位读者说声抱歉。对于新技术新知识我是比较热爱的而且愿意为大家服务,无奈的英语水平还停留在初中水平。所以很多翻译不是很恰当,希望各位读者能够不吝惜自己的意见向我指出翻译不足的地方,我的QQ:532027158.最后虽然翻译的很烂,但是转载的话请注明出处,谢谢大家。

七、内容提要

Configuring Your Environment  --- 配置你的环境
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息