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

前端 未结 2 1937
死守一世寂寞
死守一世寂寞 2021-01-27 05:45

Can someone provide me a code snippet to register my device using authorize.net test account. I am using aim sdk for iphone.

相关标签:
2条回答
  • 2021-01-27 06:19

    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.

    0 讨论(0)
  • 2021-01-27 06:30

    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”.

    0 讨论(0)
提交回复
热议问题