Register device using test account on authorize.net iphone SDK?

限于喜欢 提交于 2019-12-02 07:46:06

From Authorize.Net support:

If they are referring to the actual app please be advised that currently the app will not work for test accounts but if they are talking about the SDK, they will need to register the phone first by using “MobileDeviceRegistrationRequest” the first time they use a new phone. The phone will show up for approval in their Settings page when they login to their Authorize.Net account. Once they approved it they can login by using “MobileDeviceLoginRequest”.

Mohit

Code For registration of device

MobileDeviceRegistrationRequest *registrationRequest=[MobileDeviceRegistrationRequest mobileDeviceRegistrationRequest];
registrationRequest.anetApiRequest.merchantAuthentication.name= @"Current API Login ID";
registrationRequest.anetApiRequest.merchantAuthentication.password = @"Current Transaction Key";

registrationRequest.mobileDevice.mobileDescription=@"Description";
registrationRequest.mobileDevice.phoneNumber = @"Mobile no.";
registrationRequest.mobileDevice.mobileDeviceId=   @"Device udid";

[AuthNet authNetWithEnvironment:ENV_TEST];
AuthNet *an = [AuthNet getInstance];
[an setDelegate:self];
[an mobileDeviceRegistrationRequest:registrationRequest];

Remember that once device is register from site than comment the below code

[an mobileDeviceRegistrationRequest:registrationRequest];

because once device is registered then no need to register again other wise give give error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!