1.配置Merchant ID(商业ID)
1.1创建AppID
登录开发者中心,创建App ID。填写描述及Bundle ID后,在App Services里勾选Apple Pay以开启该功能。


注意:由于星号通配符的不能开启一些App 服务(Apple Pay、推送等),所以只能使用明确的通配符
点击Continue后,会发现概览该App ID时,Apple Pay服务是等待配置状态的,接下来点击Register继续2.2操作。

1.2创建Merchant ID,并绑定到相关App ID
在Merchant IDs中来创建一个Merchant ID,填写相关信息后Continue

确认信息后,点击Register-->Done。由于加密需要证书,所以还要对刚创建的Merchant ID添加证书(加密根据证书来的)。Merchant ID点Edit

这里询问是否支持中国以外的地区处理支付,这里要根据实际需求选择

Continue后,需要上传一个CSR文件

在本机的钥匙串中,从证书颁发机构请求证书

存储到本地后,选择刚才生成的证书,点Continue

把生成的cer文件下载到本地,双击安装。这就完成了网页端的创建~
如果有小伙伴没有及时下载更新证书就会遇到下面的问题
到钥匙串中,查看刚才安装的cer,喜闻乐见的事情来了,证书颁发机构未知了???

原来是系统跟证书的问题
解决方法:在这里下载安装就好了
http://www.apple.com/certificateauthority/
下载:

安装完就可以了

===========昏割线==============
上传完证书,安装完之后继续就完成了创建Merchant ID

由于刚才创建的App ID中Apple Pay服务仍处于待配置状态,在App IDs列表中找到刚才创建的App ID展开,点击Edit对其进行编辑。

在Enable Service中找到Apple Pay,点击Edit对其进行编辑。

在弹出的界面中勾选对应的Merchant ID,Continue

然后Assign,此时就完成了为App ID添加Merchant ID。可以点开该App ID进行确认,可看到Apple Pay服务已可用

2.创建Xcode工程并为其开启Apple Pay
2.1使用Xcode创建工程,设置相关Bundle ID:

注意:Apple Pay最低支持iOS8.0~
2.2开启Apple Pay功能
到Xcode的Capabilities中,找到Apple Pay开关,打开

会弹出选择机构的选项,选择相关机构Choose,然后在Apple Pay栏目下会显示出当前机构所有的商业ID,选择你的打勾就好了

可以看到Steps里所有对勾都打上了,这就证明配置无误。
这篇文章介绍了Apple Pay集成的一些准备工作,代码部分看第二篇《Apple Pay集成(二)编码实战》吧。
2016年6月28日
以上~~
网友评论