【问题标题】:Authorize.net ios Sdk errorAuthorize.net ios SDK错误
【发布时间】:2011-11-29 09:22:35
【问题描述】:

我在使用测试帐户进行测试时遇到问题。

我使用交易密钥输入了正确的用户名和密码..

我使用下面的代码登录..

[AuthNet authNetWithEnvironment:ENV_TEST];

MobileDeviceLoginRequest *mobileDeviceLoginRequest =[MobileDeviceLoginRequest mobileDeviceLoginRequest];
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.name = @"xxxx";
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.transactionKey =@"xxxxxxxxxxxxxx";
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.sessionToken =sessionToken;
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.password = @"xxxxxxx";
mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.mobileDeviceId =[[[UIDevice currentDevice] uniqueIdentifier]
 stringByReplacingOccurrencesOfString:@"-" withString:@"_"];

AuthNet *an = [AuthNet getInstance]; 
[an setDelegate:self];
[an mobileDeviceLoginRequest: mobileDeviceLoginRequest];

但在响应时返回低于 xml。

ErrorE00003The element 'merchantAuthentication' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'password' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'mobileDeviceId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.

谁能想到解决这个错误...?

【问题讨论】:

    标签: iphone objective-c ios


    【解决方案1】:

    注册时无需传递transactionkey。只需通过loginidpassword

    【讨论】:

    • 它仅用于测试,但用于实时测试。
    • 对于实时测试,您需要有一个真实账户。
    • 苹果是否允许使用 Authorize.net 进行支付交易。他们不拒绝?
    • @FirstTimer 是的,他们允许。我的一个应用已经在应用商店中
    【解决方案2】:

    它工作正常,但是当使用 xcode 3.2.5 运行并且设备出现 AuthNet *an = [AuthNet getInstance]; 之类的错误时an=null...那我应该怎么做呢?

    应用程序在 [AuthNet authNetWithEnvironment:ENV_TEST] 处崩溃;在设备中的 xcode 3.2.5 中。

    【讨论】:

      猜你喜欢
      • 2012-01-23
      • 2013-10-15
      • 2013-04-27
      • 2013-11-18
      • 1970-01-01
      • 2015-03-25
      • 2013-04-05
      • 1970-01-01
      • 2014-07-23
      相关资源
      最近更新 更多