ios - 无法解析 json 错误 instamojo

标签 ios swift instamojo

我在我的 iOS 应用程序中集成了 instamojo 支付网关。我目前正在使用带有 swift 4.0 的 Xcode 9.2。我已经通过 Cocoapods 安装了最新的 SDK。 我还在我的服务器上设置了访问 token url。

但是当我使用 Instamojo 提供的代码发起付款时。结果状态为假,我收到错误消息“无法解析 json”

IMConfiguration.sharedInstance.setupOrder(purpose: "buying", buyerName: "Shardul", emailId: "tester@gmail.com", mobile: "7875432991", amount: "20", environment: .Test, on: self) { (success, message) in
            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1, execute: {
                if success {
                   print(message)
                } else {
                   print(message)
                }
            })
        }

最佳答案

如果您正确实现了所有内容,那么它一定能正常工作。 您是否检查过您在服务器上访问 token php 脚本。

关于ios - 无法解析 json 错误 instamojo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50564317/

相关文章:

ios - 当用户在 Swift 中选择 UISegmentedControl 时,如何更改它的样式?

php - 如何启用 instamojo 沙箱(测试模式)模式

iphone - 重命名文档目录的文件夹

ios - UIView 未正确更新

ios - webView 加载时的进度条

ios - 未添加到 x 时创建三角形 View 失败 : 0 and y: 0

error-handling - Instamojo付款网关错误

ios - 没有从 instamojo API 获得值(value)

ios - 当正在播放的项目跳到当前播放列表之外时,MPMusicPlayerController 的状态是什么?

ios - 尝试在单击按钮但不触发方法时显示 ViewController 时出错