Hello,
I'm an experienced web developer working on a website for my client, setting up e-commerce with Clover payment processing.
My plan is to integrate the Hosted iframe into an existing shopping cart system – something I have done similarly before with Square, so I am somewhat familiar with the process.
I have followed Clover developer documentation to the point of creating a Developer Account, an app in that account, and the app is now appearing in the "Test Merchant" dashboard.
I am now stuck at the point of "Tokenize a Customer Card", specifically the OAuth part, i.e. getting the API Token.
Specifically, here: https://docs.clover.com/docs/obtaining-an-oauth-token#get-the-api-token
I am following these steps:
- Log in to your sandbox Developer Dashboard.
- Navigate to the Merchant Dashboard for your test merchant.
- From the left navigation menu, select your test application.
Clover redirects to your application. - If you have not yet coded your application server to handle the redirect and obtain an access token, note the client_id and the code in the URL.
For step 4, there is no "code" in the URL. The URL I see is:
https://www.XXXX.com/new/test/?merchant_id=XXXX&client_id=XXXX&packageName=UNKNOWN
So, therefore I cannot do the GET request of Step 5, because I don't have "code"...
5. Send an API token GET request in the following URL format to the Clover /oauth/token server, passing the client_id, your client_secret, and code:
https://sandbox.dev.clover.com/oauth/token?client_id={appId}&client_secret={APP_SECRET}&code={AUTHORIZATION_CODE} https://sandbox.dev.clover.com/oauth/token?client_id={appId}&client_secret={APP_SECRET}&code={AUTHORIZATION_CODE}
As I understand it, the OAuth token is a prerequisite of setting up the payment form and creating a charge...
https://docs.clover.com/docs/using-the-clover-hosted-iframe#set-up-the-payment-form
Also, where can I find sample HTML and curl code that I can use? I see pieces of code in the documentation, but nothing complete enough to actually work it seems. PHP versions of the curl code would also be helpful.
Any help much appreciated.