ios - 错误=错误域=NSCocoaErrorDomain代码=3840 "Garbage at end."

标签 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];

请帮帮我.. 谢谢...

最佳答案

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

在 IOS 中,在生成校验和时,只应打印高亮显示的值,但它也是打印格式。

这是错误的,这就是为什么它在最后显示垃圾。

关于ios - 错误=错误域=NSCocoaErrorDomain代码=3840 "Garbage at end.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36177162/

相关文章:

javascript - Django/AngularJS : How do I access my Python Context Items from my AngularJS Script

java - Paytm 支付网关 Java Web 集成 - servlet 调用内的 jsp 示例有时由于提交的 javascript 而无法工作

php - 如何将 Paytm 与 Codeigniter 集成

ios - 导出视频总是失败

iphone - 第二个图像将如何查看 tableview 单元格?

ruby-on-rails - 渲染包含 Float::NAN 对象的哈希时,Rails 返回无效的 JSON

php - 如何在 php 中只提取特定的 json 对象字段值?

ios - 是否需要在 UIViewController 中声明 UIButton 属性作为 UIKit 中的一个错误?

ios - 如何更快地将 View 渲染成图像?