Latest 1.2.0
Homepage https://github.com/tiagobsbraga/TBPagarME
License MIT
Platforms ios 8.0, requires ARC
Dependencies SwiftyRSA, SwiftLuhn
Frameworks Foundation
Authors

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

TBPagarME is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "TBPagarME"

Init

Store initial keys

// https://dashboard.pagar.me/#/myaccount/apikeys
TBPagarME.storeKeys("api_key", encryptionKey: "credential_key")

Transaction

Pay

let pagarME = TBPagarME.sharedInstance

// card
pagarME.card.cardNumber = "xxxxxxxxxxxxxxxx"
pagarME.card.cardHolderName = "Name Owner Card"
pagarME.card.cardExpirationMonth = "12"
pagarME.card.cardExpirationYear = "17"
pagarME.card.cardCVV = "111"

// customer
pagarME.customer.name = "Onwer Card"
pagarME.customer.document_number = "09809889011"
pagarME.customer.email = "[email protected]"
pagarME.customer.street = "Street"
pagarME.customer.neighborhood = "Neightborhood"
pagarME.customer.zipcode = "00000"
pagarME.customer.street_number = "1"
pagarME.customer.complementary = "Apt 805"
pagarME.customer.ddd = "031"
pagarME.customer.number = "986932196"

TBPagarME.sharedInstance.transaction("1000", success: { (data) in
    print("data transaction (data)")
})
{ (message) in
    print("error message (message)")
}

Author

Tiago Braga, [email protected]

License

TBPagarME is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "TBPagarME",
    "version": "1.2.0",
    "summary": "Facilitador do gateway de pagamento pagar.me",
    "description": ""Facilita a transau00e7u00e3o com cartu00e3o de cru00e9dito com o pagar.me, gerando o card_hash necessu00e1rio."",
    "homepage": "https://github.com/tiagobsbraga/TBPagarME",
    "license": "MIT",
    "authors": {
        "Tiago Braga": "[email protected]"
    },
    "social_media_url": "http://twitter.com/tiagobraga",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/tiagobsbraga/TBPagarME.git",
        "tag": "1.2.0"
    },
    "source_files": [
        "Pod",
        "Pod/Classes/*.{swift,h,m}"
    ],
    "requires_arc": true,
    "frameworks": "Foundation",
    "dependencies": {
        "SwiftyRSA": [
            "~> 0.2"
        ],
        "SwiftLuhn": [
            "~> 0.1"
        ]
    }
}

Pin It on Pinterest

Share This