2014-10-07 106 views
1

我已將authorize.net集成到我的iOS應用程序中。我沒有在本教程中 https://developer.authorize.net/integration/fifteenminutes/ios/如何使用iOS的Authorize.Net集成支付

- (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>; 

回答