如何使用 JWT 将优惠保存到 Google 电子钱包? [英] How to save an Offer to Google Wallet using JWT?

查看:11
本文介绍了如何使用 JWT 将优惠保存到 Google 电子钱包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我想将优惠保存到Google 电子钱包".因为在我做一些 RND 并遇到 本文档.在本文档中,他们在 Android 端创建 Offer 类对象,但在我的情况下,Offer 类对象是在我们的后端服务器上创建的,我只需将一个 API 访问到我们的后端服务器即可获得现成的 JWT 令牌,现在使用该 JWT 令牌,我想将优惠保存到Google-Wallet".现在我的问题是,有可能吗?如果是,请告诉我如何?如果我可以提供更多详细信息,请告诉我,以便您了解我的问题.谢谢你

Actually I want to save an offer to 'Google Wallet'. As I haven't worked on it before I did some RND and came across this documentation. In this documentation they are creating Offer class object at Android side but, in my case the Offer class object is creating at our back-end server and I'm getting ready-made JWT token just by hitting one API to our back-end server, now using that JWT token I want to save the offer to the 'Google-Wallet'. Now my question is, is it possible? if Yes please tell me How? Also please let me know if I can provide more details so that you can understand my problem. Thank you

推荐答案

我一直在 PassNinja 研究这个.对于您的用例,最方便的方法是使用 JWT 链接和意图.填写您生成的 JWT 和类 ID:https://www.android.com/{classid}/savetoandroidpay/{jwt_generated}

I have been working on this at PassNinja. The most convenient method for your use case would be to use the JWT link and intent. Fill in your generated JWT and class ID: https://www.android.com/{classid}/savetoandroidpay/{jwt_generated}

使用 ACTION_VIEW 意图打开保存到 Google Pay 按钮的深层链接.确保触发意图的按钮使用品牌指南.

Use an ACTION_VIEW intent to open the deep link from the Save to Google Pay button. Make sure that the button that triggers the intent uses the Brand guidelines.

Intent webIntent = new Intent(Intent.ACTION_VIEW,
        Uri.parse("https://www.android.com/payapp/savetoandroidpay/" + JWT));
context.startActivity(webIntent)`

有关深层链接和保存到 Google Pay 的更多信息,这里有一个视频.

For more info on deep links and Save to Google Pay, here is a video.

这篇关于如何使用 JWT 将优惠保存到 Google 电子钱包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆