Latest 0.1.0
Homepage https://github.com/PromisePay/ios-sdk
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation
Authors

PromisePay – iOS SDK

CI Status
Version
License
Platform

1. Installation

Manual

Download the latest release from GitHub, then add the PromisePay holder to your relevant xcode project.

CocoaPods

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

pod "PromisePay"

2. Usage

Import the header and create PromisePay object.

#import "PromisePay.h"

@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];

// Initialize the PromisePay with the Environment and PublickKey
PromisePay *promisePay = [[PromisePay alloc] initWithEnvironment:@"prelive" publicKey:@"cbd748a608eda8635e1f325d914080b4"];

// Create the Card
PPCard *card = [[PPCard alloc] initWithNumber:@"4111111111111111"
fullName:@"Bobby Buyer"
expiryMonth:@"12"
expiryYear:@"2020"
cvv:@"123"];
[promisePay createCardAccount:@"460b3a207121352b1d48aa0724734e4b" card:card callBack:^(id  result, NSError * error) {
// TODO: process with the callback
}];
}

3. Examples

Configuration

Initialize PromisePay using as following.

PromisePay *promisePay = [[PromisePay alloc] initWithEnvironment:@"prelive" publicKey:@"PUBLIC_KEY"];

Create Card Account

Create the PPCard object with the information of card like this.

PPCard *card = [[PPCard alloc] initWithNumber:@"4111111111111111"
fullName:@"Bobby Buyer"
expiryMonth:@"12"
expiryYear:@"2020"
cvv:@"123"];

Now calling the createCardAccount method, you can get the callback of result.

[promisePay createCardAccount:@"CARD_TOKEN" card:card callBack:^(id  _Nonnull result, NSError * _Nonnull error) {
if(error != nil)
{
NSLog(@"error = %@", error);
}
else
{
NSLog(@"Succeed to create card account, result=%@", result);
}
}];

4. Author

KevinHakans, [email protected]

5.License

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

Latest podspec

{
    "name": "PromisePay",
    "version": "0.1.0",
    "summary": "PromisePay iOS SDK",
    "description": "The implementation of PromisePay Client SDK",
    "homepage": "https://github.com/PromisePay/ios-sdk",
    "license": "MIT",
    "authors": {
        "KevinHakans": "[email protected]"
    },
    "source": {
        "git": "https://github.com/PromisePay/ios-sdk.git",
        "tag": "v0.1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "PromisePay": [
            "Pod/Assets/*.png"
        ]
    },
    "public_header_files": "Pod/Classes/**/*.h",
    "frameworks": "Foundation"
}

Pin It on Pinterest

Share This