我已将authorize.net集成到我的iOS应用程序中。我在本教程中完成了步骤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];
}
但请求响应:
- (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];
}
这里要填什么?
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.name = <USERNAME>;
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.password = <PASSWORD>;
名称和密码是在商户界面中创建的用户的登录ID和密码。如果您指定了测试环境并正在连接到沙箱,这将是您用于登录的用户名和密码https://sandbox.authorize.net
您可能希望查看上提供的集成移动支付培训视频http://developer.authorize.net/api/mobile以获取概述。