Giter Site home page Giter Site logo

fury_device-sdk-ios's Introduction

MercadoPago's Devices SDK for iOS

What is this for?

The MercadoPago's Devices SDK for iOS makes it easy to obtain the device fingerprinting information. You should send this information when processing a payment with MercadoPago so we can use it to help you avoid rejected payments or chargebacks. For more details about this, visit the developers guide.

Requirements

This module currently supports iOS 10.0+, with Swift or Objective-C.

Installation

MercadoPago's Devices SDK is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "MercadoPagoDevicesSDK"

Usage

To import this module you have to do the following:

Swift

import MercadoPagoDevicesSDK

Objective-C

@import MercadoPagoDevicesSDK;

To use the module, there are only two steps.

First, you have to initialize the SDK when the app opens. For this you should include in the AppDelegate's didFinishLaunchingWithOptions method the following line.

Swift

MercadoPagoDevicesSDK.shared.execute()

Objective-C

[[MercadoPagoDevicesSDK shared] execute];

Then, when the user arrives to the checkout you can execute one the following methods to retrieve the device fingerprinting information.

Swift

MercadoPagoDevicesSDK.shared.getInfo() // Returns a Device object with the info, this class is a Codable class
MercadoPagoDevicesSDK.shared.getInfoAsJson() // returns a Data object from JSON library
MercadoPagoDevicesSDK.shared.getInfoAsJsonString() // returns a String object with the infomation encoded as JSON
MercadoPagoDevicesSDK.shared.getInfoAsDictionary() // returns a Dictionary<String,Any> object

Objective-C

[[[MercadoPagoDevicesSDK] shared] getInfoAsJson] // returns a Data object from JSON library
[[[MercadoPagoDevicesSDK] shared] getInfoAsJsonString] // returns a String object with the infomation encoded as JSON
[[[MercadoPagoDevicesSDK] shared] getInfoAsDictionary] // returns a Dictionary<String,Any> object

Examples

We include two examples of the usage of this SDK, one in Swift and one in Objective-C.

Author

Devices Team, [email protected]

License

Mercado Pago's Devices SDK is available under the MIT license. See the LICENSE file for more info.

fury_device-sdk-ios's People

Contributors

francocuevas444 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.