cancel
Showing results for 
Search instead for 
Did you mean: 

problem with the testing with the Test accunt in the Iphone sdk

Hello

 

i am facing problem while testing with the Test Accunt.

 

i had entered correct user name and password with transection key..

 

i had used below code for login..

 

[AuthNet authNetWithEnvironment:ENV_TEST];
    
    MobileDeviceLoginRequest *mobileDeviceLoginRequest =[MobileDeviceLoginRequest mobileDeviceLoginRequest];
    mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.name = @"xxxx";
    mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.transactionKey =@"xxxxxxxxxxxxxx";
    mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.sessionToken =sessionToken;
    mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.password = @"xxxxxxx";
    mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.mobileDeviceId =[[[UIDevice currentDevice] uniqueIdentifier]
     stringByReplacingOccurrencesOfString:@"-" withString:@"_"];
 
    AuthNet *an = [AuthNet getInstance]; 
    [an setDelegate:self];
    [an mobileDeviceLoginRequest: mobileDeviceLoginRequest];

 

but returning below xml on a responce.

 

<?xml version="1.0" encoding="utf-8"?><ErrorResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Error</resultCode><message><code>E00003</code><text>The element 'merchantAuthentication' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'password' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'mobileDeviceId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.</text></message></messages></ErrorResponse>

 

can anyone had idea to solve this error...?

 

Thanks

12 REPLIES 12

Did you look at the "README" file in the zip?

RaynorC1emen7
Expert

yes i had seen the READEME file in a sorce code..

 

 

yes i had seen the READEME file in a sorce code..

 

can you please give me some solution for this problem?

 

 

Thanks

Darshan Patel

In the readme

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

 Maybe it don't need to set the transactionKey and sessionToken? I thought MobileDeviceLoginRequest is to get the sessionToken?

hello

 

i used same code as the README File but getting this error

 

<?xml version="1.0" encoding="utf-8"?><mobileDeviceLoginResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Error</resultCode><message><code>E00054</code><text>The mobile device is not registered with this merchant account.</text></message></messages></mobileDeviceLoginResponse>

Did you registered the mobile device in the merchant account?

Step 4 on https://developer.authorize.net/integration/fifteenminutes/ios

hello

 

i just run the code first time and checked

 

Home > Account (Settings) > Security Settings (Mobile Device Management)

 

but there is no device is displayed..

 

is there any way to register device ?

 

because i follow same instruction mentioned in the

https://developer.authorize.net/integration/fifteenminutes/ios   in step 4..

 

You have to send a separate MobileDeviceRegistrationRequest. I am trying to register the device as well but i get error each time i send the request. Any help will be appreciated. Thanks.

Hi,

That is right, you want to make sure to register the phone first. You need to use “MobileDeviceRegistrationRequest” the first time you use a new phone, so instead of using “LoginRequest” you need to register first. You need to use "MobileDeviceRegistrationRequest" once you use "MobileDeviceRegistrationRequest", the phone will show up for approval in your Authorize.Net Merchant Interface then once you approved it, you will be able to use “MobileDeviceLoginRequest”

mobileDeviceRegisterRequest.anetApiRequest.merchantAuthentication.name = <USERNAME>;
mobileDeviceRegisterRequest.anetApiRequest.merchantAuthentication.password = <PASSWORD>;

Thanks,
Joy