Closed Premlimbachiya closed 4 years ago
Hello @Premlimbachiya
Could you provide some code sample ? Which version are you using?
You can have a look at our tests here: https://github.com/Mangopay/mangopay2-php-sdk/blob/master/tests/cases/UsersTest.php#L138 which are currently passing.
require_once FCPATH . '/payment/vendor/autoload.php';
class Payment_mongo extends CI_Controller {
public $curlang = 'en';
function __construct() {
parent::__construct();
}
public function index() {
$api = new MangoPay\MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-client-password';
$api->Config->TemporaryFolder = '/some/path/';
try {
$users = $api->Users->GetAll();
//pre($users);
} catch (MangoPay\Libraries\ResponseException $e) {
pre($e);
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()
} catch (MangoPay\Libraries\Exception $e) {
pre($e->getMessage());
// handle/log the exception $e->GetMessage()
}
}
}
Hey @Premlimbachiya
Thanks for this response. Is you temporary folder well set ? I can see '/some/path/' in you code.
$api->Config->TemporaryFolder = '/some/path/';
Is there a folder in read+write available at this path ?
Additional question : can I have your client-id ?
Thanks !
yes there is permission of temporary folder and client-id is "harbin".
Thanks for this response. Is your ClientPassword identical to your API Key ?
no both are different.
currently i am set password which is use in sandbox login and also try with API key but not working.
ClientPassword should be identical to your API Key.
You can contact-us directly from this page if you need any direct assistance during your implementation --> https://www.mangopay.com/fr/contact/
using my client id and login password i am trying to get all user but it will return Unauthorized from php sdk