-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cURL error code 3: Malformed url #2
Comments
Hello @Nganyu <?php
use Maviance\S3PApiClient\ApiClient;
use Maviance\S3PApiClient\Configuration;
require_once(__DIR__ . '/vendor/autoload.php');
$token = "public access key";
$secret = "access secret";
$xApiVersion = "3.0.0"; // string | api version info
$config = new Configuration();
///HERE
$url = "https://example.com";
$config->setHost($url);
$client = new ApiClient($token, $secret, ['verify' => true]);
$apiInstance = new Maviance\S3PApiClient\Service\AccountApi($client,$config);
try {
$result = $apiInstance->accountGetWithHttpInfo($xApiVersion);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountApi->accountGet: ', $e->getMessage(), PHP_EOL;
}
?> Maybe the variable that you are passing to |
Hi, Thanks much, I have checked that and made sure of that properly. `<?php use Maviance\S3PApiClient\ApiClient; include_once(APPPATH."/vendor/autoload.php"); //$env = "stag"; $config = new Configuration(); // set "verify" to false to disable ssl verification $version = "3.0.0"; Yet i get thesame issues. |
Also it works pretty good on localhost, but throws that error on my server. cURL is enabled and i have ran composer update a couple of times. |
Hello, please do not expose your credentials here. those issues are public |
This works correctly in our end. <?php
use Maviance\S3PApiClient\ApiClient;
use Maviance\S3PApiClient\Configuration;
use Maviance\S3PApiClient\Service\AccountApi;
require_once(__DIR__ . '/vendor/autoload.php');
//$env = "stag";
$url = "https://s3p.smobilpay.staging.maviance.info/v2"; //"https://s3papi.cmstaging.smobilpay.net/v2";
$token = 'your-token';
$secret = 'your-secret';
$config = new Configuration();
$config->setHost($url);
$config->setDebugFile("api.log");
$config->setDebug(false);
// set "verify" to false to disable ssl verification
$client = new ApiClient($token, $secret, ['verify' => false]);
$apiInstance = new AccountApi($client,$config);
$version = "3.0.0";
$result = $apiInstance->accountGetWithHttpInfo($version);
?> Send your error message here, so that we can review. Make sure it is related to this package. |
Closing as we are waiting for user feedback |
I have been trying to configure te API bit on my codeignter project hosted on a plesk server . i have serious issues. The error code when i call masterdata or cashout get is
An error occured: string(75) "[0] cURL error 3: (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)" NULL string(710) "#0 /var/www/vhosts/trusting-ride.217-160-71-127.plesk.page/ci/application/vendor/maviance/smobilpay-php/src/Service/AccountApi.php(103): Maviance\S3PApiClient\Service\AccountApi->accountGetWithHttpInfo() #1 /var/www/vhosts/trusting-ride.217-160-71-127.plesk.page/ci/application/helpers/rc_helper.php(108): Maviance\S3PApiClient\Service\AccountApi->accountGet() #2 /var/www/vhosts/trusting-ride.217-160-71-127.plesk.page/ci/application/controllers/App.php(122): masterdata() #3 /var/www/vhosts/trusting-ride.217-160-71-127.plesk.page/ci/system/core/CodeIgniter.php(532): App->masterdata() #4 /var/www/vhosts/trusting-ride.217-160-71-127.plesk.page/ci/index.php(315): require_once('/var/www/vhosts...') #5 {main}"
From my research this corresponds to a malformed URL. I have tried every possible solution to know avail.
The text was updated successfully, but these errors were encountered: