question

jeetutiwari avatar image
jeetutiwari asked David Marginian Deactivated answered

Clover-hosted iframe Target Origin issue

I try to integrate the Clover hosted iframe payment in my website, this is integration process i am usinghttps://docs.clover.com/docs/using-the-clover-hosted-iframe#

But when add card and hit place order it given the Recipient origin error like: Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://checkout.sandbox.dev.clover.com’) does not match the recipient window’s origin (‘http://localhost’).

and iframe popup for payment is not opening. Please find the attached image for error as well.

1.pngCan you please advise why this error is coming and how we can able to resolve it

REST APIPayments
1.png (61.0 KiB)
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered

Try using your pakms key in this example - https://codepen.io/gareth-dsouza/pen/PoPEypO.. If that doesn't work it is likely there is something wrong with your pakm key, so provide information on how you are obtaining it. If it does work, then I would try using something other than localhost for your site.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community