あなたの応答をありがとう..しかし、それはすでに行われています...
//Call this method at once in project
-(void)registerDevice
{
NSLog(@"registerDevice");
MobileDeviceRegistrationRequest *registrationRequest=[MobileDeviceRegistrationRequest mobileDeviceRegistrationRequest];
registrationRequest.anetApiRequest.merchantAuthentication.name= txtUserName.text;
registrationRequest.anetApiRequest.merchantAuthentication.password = txtPassword.text;
registrationRequest.mobileDevice.mobileDescription=@"iPhone";
registrationRequest.mobileDevice.phoneNumber = @"7889999999";
registrationRequest.mobileDevice.mobileDeviceId=[[[UIDevice currentDevice] uniqueIdentifier]
stringByReplacingOccurrencesOfString:@"-" withString:@"_"];
NSLog(@"registrationRequest %@",registrationRequest);
[AuthNet authNetWithEnvironment:ENV_TEST];
AuthNet *an = [AuthNet getInstance];
[an setDelegate:self];
[an mobileDeviceRegistrationRequest:registrationRequest];
}
//And after above method call below method
- (void) loginToGateway {
MobileDeviceLoginRequest *mobileDeviceLoginRequest =
[MobileDeviceLoginRequest mobileDeviceLoginRequest];
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.name = txtUserName.text;
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.password = txtPassword.text;
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.mobileDeviceId =
[[[UIDevice currentDevice] uniqueIdentifier]
stringByReplacingOccurrencesOfString:@"-" withString:@"_"];
AuthNet *an = [AuthNet getInstance];
[an setDelegate:self];
[an mobileDeviceLoginRequest: mobileDeviceLoginRequest];
}