我在我的 iOS 应用程序中集成了 instamojo 支付网关。我目前正在使用带有 swift 4.0 的 Xcode 9.2。我已经通过 Cocoapods 安装了最新的 SDK。我还在我的服务器上设置了访问令牌 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)
}
})
}