apple pay

因為工程需要使用apple pay, 網(wǎng)上找了很多資料, 要么陳舊, 要么就是直接復制轉(zhuǎn)載, 無奈之下, 找到蘋果的官方文檔: 官方傳送門, 很詳細, 我接下來的操作, 也是按照這個文檔進行的.

1. Apple Pay Setup 官方傳送門

    1. 創(chuàng)建商戶id (Create a merchant ID)
    1. 創(chuàng)建付款處理的證書 (Create a Payment Processing certificate.)

步驟1,2
參看官方說明, 中文的, 在此就不贅述
配置 Apple Pay

    1. xcode的相關(guān)設(shè)置 (Enable Apple Pay in Xcode. )

常規(guī)設(shè)置, 類似后臺播放那樣, 勾選剛才創(chuàng)建的

添加apple pay的capability

2. Apple Pay Availability

  • 判斷設(shè)備是否支持apple pay, 以及用戶是否已經(jīng)添加卡片

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個選擇, 要么自己公司的服務(wù)器和apple交互, 要么直接接入三方的sdk, 比如銀聯(lián)SDK

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容