sveawebpay / php-integration

SDK for Sveas payment methods (standalone and Svea Checkout)
Other
15 stars 19 forks source link

Problem with response #103

Open arturmudrytskyi opened 2 years ago

arturmudrytskyi commented 2 years ago

There is an issue when server sends a response with empty $order->Customer->IndividualIdentity object.

[Customer] => stdClass Object
 (
     [CoAddress] => c/o Eriksson, Erik
     [CountryCode] => SE
     [CustomerType] => Individual
     [Email] =>
     [FullName] => Persson, Tess T
     [HouseNumber] =>

     [IndividualIdentity] => null

    [Locality] => Stan
    [NationalIdNumber] => 194605092222
    [PhoneNumber] =>
    [PublicKey] =>
    [Street] => Testgatan 1
    [ZipCode] => 99999
)

Error when IndividualIdentity is null. There is an error when trying set data in the methods: $this->customer->setInitials and $this->customer->setName in the files: src/AdminService/AdminServiceResponse/GetAccountCreditsResponse.php src/AdminService/AdminServiceResponse/GetOrdersResponse.php