question

nick-1 avatar image
nick-1 asked nick-1 answered

Starting to use hosted iframe - sandbox

Hello,

I am having difficulty navigating the documentation and setting up a hosted iframe.

I have the simplest of pages set at http://nick.lms.cm-hosting.com/bluepay/iframe.php based upon the documentation https://docs.clover.com/docs/using-the-clover-hosted-iframe

Hitting submit generates a number of console errors, so I have a number of questions.

Firstly, how do I generate the token passed into the const clover = Clover('token'); call?

Secondly, is there a complete simple working example of iframe in the documentation?

Many thanks

Nick




clover developer community
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

Here is an example:

https://codepen.io/gareth-dsouza/pen/MWKbWwv

The token is a PAKMS key, https://docs.clover.com/docs/ecommerce-generating-a-card-token#generating-a-pakms-key

In order to obtain a PAKMS key you will need a Clover app.

1) Create a sandbox account - https://docs.clover.com/docs/setup-clover-sandbox-account#create-a-sandbox-developer-account

2) Create a web app with the correct permissions (https://docs.clover.com/docs/ecommerce-app-permissions

3) Install the test app on your test merchant - https://docs.clover.com/docs/merchant-interaction#installing-your-test-app

4) Obtain an OAuth token. If you don't have a server set-up yet, you can just use the query params in the redirect (plus your app secret) to obtain a token via - https://docs.clover.com/docs/using-oauth-20#the-clover-oauth-20-flow

5) Once you have the OAuth token (access token) make a call to obtain your PAKMS (https://docs.clover.com/docs/ecommerce-generating-a-card-token#generating-a-pakms-key)



10 |2000

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

nick-1 avatar image
nick-1 answered

David, many thanks!!

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