问题
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