Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] [API] [SOAP] Aftermarket - połączenie
Miky
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 16.07.2011

Ostrzeżenie: (0%)
-----


Czy ktoś działał coś może z API Aftermarket i ma pomysł dlaczego poniższy przykładowy kod z dokumentacji mimo podania prawidłowego adresu email i hasła użytkownika zwraca błąd "Authorization Required"?
  1. try
  2. {
  3. $AFT = new SoapClient("https://am-soap.com:4192/service.php?class=AfterMarket&wsdl",
  4. array("exceptions" => "true", "cache_wsdl" => WSDL_CACHE_MEMORY));
  5. $email = "someuser@email.com";
  6. $password = "somepassword";
  7. $key = $AFT->login($email, $password, "pl");
  8. $balance = $AFT->getMyBalance($email, $key);
  9. echo "<p>Account balance is: " . $balance . "<p>\n";
  10. $AFT->logout($email, $key);
  11. }
  12. catch(Exception $e)
  13. {
  14. echo "<p>An error occured: " . $e->getMessage() . "</p>\n";
  15. }


Ten post edytował Miky 19.03.2013, 11:02:49
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Miky
post
Post #2





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 16.07.2011

Ostrzeżenie: (0%)
-----


Hasło sprawdzałem wielokrotnie, stworzyłem nawet dodatkowe konta dla sprawdzenia... i nic.
Aczkolwiek komunikat przy wpisaniu całkiem bzdurnych danych logowania jest taki sam.

Kombinowałem z różnymi metodami logowania wg. innych skryptów API ale nic nie działa.

Problemem tu jest, że email i hasło wykorzystywane są do stworzenia klucza, który potem zastępuje hasło i daje dostęp w parze z emailem (w sumie bez sensu bo to hasło i tak trzeba żywcem wklepać w api)

All API functions require two parameters: "email" and "key". The first one is the email of the user making the request. The user must be registered on the AfterMarket.pl website. (...) The second parameter is the authorization key. It can be created by calling the login() function, which requires user email and password. Upon successful execution, it returns the authorization key to be used in subsequent requests.

Ten post edytował Miky 19.03.2013, 15:57:15
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 8.10.2025 - 06:42