Could you explain what you mean by your app not receiving a response after calling the ACTION_SECURE_PAY, ACTION_MANUAL_PAY, ACTION_MANUAL_REFUND intents?
Sorry, our app receives the response. What I meant to say is that our app then sends the response to a Windows service which then process the information. In the event of a communication issue and the Windows service does not get the response, is there a way for the Windows service to make a call to get the last transaction? Is there an Android SDK function that will get the last transaction?
CloverAuth.AuthResult authResult = CloverAuth.authenticate(getApplicationContext(), mAccount); final String authToken = authResult.authToken; String baseUrl = authResult.authData.getString(CloverAccount.KEY_BASE_URL); String merchantId = authResult.merchantId;
Ok, so with the above solution I'm able to get the auth token.
Now I'm on Step 3: Request an API Token of https://docs.clover.com/build/oauth-2-0/. I enter the client id, app id, and auth token in the following: https://sandbox.dev.clover.com/oauth/token?client_id={APP_ID}&client_secret={APP_SECRET}&code={AUTHORIZATION_CODE} but I get the following message: "Invalid OAuth Credentials". I'm using sandbox credentials for the client id, and app id...
Any ideas why I'm getting "Invalid OAuth Credentials"?
when your http client calls GET on that uri it should return the API Token. one of your strings may have been passed as the wrong query string.
<?php $mid = YOUR_MID; $token = YOUR_API_TOKEN; // If testing on sandbox use with same endpoint //$restapi = 'https://apisandbox.dev.clover.com'; $restapi = 'https://api.clover.com'; $header = array(); $header[] = sprintf('Authorization: Bearer %s', $token); $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_URL => sprintf('%s/v3/merchants/%s/orders?limit=10', $restapi, $mid), CURLOPT_HTTPHEADER => $header )); $result = curl_exec($ch); if ($result === false) { echo sprintf('%s: %s', "CURL Error", curl_error($ch)); } else { header('Content-Type: application/json'); print_r($result); curl_close($ch); } ?>Hope this helps.
4 People are following this question.