Where to put API Login ID and Transaction Key in Authorize.Net iOS SDK?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-14 00:13:42

问题


Authorize.Net provides payment integration.

My Question : Where to put API Login ID and Transaction Key in Authorize.Net iOS SDK?

I have already included registration and login request code.

It is working fine in test account with test username and password.

Following is code for registration of device.

MobileDeviceRegistrationRequest *mobileDeviceRegistrationRequest = [MobileDeviceRegistrationRequest mobileDeviceRegistrationRequest];
mobileDeviceRegistrationRequest.mobileDevice.mobileDeviceId = [[[[UIDevice currentDevice] identifierForVendor]UUIDString]stringByReplacingOccurrencesOfString:@"-" withString:@"_"];
mobileDeviceRegistrationRequest.anetApiRequest.merchantAuthentication.name = @"------";
mobileDeviceRegistrationRequest.anetApiRequest.merchantAuthentication.password = @"------";
mobileDeviceRegistrationRequest.anetApiRequest.merchantAuthentication.transactionKey=@"------";

AuthNet *anReg = [AuthNet getInstance];
[anReg setDelegate:self];
[anReg mobileDeviceRegistrationRequest:mobileDeviceRegistrationRequest];

I think Merchant will not give the username and password to developer.

So Where to put API Login ID and Transaction Key?

Thank You


回答1:


Sensitive information like the API Login and Transaction Key should not be stored on the mobile device.

Instead, when using the mobile SDK, you should use the Login ID and Password. This gives the account owner more control because they can create a user with specific roles to control what the user can or cannot do. An account owner or administrator must approve new device registrations and can remotely disable them from within the merchant interface.

Use the sandbox to create your own gateway account where you can fully test your integration without the possibility of actual transactions being submitted to the card network.



来源:https://stackoverflow.com/questions/24954001/where-to-put-api-login-id-and-transaction-key-in-authorize-net-ios-sdk

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