测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最后发布 | 2016年4月 |
SPM支持 SPM | ✗ |
由 Tiago Braga 维护。
依赖 | |
SwiftyRSA | ~> 0.2 |
SwiftLuhn | ~> 0.1 |
要运行示例项目,请克隆仓库,然后首先从 Example 目录中运行 pod install
。
TBPagarME 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod "TBPagarME"
存储初始密钥
// https://dashboard.pagar.me/#/myaccount/apikeys
TBPagarME.storeKeys("api_key", encryptionKey: "credential_key")
付款
// card info
TBPagarME.sharedInstance.cardNumber = "xxxxxxxxxxxxxxxx"
TBPagarME.sharedInstance.cardHolderName = "Swift Code"
TBPagarME.sharedInstance.cardExpirationMonth = "02"
TBPagarME.sharedInstance.cardExpirationYear = "22"
TBPagarME.sharedInstance.cardCVV = "123"
// owner of card
var customer = TBCustomer()
customer.name = "Swift"
customer.document_number = "07660770912"
customer.email = "[email protected]"
customer.street = "Rua Júlio de Castilho"
customer.neighborhood = "Centro"
customer.zipcode = "30456789"
customer.street_number = "123"
customer.complementary = "Apt 102"
customer.ddd = "031"
customer.number = "89990909"
TBPagarME.sharedInstance.transaction("1000", customCustomer: customer) // 10,00
Tiago Braga, [email protected]
TBPagarME 可在 MIT 许可证下获得。有关更多信息,请参阅 LICENSE 文件。