Il some race conditions there is a problem with php lib, for example when stancer server returns that sort of data:
{
"amount": 100,
"auth": null,
"capture": true,
"country": "FR",
"created": 1681876445,
"currency": "eur",
"date_bank": 1681855200,
"date_paym": 1681768800,
"description": null,
"fee": 2,
"id": "paym_sqxxxxxxxxxxxxxxxxxxx",
"method": "card",
"order_id": null,
"response": "00",
"status": "captured",
"unique_id": "xxxxxxxxxxx"
},
Then, if i call $payment->getCustomer() result is "Stancer\Exceptions\Exception exception occurs : Missing card details" but the documentation says that function will return Stancer\Customer or null