Skip to content

Commit

Permalink
Fix toArray
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatisD committed Jan 22, 2021
1 parent d7483ec commit 4b68541
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

USERNAME=testUser123
PASSWORD=testPass123
AUTH=100000001 # test afm not valid
AADE_USERNAME=testUser123
AADE_PASSWORD=testPass123
AADE_AUTH=100000001 # test afm not valid
AFM=100000001 # 9 digits
6 changes: 3 additions & 3 deletions examples/simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
$dotenv = Dotenv::createImmutable(dirname(__DIR__));
$dotenv->load();

$username = $_ENV["USERNAME"]; // username can be obtained from https://www.aade.gr/epiheiriseis/forologikes-ypiresies/mitroo/anazitisi-basikon-stoiheion-mitrooy-epiheiriseon
$password = $_ENV["PASSWORD"]; // password
$authorisedCallerAfm = $_ENV["AUTH"]; // optional if same with the caller's afm but if present must be authorised
$username = $_ENV["AADE_USERNAME"]; // username can be obtained from https://www.aade.gr/epiheiriseis/forologikes-ypiresies/mitroo/anazitisi-basikon-stoiheion-mitrooy-epiheiriseon
$password = $_ENV["AADE_PASSWORD"]; // password
$authorisedCallerAfm = $_ENV["AADE_AUTH"]; // optional if same with the caller's afm but if present must be authorised

$crawler = new AadeAfm($username, $password, $authorisedCallerAfm);
//$data = $crawler->version();
Expand Down
2 changes: 1 addition & 1 deletion src/AadeAfm.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function _request($body)
"Content-Type: text/xml",
"Connection: Close",
];
$response = $this->curlRequest->post($this->uri, $headers, $body)->exec();
$response = $this->curlRequest->post($this->uri, $headers, $body)->exec()->toArray();
if (!empty($response["error"])) {
return $this->errorHandler("Error: ".$response["error"]);
}
Expand Down

0 comments on commit 4b68541

Please sign in to comment.