I have a link that on entering it (click/tap), is a confirmation to pay. The link is sent by sms to the user.
The problem starts when the link is being displayed as a rich preview url, that causes the link to be visited and the user will be considerd to confirm the payment.
Just so you can get a clue as for what is a rich preview (/). It happens in messaging services like WhatsApp and iMessage when they display the content of the link before you open it. It plies to the open graph protocol explained here: /
The question is: how do I disable this rich perview from my end (server side) or how do I detect that this request is for rich preview so that I could ignore the payment confirmation?
One of the suggestions from Google searches was to simply locate the url link in the middle of the text, will it work in all cases?
I had the idea of creating a new page that will redirect (by script) on render to the actual payment confirmation page, is it possible or will the rich preview run this script as well?
Thanks
I have a link that on entering it (click/tap), is a confirmation to pay. The link is sent by sms to the user.
The problem starts when the link is being displayed as a rich preview url, that causes the link to be visited and the user will be considerd to confirm the payment.
Just so you can get a clue as for what is a rich preview (https://richpreview./). It happens in messaging services like WhatsApp and iMessage when they display the content of the link before you open it. It plies to the open graph protocol explained here: http://ogp.me/
The question is: how do I disable this rich perview from my end (server side) or how do I detect that this request is for rich preview so that I could ignore the payment confirmation?
One of the suggestions from Google searches was to simply locate the url link in the middle of the text, will it work in all cases?
I had the idea of creating a new page that will redirect (by script) on render to the actual payment confirmation page, is it possible or will the rich preview run this script as well?
Thanks
Share Improve this question edited Aug 13, 2017 at 11:15 user8395373 asked Aug 13, 2017 at 9:34 NoyloyNoyloy 1541 silver badge6 bronze badges 3- Hi, can you attach the link to a dummy copy of your payment page so I can see what the rich link looks like? – user8395373 Commented Aug 13, 2017 at 10:12
- Also, couldn't you just use email instead of SMS? – user8395373 Commented Aug 13, 2017 at 12:28
- 1 no can do'sville babydoll... I am limited to sms. I also can't send you an example link, sry. Thanks for your reply and answer, I'll definitely try it out and post a result. – Noyloy Commented Aug 13, 2017 at 13:39
3 Answers
Reset to default 5Removing the http://
or https://
off the front of the link will cause Whatsapp to disable rich link previews.
Unfortunately, using redirects probably won't work. Pretty much, what the rich link does, is it opens its own mini web browser and opens the page for you. If you have redirects the app will just follow these.
Before sending the link, make the server put a dot and a space before the link and a space and a dot after it. See the example:
Sending a the link like this (http://www.bbc.co.uk/news/uk-40909057) will produce a rich link, like this:
However, if you send the same link, just with the dots (. http://www.bbc.co.uk/news/uk-40909057 .) it does this:
Note: the messaging service removes the dots automatically when it acts upon them, so they don't appear in the message the recipient sees.
I think this should work for you, please get back to me when you have checked it.
The thing that did the trick was based upon the user agent of the request to get the preview.
All the requests for rich preview were from a non-mobile device, since the platform is solely mobile based, the solution was to detect the user agent and "block" the automatic charge for the user with the non-mobile ua.
instead a button was presented to continue the charge procces for the cases that the device was not recognized as mobile but the proccess now continues with the user intent.