测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最新发布 | 2016年10月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Payapi 维护。
PayApi 安全单的实现,使用 Swift 语言。
包括适用于任何 iOS 应用程序的方便易用的 PayApi SDK,与 Swift 一起工作。为了使用 SDK,请注册一个免费的 PayApi 用户帐户
CocoaPods 是推荐的安装方法。
pod 'PayApiSDK'
import PayApiSDK
使用您的凭证(公钥和 PayApi 密钥)初始化 SDK
let secureForm = SecureForm(publicId: "SHOP_PUBLIC_ID", apiKey: "PROVIDED_API_KEY")
let productData: [String: Any] = [
"order": [
"sumInCentsIncVat": 122,
"sumInCentsExcVat": 100,
"vatInCents": 22,
"currency": "EUR",
"referenceId": "ref123"
],
"products": [
[
"quantity": 1,
"title": "Black bling cap",
"priceInCentsIncVat": 122,
"priceInCentsExcVat": 100,
"vatInCents": 22,
"vatPercentage": 22
]
],
"consumer": [
"email": "[email protected]"
]
]
在任何 UIButton TouchUpInside 事件上打开安全表单的方法
secureForm.addSecureFormToButton(button: myButton, message: productData)
如有任何疑问,请联系 [email protected]