[GH-ISSUE #101] Yapıkredi Bankası "Payment" Aşamasında E189 "Xid hatalı." Hatası #50

Closed
opened 2026-03-03 15:42:29 +03:00 by kerem · 6 comments
Owner

Originally created by @yorulmazsinan on GitHub (Nov 16, 2022).
Original GitHub issue: https://github.com/mewebstudio/pos/issues/101

Merhabalar, YKB posunu kullanırken şöyle bir hata alıyorum:

Error {#1613 ▼
#message: "Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]])"
#code: 0
#file: "/home/eceo/public_html/app/Mews/src/Gateways/PosNet.php"
#line: 196
trace: {▼
/home/eceo/public_html/app/Mews/src/Gateways/PosNet.php:196 {▼
Mews\Pos\Gateways\PosNet->get3DFormData(): array …
› \t$this->logger->log(LogLevel::ERROR, 'enrollment fail response', $data);
› \tthrow new Exception($data['respText'], $data['respCode']);
› }
arguments: {▼
$message: "Xid hatalı."
$code: "E189"
}
}
}
}

Originally created by @yorulmazsinan on GitHub (Nov 16, 2022). Original GitHub issue: https://github.com/mewebstudio/pos/issues/101 Merhabalar, YKB posunu kullanırken şöyle bir hata alıyorum: Error {#1613 ▼ #message: "Wrong parameters for Exception([string $message [, long $code [, Throwable $previous = NULL]]])" #code: 0 #file: "/home/eceo/public_html/app/Mews/src/Gateways/PosNet.php" #line: 196 trace: {▼ /home/eceo/public_html/app/Mews/src/Gateways/PosNet.php:196 {▼ Mews\Pos\Gateways\PosNet->get3DFormData(): array … › \t$this->logger->log(LogLevel::ERROR, 'enrollment fail response', $data); › \tthrow new Exception($data['respText'], $data['respCode']); › } arguments: {▼ $message: "Xid hatalı." $code: "E189" } } } }
kerem 2026-03-03 15:42:29 +03:00
  • closed this issue
  • added the
    bug
    posnet
    labels
Author
Owner

@nuryagdym commented on GitHub (Nov 16, 2022):

Merhabalar, tahminim test edilen kart Yapikrediye ait degil veya o kartta 3D etkin degil.

Yine de bu hatayi duzgun vermesi icin kodu guncellerim

<!-- gh-comment-id:1317518736 --> @nuryagdym commented on GitHub (Nov 16, 2022): Merhabalar, tahminim test edilen kart Yapikrediye ait degil veya o kartta 3D etkin degil. Yine de bu hatayi duzgun vermesi icin kodu guncellerim
Author
Owner

@yorulmazsinan commented on GitHub (Nov 16, 2022):

Böyle bir durumda NON_SECURE olarak mı ödeme almamız gerekiyor? Kart Yapıkredi onda bir sorun yok. 3D etkin olmaması nasıl oluyor? Ödemelere açık kart, internet alışverişi yapılıyor.

<!-- gh-comment-id:1317534526 --> @yorulmazsinan commented on GitHub (Nov 16, 2022): Böyle bir durumda NON_SECURE olarak mı ödeme almamız gerekiyor? Kart Yapıkredi onda bir sorun yok. 3D etkin olmaması nasıl oluyor? Ödemelere açık kart, internet alışverişi yapılıyor.
Author
Owner

@nuryagdym commented on GitHub (Nov 16, 2022):

hmm, kartta degil sanirim, Account objesi olustururken hangi modeli kullaniyorsunuz? MODEL_3D_SECURE mi?

"Xid hatalı." mesajdaki Xid siparis ID olmasi lazim. gonderdiginiz siparis ID'yi paylasabilir misiniz.

<!-- gh-comment-id:1317545876 --> @nuryagdym commented on GitHub (Nov 16, 2022): hmm, kartta degil sanirim, Account objesi olustururken hangi modeli kullaniyorsunuz? MODEL_3D_SECURE mi? "Xid hatalı." mesajdaki Xid siparis ID olmasi lazim. gonderdiginiz siparis ID'yi paylasabilir misiniz.
Author
Owner

@yorulmazsinan commented on GitHub (Nov 16, 2022):

		$order = [
					    'id'                    => uniqid(time()),
					    'amount'                => floatval($manuelposTotalPrice),
					    'currency'              => 'TRY',
					    'installment'           => intval($request->installment),
					    'success_url'           => route('control-panel.manuelpos.payment-status'),
					    'fail_url'              => route('control-panel.manuelpos.payment-status'),
					    'ip'                    => getIp(),
					    'email'                 => $request->customer_email,
					    'name'                  => $request->customer_name_surname,
					    'rand'                  => md5(uniqid(time())),
					    'lang'                  => AbstractGateway::LANG_TR,
					    'card_association'      => checkCardType(str_replace(' ', '', $request->card_number)),
			    ];

Bu oluşturduğum $order değişkeni. $account ise şu şekilde:

		$account = AccountFactory::createPosNetAccount(
				$virtualPos['bank'],
				$virtualPos['merchant_number'],
				$virtualPos['username'],
				$virtualPos['password'],
				$virtualPos['terminal_number'],
				$virtualPos['posnet_id'],
				AbstractGateway::MODEL_3D_SECURE,
				$virtualPos['enc_key']
		);

Bunlar direkt YKB için olan ayarlar.

<!-- gh-comment-id:1317607981 --> @yorulmazsinan commented on GitHub (Nov 16, 2022): $order = [ 'id' => uniqid(time()), 'amount' => floatval($manuelposTotalPrice), 'currency' => 'TRY', 'installment' => intval($request->installment), 'success_url' => route('control-panel.manuelpos.payment-status'), 'fail_url' => route('control-panel.manuelpos.payment-status'), 'ip' => getIp(), 'email' => $request->customer_email, 'name' => $request->customer_name_surname, 'rand' => md5(uniqid(time())), 'lang' => AbstractGateway::LANG_TR, 'card_association' => checkCardType(str_replace(' ', '', $request->card_number)), ]; Bu oluşturduğum $order değişkeni. $account ise şu şekilde: $account = AccountFactory::createPosNetAccount( $virtualPos['bank'], $virtualPos['merchant_number'], $virtualPos['username'], $virtualPos['password'], $virtualPos['terminal_number'], $virtualPos['posnet_id'], AbstractGateway::MODEL_3D_SECURE, $virtualPos['enc_key'] ); Bunlar direkt YKB için olan ayarlar.
Author
Owner

@nuryagdym commented on GitHub (Nov 16, 2022):

order id'yi su sekilde olusturup dener misiniz: substr(uniqid(time()), 0, 20)

cozmezse bu sekilde substr(uniqid(time()), 0, 18)

<!-- gh-comment-id:1317619963 --> @nuryagdym commented on GitHub (Nov 16, 2022): order id'yi su sekilde olusturup dener misiniz: `substr(uniqid(time()), 0, 20)` cozmezse bu sekilde `substr(uniqid(time()), 0, 18)`
Author
Owner

@yorulmazsinan commented on GitHub (Nov 17, 2022):

order id'yi su sekilde olusturup dener misiniz: substr(uniqid(time()), 0, 20)

cozmezse bu sekilde substr(uniqid(time()), 0, 18)

Bu sorunu çözdü, teşekkür ederim.

<!-- gh-comment-id:1318107791 --> @yorulmazsinan commented on GitHub (Nov 17, 2022): > order id'yi su sekilde olusturup dener misiniz: `substr(uniqid(time()), 0, 20)` > > cozmezse bu sekilde `substr(uniqid(time()), 0, 18)` Bu sorunu çözdü, teşekkür ederim.
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#50
No description provided.