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

标签 ios swift payment instamojo

我从 API 得到了空值 https://sample-sdk-server.instamojo.com/status ?” + 从 instamojo 支付网关屏幕回调时来自此 url 的值

我在上述 url 的查询字符串中传递了 envtransactionId,得到的结果如 ["payment_id": , "amount": , "status": ]

所以请给我任何解决方案

在 url 中传递 sample-sdk-server 是否正确??

最佳答案

我也有同样的问题,经过一番研究,我得到了这个

使用此 API 获取支付响应

https://test.instamojo.com/v2/gateway/orders/transaction_id:yourTransectionID/

并传递您获得的访问 token 作为 header Bearer token ,如下所示

let headers = [
        "Content-Type": "application/x-www-form-urlencoded",
        "Authorization": "Bearer " + self.accessToken,
        "cache-control": "no-cache"
    ]

关于ios - 没有从 instamojo API 获得值(value),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54605686/

相关文章:

ios - 在旧版本中运行 xcode 5 和 iOS7 更改

android - iOS 中是否有等效的 Android 旋转矢量?

ios - 如何在 Swift 中从应用程序委托(delegate)(使用 SpriteKit)调用不同的类

payment - 请求付款 session 时出现 Apple Pay "mass enablement"错误

javascript - 错误 : exportArchive: The data couldn’t be read because it isn’t in the correct format

ios - 在swift中调用objective-c类方法

swift - 在 NSObject 中接收到 NSNotification 时调用方法

javascript - 带有服务器集成的 PayPal 客户端 JavaScript SDK - 设置付款金额

azure - Windows Azure 支付

ios - UIWebView 在 [UIViewAnimationState 发布] : message sent to deallocated instance 随机崩溃