Reputation: 69
I have integrated authorize.net into my iOS application. I did steps in this tutorial https://developer.authorize.net/integration/fifteenminutes/ios/
- (void) loginToGateway {
MobileDeviceLoginRequest *mobileDeviceLoginRequest =
[MobileDeviceLoginRequest mobileDeviceLoginRequest];
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.name = <USERNAME>;
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.password = <PASSWORD>;
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.mobileDeviceId =
[[[UIDevice currentDevice] uniqueIdentifier]
stringByReplacingOccurrencesOfString:@"-" withString:@"_"];
AuthNet *an = [AuthNet getInstance];
[an setDelegate:self];
[an mobileDeviceLoginRequest: mobileDeviceLoginRequest];
}
But request responsive:
- (void) requestFailed:(AuthNetResponse *)response{
NSLog(@"ViewController : requestFailed - %@",response);
[_activityIndicator stopAnimating];
UIAlertView *infoAlertView = [[UIAlertView alloc] initWithTitle:@"Login Error" message:INFORMATION_MESSAGE delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[infoAlertView show];
}
What's to fill in here?
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.name = <USERNAME>;
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.password = <PASSWORD>;
Upvotes: 1
Views: 1798
Reputation: 1069
The Name and Password are the Login ID and Password for a user created in the Merchant Interface. If you specified the test environment and are connecting to the sandbox, this would be the username and password you use to login to https://sandbox.authorize.net
You may wish to review the integrating mobile payments training video available on http://developer.authorize.net/api/mobile for an overview.
Upvotes: 1