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
11-28-2011 03:22 AM
Did you look at the "README" file in the zip?
11-28-2011 06:27 AM
yes i had seen the READEME file in a sorce code..
11-29-2011 01:18 AM
yes i had seen the READEME file in a sorce code..
can you please give me some solution for this problem?
Thanks
Darshan Patel
11-29-2011 01:19 AM
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?
11-29-2011 04:38 AM
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>
11-29-2011 10:44 PM
Did you registered the mobile device in the merchant account?
Step 4 on https://developer.authorize.net/integration/fifteenminutes/ios
11-30-2011 04:47 AM - edited 11-30-2011 04:54 AM
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..
11-30-2011 09:49 PM
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.
12-01-2011 09:02 PM
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
12-02-2011 08:55 AM