probleme api nou 2Performant

121 views
Skip to first unread message

Adrian Zamfira

unread,
Sep 20, 2016, 2:07:49 AM9/20/16
to 2Performant Developers RO
salut,

3 probleme - nu functioneaza composer (gasit un hack),  da eroare de SSL(gasit un hack) si apoi da eroare...


In primul rand nu functioneaza composer - 
php composer.phar require 2performant/2performant-php


  [InvalidArgumentException]
  Could not find package 2performant/2performant-php at any version for your
  minimum-stability (stable). Check the package spelling or your minimum-stab
  ility


require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...


apoi - am instalat guzzlehttp cu composer si am facut urmatorul php 

<?php

require 'vendor/autoload.php';
require 'TPerformant/API/Api.php';
require 'TPerformant/API/HTTP/AuthInterface.php';
require 'TPerformant/API/HTTP/User.php';
require 'TPerformant/API/HTTP/Advertiser.php';
require 'TPerformant/API/HTTP/ApiResponse.php';


use TPerformant\API\HTTP\Advertiser;



$me = new Advertiser('2pa...@libris.ro', 'libris'); // fill in with your own credentials

$commissions = $me->getCommissions();

 

?>


imi da eroare de ssl
atal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 60: SSL certificate problem: self signed certificate in certificate chain (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in P:\wamp55\www\aff2pcom\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 187
( ! ) GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: self signed certificate in certificate chain (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in P:\wamp55\www\aff2pcom\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line187


ok - pun 'verify' => false in Api.php la linia 47.

acum da eroare la  Fatal error: Call to undefined method stdClass::getRole() in P:\wamp55\www\aff2pcom\TPerformant\API\HTTP\User.php on line 61


voi cum ati facut sa puteti citi comisioanele de advertiser?




Alexandru-Emil Lupu

unread,
Sep 20, 2016, 2:20:43 AM9/20/16
to 2performant-...@googlegroups.com
Salut!

Vezi ca tocmai ai dat parola de la cont pe internet...

A

--
You received this message because you are subscribed to the Google Groups "2Performant Developers RO" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2performant-develo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adrian Zamfira

unread,
Sep 20, 2016, 2:28:21 AM9/20/16
to 2Performant Developers RO
mersi!! 

am schimbat.

era mare frustrarea ca nu merge...

anyhow - se poate inchide threadul.

trebuie pus in composer.json 

{
 "minimum-stability": "dev"
}

si apoi verify-false in api.php la optiunile de httpclient.

momentan pare sa mearga.


Tudor Sandu

unread,
Sep 20, 2016, 3:09:46 AM9/20/16
to 2performant-...@googlegroups.com
Salut!

Nu recomand sa nu verifici certificatul SSL. Devii susceptibil la atacuri. Iti recomand, ca alternativa, un mic update pe serverul pe care ruleaza scriptul tau.



Toate bune!

_____________

Tudor Sandu
tm.s...@gmail.com
tudorsandu.ro
0721.49.44.55

--
You received this message because you are subscribed to the Google Groups "2Performant Developers RO" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 2performant-developers-ro+unsub...@googlegroups.com.

Bampiru

unread,
Jan 14, 2017, 3:47:30 PM1/14/17
to 2Performant Developers RO
Buna,

1) "minimum-stability":"dev" in composer.json
2) solutia de aici a mers pentru mine:

  1. download and extract for cacert.pem here (a clean file format/data)

    https://gist.github.com/VersatilityWerks/5719158/download

  2. put it in :

    C:\xampp\php\extras\ssl\cacert.pem

  3. Add this line to your php.ini

    curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem"

  4. restart your webserver/apache


Succes.
Reply all
Reply to author
Forward
0 new messages