error = Error Domain = NSCocoaErrorDomain Code = 3840" Garbage at end。"

时间:2016-03-23 11:38:12

标签: ios json paytm

我在我的应用程序中使用PayTm SDK。我在设置时遇到上述错误。

  mc.checksumGenerationURL = @"My URL";
  mc.checksumValidationURL = @"My URL ";

//我在这里通过我的服务器Urls     //步骤3:使用您要添加的任何参数创建订单。但请确保包含商家强制性参数

    NSMutableDictionary *orderDict = [NSMutableDictionary new];
//Merchant configuration in the order object


orderDict[@"MID"] = @""; //Passes my Id

orderDict[@"CHANNEL_ID"] = @"WAP";
orderDict[@"INDUSTRY_TYPE_ID"] = @"Retail";
orderDict[@"WEBSITE"] = @""; Passed my website



//Order configuration in the order object
orderDict[@"CUST_ID"] = @"123456";
orderDict[@"ORDER_ID"] = [ViewController generateOrderIDWithPrefix:@""];
orderDict[@"TXN_AMOUNT"] = @"1";

orderDict[@"REQUEST_TYPE"] = @"DEFAULT";



PGOrder *order = [PGOrder orderWithParams:orderDict];

//Step 4: Choose the PG server. In your production build dont call selectServerDialog. Just create a instance of the
//PGTransactionViewController and set the serverType to eServerTypeProduction

     PGTransactionViewController *txnController = [[PGTransactionViewController alloc] initTransactionForOrder:order];
         txnController.serverType =eServerTypeStaging ;

        //  txnController.loggingEnabled = YES;
          // txnController.sendAllChecksumResponseParamsToPG = YES;
         txnController.merchant = mc;
         txnController.delegate = self;
         [self showController:txnController];

请帮帮我.. 谢谢......

1 个答案:

答案 0 :(得分:1)

CheckSum生成URL只应包含三个参数.aspx页面不应包含表单代码。请检查下面的屏幕截图。 enter image description here

在生成校验和时的IOS中,只有高亮值才能打印,但也是打印格式。

这是错误的,因为它最终会显示垃圾。