cancel
Showing results for 
Search instead for 
Did you mean: 

For Transaction - Test account or Merchant account

Initially i have registered my mobile device using test account and then enabled my device in authorize.net website and then logged in successfully in my app .

 

MobileDeviceRegistrationRequest = success

mobileDeviceLoginResponse = also success

 

While testing the transaction process i am getting following error.

 

<code>E00054</code><text>The mobile device is not registered with this merchant account.</text>

Is it possible to test the transaction process with my test account ? . Or I need to create merchant account ?.

sathishskd
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Hello Sathishskd,

 

Just to confirm, you're using the same unique device ID used for the mobileDeviceRegistrationRequest in your login request?

 

I assume you're working against the sandbox, do you have Test Mode turned off?

 

Richard

View solution in original post

RichardH
Administrator Administrator
Administrator
4 REPLIES 4

Hello Sathishskd,

 

Just to confirm, you're using the same unique device ID used for the mobileDeviceRegistrationRequest in your login request?

 

I assume you're working against the sandbox, do you have Test Mode turned off?

 

Richard

RichardH
Administrator Administrator
Administrator

Hi Richard

 

              I am using same unique device ID for both MobileDeviceRegistrationRequest and 

mobileDeviceLoginResponse . I am testing in simulator it makes any problem .?

My test mode is turned on only.

 

             Where i have to use transaction key ?

 

                       

Below code only i am using

 

- (void)viewDidLoad

{

    [superviewDidLoad];

   [AuthNetauthNetWithEnvironment:ENV_TEST];

    [selfregisterDevice];

    [selfloginToGateway];

    

}

 

#pragma mark - AIM

- (void)registerDevice

{

    MobileDeviceRegistrationRequest *mobileDeviceRegistrationRequest =

    [MobileDeviceRegistrationRequestmobileDeviceRegistrationRequest];

    mobileDeviceRegistrationRequest.mobileDevice.mobileDeviceId = [OpenUDID value];

    mobileDeviceRegistrationRequest.mobileDevice.mobileDescription = @"iPhone";

    mobileDeviceRegistrationRequest.mobileDevice.phoneNumber = @"123456789";

    mobileDeviceRegistrationRequest.anetApiRequest.merchantAuthentication.name = @"sameUserID";

    mobileDeviceRegistrationRequest.anetApiRequest.merchantAuthentication.password = @"samePassword";

 

 

    [AuthNetauthNetWithEnvironment:ENV_TEST];

    AuthNet *an = [AuthNet getInstance];

    [an setDelegate:self];

    [an mobileDeviceRegistrationRequest:mobileDeviceRegistrationRequest];

}

 

- (void) loginToGateway

{

    MobileDeviceLoginRequest *mobileDeviceLoginRequest = [MobileDeviceLoginRequestmobileDeviceLoginRequest];

    mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.name = @"sameUserID";

    mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.password = @"samePassword";

    mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.mobileDeviceId = [OpenUDIDvalue];

  

    

    [AuthNetauthNetWithEnvironment:ENV_TEST];

    AuthNet *an = [AuthNet getInstance];

    [an setDelegate:self];

    [an mobileDeviceLoginRequest:mobileDeviceLoginRequest];

 

}

 

 

- (void) mobileDeviceLoginSucceeded:(MobileDeviceLoginResponse *)response

{

    sessionToken = [response.sessionTokenretain];

    [selfcreateTransaction];

}

 

- (void) createTransaction

{

    AuthNet *an = [AuthNet getInstance];

    

    [an setDelegate:self];

    

    CreditCardType *creditCardType = [CreditCardTypecreditCardType];

    creditCardType.cardNumber = @"4111111111111111";

    creditCardType.cardCode = @"100";

    creditCardType.expirationDate = @"1212";

    

    PaymentType *paymentType = [PaymentType paymentType];

    paymentType.creditCard = creditCardType;

    

    ExtendedAmountType *extendedAmountTypeTax = [ExtendedAmountTypeextendedAmountType];

    extendedAmountTypeTax.amount = @"0";

    extendedAmountTypeTax.name = @"Tax";

    

    ExtendedAmountType *extendedAmountTypeShipping = [ExtendedAmountType extendedAmountType];

    extendedAmountTypeShipping.amount = @"0";

    extendedAmountTypeShipping.name = @"Shipping";

    

    LineItemType *lineItem = [LineItemTypelineItem];

    lineItem.itemName = @"Soda";

    lineItem.itemDescription = @"Soda";

    lineItem.itemQuantity = @"1";

    lineItem.itemPrice = @"1.00";

    lineItem.itemID = @"1";

    

    TransactionRequestType *requestType = [TransactionRequestTypetransactionRequest];

    requestType.lineItems = [NSArray arrayWithObject:lineItem];

    requestType.amount = @"1.00";

    requestType.payment = paymentType;

    requestType.tax = extendedAmountTypeTax;

    requestType.shipping = extendedAmountTypeShipping;

    

    CreateTransactionRequest *request = [CreateTransactionRequestcreateTransactionRequest];

    

    

    request.transactionRequest = requestType;

    request.transactionType = AUTH_ONLY;

    request.anetApiRequest.merchantAuthentication.mobileDeviceId =

    [[[UIDevicecurrentDevice] identifierForVendor] UUIDString];

    request.anetApiRequest.merchantAuthentication.sessionToken = sessionToken;

    [an purchaseWithRequest:request];

}

 

 

 

Your line in the method: - (void) createTransaction that is:

 

 

request.anetApiRequest.merchantAuthentication.mobileDeviceId =

    [[[UIDevicecurrentDevice] identifierForVendor] UUIDString];

 

Should be this instead: 

 

request.anetApiRequest.merchantAuthentication.mobileDeviceId = [OpenUDID value];