apple pay

因为工程需要使用apple pay, 网上找了很多资料, 要么陈旧, 要么就是直接复制转载, 无奈之下, 找到苹果的官方文档: 官方传送门, 很详细, 我接下来的操作, 也是按照这个文档进行的.

1. Apple Pay Setup 官方传送门

    1. 创建商户id (Create a merchant ID)
    1. 创建付款处理的证书 (Create a Payment Processing certificate.)

步骤1,2
参看官方说明, 中文的, 在此就不赘述
配置 Apple Pay

    1. xcode的相关设置 (Enable Apple Pay in Xcode. )

常规设置, 类似后台播放那样, 勾选刚才创建的

添加apple pay的capability

2. Apple Pay Availability

  • 判断设备是否支持apple pay, 以及用户是否已经添加卡片

tips: The PKPaymentAuthorizationController class performs the same role as the PKPaymentAuthorizationViewController class, but it does not depend on the UIKit framework. This means that the authorization controller can be used in places where a view controller cannot (for example, in watchOS apps or in SiriKit extensions).

3. 2个选择, 要么自己公司的服务器和apple交互, 要么直接接入三方的sdk, 比如银联SDK

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。