[GH-ISSUE #143] EstPos Response undefined index ERRORCODE on success #72

Closed
opened 2026-03-03 15:42:41 +03:00 by kerem · 2 comments
Owner

Originally created by @lansas on GitHub (Jun 22, 2023).
Original GitHub issue: https://github.com/mewebstudio/pos/issues/143

EstPos class ında mapStatusResponse fonksiyonu dahil bir çok response fonksiyonda


//$result['auth_code']      = $rawResponseData['Extra']['AUTH_CODE'];
$result['auth_code']      = $rawResponseData['Extra']['AUTH_CODE'] ?? null;

//'error_code'       => $responseData['Extra']['ERRORCODE'],
'error_code'       => $responseData['Extra']['ERRORCODE'] ?? null,
   
   

gibi satırlar isset kontrolü gerektiriyor. Çünkü her banka ERRORCODE elementini; error oluşmadığı sürece hiç array da tanımlayıp göndermiyor. Örnek: Card Plus KKTC kredi kartları.

Originally created by @lansas on GitHub (Jun 22, 2023). Original GitHub issue: https://github.com/mewebstudio/pos/issues/143 EstPos class ında mapStatusResponse fonksiyonu dahil bir çok response fonksiyonda ``` //$result['auth_code'] = $rawResponseData['Extra']['AUTH_CODE']; $result['auth_code'] = $rawResponseData['Extra']['AUTH_CODE'] ?? null; //'error_code' => $responseData['Extra']['ERRORCODE'], 'error_code' => $responseData['Extra']['ERRORCODE'] ?? null, ``` gibi satırlar isset kontrolü gerektiriyor. Çünkü her banka ERRORCODE elementini; error oluşmadığı sürece hiç array da tanımlayıp göndermiyor. Örnek: Card Plus KKTC kredi kartları.
kerem closed this issue 2026-03-03 15:42:42 +03:00
Author
Owner

@nuryagdym commented on GitHub (Jun 22, 2023):

Merhabalar,
bunlara bakarim, duzeltmeleri yaparim.
her bir input icin isset kontolu yapilmasina karsiyim, hepsine isset ekleyince hangileri basarili durumda gelmesi gerekiyor, hangisi gelmemesi gerekiyor anlasilmiyor.

Kod icinde normalde bu durum genelde su sekilde ele aliniyor: https://github.com/mewebstudio/pos/blob/master/src/DataMapper/ResponseDataMapper/EstPosResponseDataMapper.php#L316

<!-- gh-comment-id:1602172251 --> @nuryagdym commented on GitHub (Jun 22, 2023): Merhabalar, bunlara bakarim, duzeltmeleri yaparim. her bir input icin isset kontolu yapilmasina karsiyim, hepsine isset ekleyince hangileri basarili durumda gelmesi gerekiyor, hangisi gelmemesi gerekiyor anlasilmiyor. Kod icinde normalde bu durum genelde su sekilde ele aliniyor: https://github.com/mewebstudio/pos/blob/master/src/DataMapper/ResponseDataMapper/EstPosResponseDataMapper.php#L316
Author
Owner

@nuryagdym commented on GitHub (Jun 24, 2023):

Merhabalar,

$rawResponseData['Extra']['AUTH_CODE']

satiri kodda bulamadim

<!-- gh-comment-id:1605326791 --> @nuryagdym commented on GitHub (Jun 24, 2023): Merhabalar, `$rawResponseData['Extra']['AUTH_CODE']` satiri kodda bulamadim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pos#72
No description provided.