【问题标题】:error = Error Domain=NSCocoaErrorDomain Code=3840 "Garbage at end."错误 = 错误域 = NSCocoaErrorDomain 代码 = 3840 “垃圾结束。”
【发布时间】:2016-07-10 16:25:34
【问题描述】:

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

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

// 我在这里传递我的服务器 URL //第 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];

请帮帮我.. 谢谢...

【问题讨论】:

  • 你好,如果你解决了同样的问题,请给我答案...谢谢
  • @sohil 请检查我的回答,它会帮助你。

标签: ios json paytm


【解决方案1】:

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

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

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

【讨论】:

  • 如果我使用默认的 paytm url 怎么办?我该怎么做?另外能分享一下你用的是什么版本的paytm SDK吗?
  • 我使用的是 2.12.2 版本。我不是 png 我使用我的服务器 url 不确定默认的 paytm url
猜你喜欢
  • 2021-11-18
  • 2016-06-11
  • 2017-06-16
  • 2018-04-08
  • 2015-03-11
  • 2020-03-14
  • 2019-11-29
  • 2016-02-26
  • 1970-01-01
相关资源
最近更新 更多