【问题标题】:How to test Authorize.net in iPhone sdk如何在 iPhone sdk 中测试 Authorize.net
【发布时间】:2012-05-11 18:42:53
【问题描述】:

我正在使用Authorize.net

设备注册成功但getTransactionDetailsSucceeded没有被调用?

我该如何测试它..

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"

也关注了这个url,但还是没有成功...

【问题讨论】:

    标签: iphone authorize.net


    【解决方案1】:

    感谢您的回复..但它已经完成了...

    //Call this method at once in project
    -(void)registerDevice
    {
        NSLog(@"registerDevice");
        MobileDeviceRegistrationRequest *registrationRequest=[MobileDeviceRegistrationRequest mobileDeviceRegistrationRequest];
    
        registrationRequest.anetApiRequest.merchantAuthentication.name= txtUserName.text;
    
        registrationRequest.anetApiRequest.merchantAuthentication.password = txtPassword.text;
    
        registrationRequest.mobileDevice.mobileDescription=@"iPhone";
        registrationRequest.mobileDevice.phoneNumber = @"7889999999";
        registrationRequest.mobileDevice.mobileDeviceId=[[[UIDevice currentDevice] uniqueIdentifier]
                                                         stringByReplacingOccurrencesOfString:@"-" withString:@"_"]; 
        NSLog(@"registrationRequest %@",registrationRequest);
        [AuthNet authNetWithEnvironment:ENV_TEST];
    
        AuthNet *an = [AuthNet getInstance];
    
        [an setDelegate:self];
    
        [an mobileDeviceRegistrationRequest:registrationRequest];
    
    }
    
    
    //And after above method call below method
    
    - (void) loginToGateway {
          MobileDeviceLoginRequest *mobileDeviceLoginRequest =
            [MobileDeviceLoginRequest mobileDeviceLoginRequest];
          mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.name = txtUserName.text;
          mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.password = txtPassword.text;
          mobileDeviceLoginRequest.anetApiRequest.merchantAuthentication.mobileDeviceId =
            [[[UIDevice currentDevice] uniqueIdentifier]
                     stringByReplacingOccurrencesOfString:@"-" withString:@"_"];
    
          AuthNet *an = [AuthNet getInstance];
    
          [an setDelegate:self];
          [an mobileDeviceLoginRequest: mobileDeviceLoginRequest];
    } 
    

    【讨论】:

    • 它工作正常,但 [AuthNet getInstance] 进入 xcode 3.2.5 并与设备一起运行的价值..!!
    • 如果我们只需要使用不安全的密码,那么交易密钥有什么用?
    【解决方案2】:

    当您的设备未注册时会发生此错误。因此请编写上述方法来注册您的设备并将其替换为您的凭据

    【讨论】:

      【解决方案3】:

      我也有同样的问题,Error Message.code = E00059 Message.text = 此方法调用不允许使用身份验证类型。

      解决方案是--如果您的设备已经注册 然后评论下面的代码

      [an mobileDeviceRegistrationRequest:mobileDeviceRegistrationRequest];
      

      这是用于注册设备的

      【讨论】:

        猜你喜欢
        • 2012-01-09
        • 2011-12-27
        • 2018-03-30
        • 2010-10-16
        • 1970-01-01
        • 1970-01-01
        • 2013-11-18
        • 2015-10-07
        • 1970-01-01
        相关资源
        最近更新 更多