TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
iOS library for working with Balanced Payments. Current version : 0.4
The includes folder is automatically included in the project's header search path.
If you copy the files to a location other than includes you'll probably need to add the path to User Header Search Paths in your project settings.
You can copy the headers directly into your proejct and add them as direct references.
#import "Balanced.h" - Tokenizing methods
#import "BPBankAccount.h" - Bank Accounts
#import "BPCard.h" - Cards
Instantiate a balanced instance with your marketplace URI.
Balanced *balanced = [[Balanced alloc] initWithMarketplaceURI:@"/v1/marketplaces/TEST-MP6E3EVlPOsagSdcBNUXWBDQ"];
BPCard *card = [[BPCard alloc] initWithNumber:@"4242424242424242" expirationMonth:8 expirationYear:2025 securityCode:@"123"];
Use an NSDictionary for additional card fields you wish to specify.
NSDictionary *optionalFields = @{
BPCardOptionalParamNameKey:@"Johann Bernoulli",
BPCardOptionalParamStreetAddressKey:@"123 Main Street",
BPCardOptionalParamPostalCodeKey:@"11111"
};
BPCard *card = [[BPCard alloc] initWithNumber:@"4242424242424242" expirationMonth:8 expirationYear:2025 securityCode:@"123" optionalFields:optionalFields];
BPCard *card = [[BPCard alloc] initWithNumber:@"4242424242424242" expirationMonth:8 expirationYear:2025 securityCode:@"123"];
Balanced *balanced = [[Balanced alloc] initWithMarketplaceURI:@"/v1/marketplaces/TEST-MP6E3EVlPOsagSdcBNUXWBDQ"];
[balanced tokenizeCard:card onSuccess:^(NSDictionary *responseParams) {
// success
} onError:^(NSError *error) {
// failure
}];
BPBankAccount *ba = [[BPBankAccount alloc] initWithRoutingNumber:@"053101273" accountNumber:@"111111111111" accountType:BPBankAccountTypeChecking name:@"Johann Bernoulli"];
Use an NSDictionary for additional card fields you wish to specify.
NSDictionary *optionalFields = @{BPCardOptionalParamMetaKey:@"Test"};
BPBankAccount *ba = [[BPBankAccount alloc] initWithRoutingNumber:@"053101273" accountNumber:@"111111111111" accountType:BPBankAccountTypeChecking name:@"Johann Bernoulli" optionalFields:optionalFields];
Please include tests with all new code. Also, all existing tests must pass before new code can be merged.