最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

woocommerce offtopic - One Time Access URL after purchasing subscription

programmeradmin1浏览0评论

Here's the scenario:
A client is selling a product which allows for ONE use of a Web App. The Web App has a simple URL, like wwwpany/app/the-awesome-tool (it's not publicly accessible)
I've been thinking on how to resolve this but can't wrap my head around it... the only thing I can think of is that after the purchase, the client is sent a UNIQUE URL that forwards him or her to wwwpany/app/the-awesome-tool (with masked URL), which then expires after accessing it. How can I achieve this? We have MemberPress installed, and can also install WooCommerc to resolve this. Thanks so much for your help!

Here's the scenario:
A client is selling a product which allows for ONE use of a Web App. The Web App has a simple URL, like wwwpany/app/the-awesome-tool (it's not publicly accessible)
I've been thinking on how to resolve this but can't wrap my head around it... the only thing I can think of is that after the purchase, the client is sent a UNIQUE URL that forwards him or her to wwwpany/app/the-awesome-tool (with masked URL), which then expires after accessing it. How can I achieve this? We have MemberPress installed, and can also install WooCommerc to resolve this. Thanks so much for your help!

Share Improve this question edited Mar 6, 2021 at 14:40 Marcio Vieyra asked Mar 6, 2021 at 14:34 Marcio VieyraMarcio Vieyra 31 silver badge3 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

A simple solution would be creating a unique token upon purchasing a subscription/product.

  1. Save to token somewhere in database.

  2. Present the URL to the app passing the token as a GET variable. For eample, wwwpany/app/the-awesome-tool/?token=jvp2HBst5V7iHQeE2twq

  3. When accessed, check is the token is there at the database, if not restrict access.

  4. Delete the token from database if the access was granted.

This could be extended by comparing user ID, order id etc.

发布评论

评论列表(0)

  1. 暂无评论