[GH-ISSUE #185] estpost create3DPaymentRequestData extra data ekleme #102

Closed
opened 2026-03-03 15:43:01 +03:00 by kerem · 1 comment
Owner

Originally created by @sekizlipenguen on GitHub (Feb 27, 2024).
Original GitHub issue: https://github.com/mewebstudio/pos/issues/185

Information Description
Kütüphane versiyonu 0.16.1
Gateway ismi EstPos
Banka ismi iş bankası

Sorunuz

Selam, create3DPaymentRequestData fonksiyonunda order parametresi içine extra alanı ekleyebilirsek bu alan dolu olduğunda şu şekilde bi ekleme olabilirse sevinirim. İş bankası mesela bazı ek parametreler istiyor bu sayede farklı işlemler yapıyorlar.

Örnek ben Bolum diye bir alan göndermem gerekiyor bu sebep ile böyle bir şey yaptım.

if ($order->extra) {
    $requestData['Extra'] = $order->extra;
}
public function create3DPaymentRequestData(AbstractPosAccount $account, $order, string $txType, array $responseData): array
    {
        $requestData = $this->getRequestAccountData($account) + [
                'Type' => $this->mapTxType($txType),
                'IPAddress' => (string)($order->ip ?? ''),
                'Email' => (string)$order->email,
                'OrderId' => (string)$order->id,
                'UserId' => (string)($order->user_id ?? ''),
                'Total' => (string)$order->amount,
                'Currency' => $this->mapCurrency($order->currency),
                'Taksit' => $this->mapInstallment($order->installment),
                'Number' => $responseData['md'],
                'PayerTxnId' => $responseData['xid'],
                'PayerSecurityLevel' => $responseData['eci'],
                'PayerAuthenticationCode' => $responseData['cavv'],
                'Mode' => 'P',
            ];

        if ($order->extra) {
            $requestData['Extra'] = $order->extra;
        }

        if ($order->name) {
            $requestData['BillTo'] = [
                'Name' => (string)$order->name,
            ];
        }

        /**
         * IMECE kartlar isbankin tarima destek icin ozel kampanyalari olan kartlardir.
         * IMECE kart ile odeme yapabilmek icin MODEL_3D_SECURE odemede alttaki 2 alan gonderilmesi gerkeiyor.
         * https://www.isbank.com.tr/is-ticari/imece-kart
         */
        if (isset($order->is_imece_card) && true === $order->is_imece_card) {
            $requestData['Extra']['IMCKOD'] = 'İmece Ürün Bilgisi';
            $requestData['Extra']['FDONEM'] = 'Faizsiz Dönem Bilgisi';
        }

        if (isset($order->recurringFrequency)) {
            $requestData += $this->getRecurringRequestOrderData($order);
        }

        return $requestData;
    }

Göndermeden önce kontroller

  • Bu konuda zaten bir hata bildirimi olmadığından emin olun. Bakınız: hata bildirimleri
  • Dökümantasyonu okudum, araştırdım ve konuyla ilgili bilgileri bulamadım. dökümantasyon
  • İlgili örnek kodları kontrol ettim ve konuyla ilgili bilgileri bulamadım. örnek kodlar
Originally created by @sekizlipenguen on GitHub (Feb 27, 2024). Original GitHub issue: https://github.com/mewebstudio/pos/issues/185 | Information | Description | |--------------|---------| | Kütüphane versiyonu | 0.16.1 | | Gateway ismi| EstPos | | Banka ismi| iş bankası | ## Sorunuz Selam, create3DPaymentRequestData fonksiyonunda order parametresi içine extra alanı ekleyebilirsek bu alan dolu olduğunda şu şekilde bi ekleme olabilirse sevinirim. İş bankası mesela bazı ek parametreler istiyor bu sayede farklı işlemler yapıyorlar. Örnek ben Bolum diye bir alan göndermem gerekiyor bu sebep ile böyle bir şey yaptım. ``` if ($order->extra) { $requestData['Extra'] = $order->extra; } ``` ``` public function create3DPaymentRequestData(AbstractPosAccount $account, $order, string $txType, array $responseData): array { $requestData = $this->getRequestAccountData($account) + [ 'Type' => $this->mapTxType($txType), 'IPAddress' => (string)($order->ip ?? ''), 'Email' => (string)$order->email, 'OrderId' => (string)$order->id, 'UserId' => (string)($order->user_id ?? ''), 'Total' => (string)$order->amount, 'Currency' => $this->mapCurrency($order->currency), 'Taksit' => $this->mapInstallment($order->installment), 'Number' => $responseData['md'], 'PayerTxnId' => $responseData['xid'], 'PayerSecurityLevel' => $responseData['eci'], 'PayerAuthenticationCode' => $responseData['cavv'], 'Mode' => 'P', ]; if ($order->extra) { $requestData['Extra'] = $order->extra; } if ($order->name) { $requestData['BillTo'] = [ 'Name' => (string)$order->name, ]; } /** * IMECE kartlar isbankin tarima destek icin ozel kampanyalari olan kartlardir. * IMECE kart ile odeme yapabilmek icin MODEL_3D_SECURE odemede alttaki 2 alan gonderilmesi gerkeiyor. * https://www.isbank.com.tr/is-ticari/imece-kart */ if (isset($order->is_imece_card) && true === $order->is_imece_card) { $requestData['Extra']['IMCKOD'] = 'İmece Ürün Bilgisi'; $requestData['Extra']['FDONEM'] = 'Faizsiz Dönem Bilgisi'; } if (isset($order->recurringFrequency)) { $requestData += $this->getRecurringRequestOrderData($order); } return $requestData; } ``` ## Göndermeden önce kontroller * [ ] Bu konuda zaten bir hata bildirimi olmadığından emin olun. Bakınız: [hata bildirimleri](https://github.com/mewebstudio/pos/issues) * [ ] Dökümantasyonu okudum, araştırdım ve konuyla ilgili bilgileri bulamadım. [dökümantasyon](https://github.com/mewebstudio/pos/blob/master/README.md) * [ ] İlgili örnek kodları kontrol ettim ve konuyla ilgili bilgileri bulamadım. [örnek kodlar](https://github.com/mewebstudio/pos/tree/master/examples)
kerem 2026-03-03 15:43:01 +03:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@nuryagdym commented on GitHub (Feb 27, 2024):

duplicate of https://github.com/mewebstudio/pos/issues/178

v1 ile bu ozellik eklenecek.

<!-- gh-comment-id:1966321924 --> @nuryagdym commented on GitHub (Feb 27, 2024): duplicate of https://github.com/mewebstudio/pos/issues/178 v1 ile bu ozellik eklenecek.
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#102
No description provided.