mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-02-15 14:10:10 +01:00
GO: Improve error output, add info to settings
This commit is contained in:
parent
afab111c75
commit
16bf511783
@ -16,7 +16,7 @@ class GoApi {
|
||||
|
||||
protected string $baseUrl;
|
||||
|
||||
public function __construct(protected string $username, protected string $password, bool $testMode) {
|
||||
public function __construct(protected string $username, protected string $password, bool $testMode = true) {
|
||||
if ($testMode)
|
||||
$this->baseUrl = self::BASE_URL_TEST;
|
||||
else
|
||||
@ -49,6 +49,10 @@ class GoApi {
|
||||
$ret->barcodes = array_map(function ($item) { return $item->barcode; }, $response->package);
|
||||
return $ret;
|
||||
}
|
||||
return $response->message;
|
||||
if (isset($response->message))
|
||||
return $response->message;
|
||||
if (isset($response->Message))
|
||||
return $response->Message;
|
||||
return print_r($response, TRUE);
|
||||
}
|
||||
}
|
@ -55,7 +55,7 @@ class Versandart_go extends Versanddienstleister
|
||||
'consignorHouseNumber' => ['typ' => 'text', 'bezeichnung' => 'Absender Hausnummer:'],
|
||||
'consignorZipCode' => ['typ' => 'text', 'bezeichnung' => 'Absender PLZ:'],
|
||||
'consignorCity' => ['typ' => 'text', 'bezeichnung' => 'Absender Stadt:'],
|
||||
'consignorCountry' => ['typ' => 'text', 'bezeichnung' => 'Absender Land:'],
|
||||
'consignorCountry' => ['typ' => 'text', 'bezeichnung' => 'Absender Land:', 'info' => '2-Letter-Code (z.B. \'DE\')'],
|
||||
'consignorPhoneNumber' => ['typ' => 'text', 'bezeichnung' => 'Absender Telefon:'],
|
||||
'consignorRemarks' => ['typ' => 'text', 'bezeichnung' => 'Absender Bemerkungen:'],
|
||||
'consignorEmail' => ['typ' => 'text', 'bezeichnung' => 'Absender Email:'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user