以下是我用于注册和登录网关的代码
-(void)registerDevice
{
MobileDeviceRegistrationRequest *registrationRequest=[MobileDeviceRegistrationRequest mobileDeviceRegistrationRequest];
registrationRequest.anetApiRequest.merchantAuthentication.name=self.APIName;
registrationRequest.anetApiRequest.merchantAuthentication.password = self.APITransactionKey;
registrationRequest.mobileDevice.mobileDescription=@"iPhone";
registrationRequest.mobileDevice.mobileDeviceId=[[[UIDevice currentDevice] identifierForVendor] UUIDString];
[AuthNet authNetWithEnvironment:ENV_TEST];
AuthNet *an = [AuthNet getInstance];
[an setDelegate:self];
[an mobileDeviceRegistrationRequest:registrationRequest];
}
- (void) loginToGateway
{
MobileDeviceLoginRequest *mobileDeviceLoginRequest = [MobileDeviceLoginRequest mobileDeviceLoginRequest];
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.name = self.APIName;
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.password = self.APITransactionKey;
NSLog(@"UIDevice =%@",[[[UIDevice currentDevice] identifierForVendor] UUIDString]);
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.mobileDeviceId =
[[[UIDevice currentDevice] identifierForVendor] UUIDString];
[AuthNet authNetWithEnvironment:ENV_TEST];
AuthNet *an = [AuthNet getInstance];
[an setDelegate:self];
[an mobileDeviceLoginRequest: mobileDeviceLoginRequest];
}
我正在尝试将Authorize.net支付网关集成到iOS应用程序中。但是,每当我提出请求时,我都会得到这一回复。
2015-08-22 16:41:41.741 Authorizetest[3193:261060] Reachability Flag Status: -R -----l- networkStatusForFlags
2015-08-22 16:41:42.754 Authorizetest[3193:261060] Mobile Device Registration Response
2015-08-22 16:41:42.754 Authorizetest[3193:261060] <?xml version="1.0" encoding="utf-8"?><mobileDeviceRegistrationResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Error</resultCode><message><code>E00007</code><text>User authentication failed due to invalid authentication values.</text></message></messages></mobileDeviceRegistrationResponse>
namespace warning : xmlns: URI AnetApi/xml/v1/schema/AnetApiSchema.xsd is not absolute
ttp://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"
错误代码为E00007,消息为&#34;由于身份验证值无效,身份验证失败。&#34;
有人可以指导我做错了吗
由于