Skip to content

Instantly share code, notes, and snippets.

@davidolesch

davidolesch/AppDelegate.m

Last active Mar 2, 2017
Embed
What would you like to do?
#import "AppDelegate.h"
@import AcceptSDK;
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
AcceptSDKHandler *handler = [[AcceptSDKHandler alloc] initWithEnvironment:AcceptSDKEnvironmentENV_TEST];
AcceptSDKRequest *request = [[AcceptSDKRequest alloc] init];
request.merchantAuthentication.name = @"replaced with sandbox Login ID";
request.merchantAuthentication.clientKey = @"replaced with sandbox signature key";
request.securePaymentContainerRequest.webCheckOutDataType.token.cardNumber = @"5424000000000015";
request.securePaymentContainerRequest.webCheckOutDataType.token.expirationMonth = @"12";
request.securePaymentContainerRequest.webCheckOutDataType.token.expirationYear = @"21";
request.securePaymentContainerRequest.webCheckOutDataType.token.cardCode = @"123";
[handler getTokenWithRequest:request successHandler:^(AcceptSDKTokenResponse * _Nonnull token) {
} failureHandler:^(AcceptSDKErrorResponse * _Nonnull error) {
}];
return YES;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment