Uber API issue : Getting error while using this code. SSL certificate self signed certificate in certificate chain - uber-api

I am new to Uber API, I just started exploring the Uber API's.
I have downloaded the complete Uber API repository from https://github.com/stevenmaguire/uber-php/issues/17
I have downloaded the complete repository using the composer. It shows that all dependencies were downloaded successfully. but when I am using the API, I am getting this error
Blockquote"SSL certificate problem: self signed certificate in certificate chain"
Please help me in this, I have raised this issue 8 days back on the Github no one is replied.
Here is my code
Thanks in Advance.
Rakesh
Here is my code`
<?php
require __DIR__ . '/vendor/autoload.php';
$client = new Stevenmaguire\Uber\Client(array(
'access_token' => '********',
'server_token' => '********',
'use_sandbox' => false, // optional, default false
'version' => 'v1.2', // optional, default 'v1.2'
'locale' => 'en_US', // optional, default 'en_US'
));
$products = $client->getProducts(array(
'latitude' => '41.85582993',
'longitude' => '-87.62730337'
));
var_dump($products);
?>
`

Related

OpenAm With Redmine cannot logout |HTTP Status 400 - Error processing LogoutRequest. Single Logout Response Service location not found

OpenAM as single sign-on in Redmine is working for me, but I can't sign out from Redmine. This is the error I get:
HTTP Status 400 - Error processing LogoutRequest. Single Logout Response Service location not found.
The config file is:
Redmine::OmniAuthSAML::Base.configure do |config|
config.saml = {
:assertion_consumer_service_url => "http://xxxxx/redmine/auth/saml/callback", # The redmine application hostname
:issuer => "Redmine", # The issuer name
:idp_sso_target_url => "http://xxxxxx:8080/openam/SSORedirect/metaAlias/idp1", # SSO login endpoint
:idp_cert_fingerprint => "DE:xxxx", # SSO ssl certificate fingerprint
:name_identifier_format => "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
:signout_url => "http://oxxxx:8080/openam/IDPSloPOST/metaAlias/idp1",
:idp_slo_target_url => "http://xxxxxx:8080/openam/IDPSloRedirect/metaAlias/idp1",
:name_identifier_value => "mail", # Which redmine field is used as name_identifier_value for SAML logout
:attribute_mapping => {
# How will we map attributes from SSO to redmine attributes
:login => 'extra.raw_info.username',
:firstname => 'extra.raw_info.first_name',
:lastname => 'extra.raw_info.last_name',
:mail => 'extra.raw_info.email'
}
Please help me fix it.
Your ruby app protected by omniauth is not defining any Single Logout Service URL so if there is any SLO flow, the IdP doesn't know where to send the LogoutRequest / LogoutResponse.
ruby-saml defines it as 'assertion_consumer_logout_service_url' or 'single_logout_service_url', and here is how the ruby-saml toolkit process a SLO
Sadly omniauth does not support yet this feature, but there is a PR that you can apply.

PayPal Rest API Curl SSL : unable to get local issuer certificate

I am working on PayPal Express checkout restapi service.
I complated successfully at sandbox mode but when trying go online curl returns "unable to get local issuer certificate" error. At sandbox i dont get this error.
What i tried!
I tried bind cert file (Latest one from mozilla) in php.ini and curl parameter but nothing change.
Currently my code like this
//Building our NVP string
$request = http_build_query($requestParams + $params);
//cURL settings
$curlOptions = array (
CURLOPT_URL => https://api-3t.paypal.com/nvp,
CURLOPT_VERBOSE => 1,
CURLOPT_SSL_VERIFYPEER => 1,
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_CAINFO =>'certs/cacert.pem', //CA cert file
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => $request
);
$ch = curl_init();
curl_setopt_array($ch,$curlOptions);
Where i am failing ?
Note: I already got API Signature for LIVE from
https://www.paypal.com/us/cgi-bin/webscr?cmd=_get-api-signature
I fixed problem.
Mozilla's certs is failing on live edition.
When i used Facebook's cert it fixed.

With email parameter , which ends with dot com, can't get Result from Restful Web Service by using Perl LWP

I want to use perl with Module LWP to get the XML info from Restful Webservice.
Here is the Code:
my $ua = LWP::UserAgent->new;
$ua->proxy(['http','https'],'http://proxy:3128');
$ua->default_header('Accept-Charset'=>'utf-8');
$ua->default_header('Accept'=>'application/*********; version=1');
my $url= 'https://user:password#mailbox.********.net/mailboxes/?emailaddress=name#domain.net';
print Dumper($ua->get($url));
It works always good for all the email address like .eu, .org or .net, except for the email address ends with .com. (For example: name#domail.com)
The error message is:
The following error was encountered while trying to retrieve the URL:
https://user#mailbox.******.net/mailboxes/?
Access Denied.
Access control configuration prevents your request from being allowed at this time.
Please contact your service provider if you feel this is incorrect.
Your cache administrator is *****#**.**
The corresponded Response HEAD:
'_headers' => bless( {
'connection' => 'close',
'client-response-num' => 1,
'date' => 'Wed, 19 Nov 2014 15:53:45 GMT',
'x-squid-error' => 'ERR_ACCESS_DENIED 0',
'client-peer' => '****:3128',
'content-length' => '3502',
'client-date' => 'Wed, 19 Nov 2014 15:53:45 GMT',
'content-type' => 'text/html',
'mime-version' => '1.0',
'title' => 'ERROR: The requested URL could not be retrieved',
'server' => 'squid/3.1.12',
'x-cache' => 'MISS from proxy',
'x-cache-lookup' => 'NONE from proxy:3128'
}, 'HTTP::Headers' ),
I have tested with SoapUI and curl, they didn't meet this problem. That means .com works also with SoapUI and cuil. Only in perl with LWP, it gets problem.
Anyway when I added a dummy parameter like
https://**/mailboxes/?emailaddress=name#domain.com&foo=bar at the end of the link, it works.
I have no idea, if it's a bug in LWP or maybe some incompatible issue between LWP and Proxy Setting.
Access Denied.
Access control configuration prevents your request from being allowed at this time.
Please contact your service provider if you feel this is incorrect.
...
'x-squid-error' => 'ERR_ACCESS_DENIED 0',
There is an ACL in the proxy you use which denies your request.
If you have access to the proxy configuration check there, otherwise contact you cache administrator with your problem.

Website Paypal Connection with Php

Im trying to connect my website with paypal and i have the index page where i am getting the order price,
the order name and then i refer them to the process.php using get for processing.Howevever,on running the process.php file i am getting this error
Error : Security header is not valid
Array
(
[TIMESTAMP] => 2014%2d10%2d07T17%3a22%3a00Z
[CORRELATIONID] => 37359d983e7a
[ACK] => Failure
[VERSION] => 109%2e0
[BUILD] => 13243702
[L_ERRORCODE0] => 10002
[L_SHORTMESSAGE0] => Security%20error
[L_LONGMESSAGE0] => Security%20header%20is%20not%20valid
[L_SEVERITYCODE0] => Error
)
How can i solve this error.Please Assist
This error comes in when :
You are using the wrong credentials ( make sure you have not copied any white spaces in apiusername. password and the signature .
You are using the wrong endpoints . Meaning you are using test credentials in live mode or vice versa .

Facebook::Graph Could not fetch access token TLS Support not available

Im' trying to use facebook api with perl module Facebook::Graph
First step, get che code:
my $fb = Facebook::Graph->new(
app_id => 'xxxx',
secret => 'xxxx',
postback => 'http://xxxxx/fb_postback',
);
my $uri = $fb
->authorize
->uri_as_string;
Now I have the code param and I try to get the auth token:
$fb->request_access_token($RETURNED_PARAM_CODE);
The server log this error:
Could not fetch access token: TLS support not available on this system at perl5/site_perl/5.10.0/Facebook/Graph/AccessToken/Response.pm line 26.
Any ideas?
Install Net::SSLeay and AnyEvent::TLS, or better upgrade Facebook::Graph to >= 1.0502.