Skip to content

Instantly share code, notes, and snippets.

@tdelam
Created April 25, 2012 05:52
Show Gist options
  • Save tdelam/2486911 to your computer and use it in GitHub Desktop.
Save tdelam/2486911 to your computer and use it in GitHub Desktop.
-(void)registerDevice
{
MobileDeviceRegistrationRequest *registrationRequest=[MobileDeviceRegistrationRequest mobileDeviceRegistrationRequest];
registrationRequest.anetApiRequest.merchantAuthentication.name=@"loginid";
registrationRequest.anetApiRequest.merchantAuthentication.password = @"password";
registrationRequest.mobileDevice.mobileDescription=@"asd";
registrationRequest.mobileDevice.mobileDeviceId=[[[UIDevice currentDevice] uniqueIdentifier]
stringByReplacingOccurrencesOfString:@"-" withString:@"_"];
[AuthNet authNetWithEnvironment:ENV_TEST];
AuthNet *an = [AuthNet getInstance];
[an setDelegate:self];
[an mobileDeviceRegistrationRequest:registrationRequest];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment