Conversation
nuryagdym
force-pushed
the
v2
branch
4 times, most recently
from
August 29, 2025 14:53
7ff0baf to
b697767
Compare
Don't parse HTML to array and just return as it is. Parsing may cause issues in the future.
Don't parse HTML to array and just return as it is. Parsing may cause issues in the future.
$paymentModel = PosInterface::MODEL_3D_SECURE; $paymentModel = PosInterface::MODEL_NON_SECURE;
$postParameters = $request->request;
The method exposed raw config internals and is not part of PosInterface. No callers exist outside of tests. Removed the method and the corresponding assertions in every gateway unit test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g 3dform data. also fixed broken functional tests
…nfig Exposes PSR-18 client injection in PosFactory::createPosGateway() so callers can pass a pre-configured client (e.g. with verify_peer/verify_host disabled for bank test endpoints with self-signed certs). Also adds functional-test composer scripts for convenience. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… 8.5 compatibility assert() is a no-op when zend.assertions is disabled, causing a TypeError on return type mismatch instead of the expected AssertionError on PHP 8.5. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ThreeDSessionId is now appended to the base gateway URL inside ToslaPosRequestDataMapper::create3DFormData(), matching the pattern used by PayTrPos. The get3DGatewayURL() override in ToslaPos is removed and get3DFormData() passes the plain base URL to the mapper. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Delete the 7 no-op prepare*() hook methods from AbstractRequestDataMapper and clean up all 16 concrete mappers: - No-op callers removed (prepareStatusOrder, prepareCancelOrder, etc.) - Single-use methods inlined into their one caller and deleted - Multi-use methods kept as private helpers renamed to applyPaymentDefaults() (and applyStatusDefaults() / applyCancelDefaults() for GarantiPos) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
nuryagdym
force-pushed
the
v2
branch
3 times, most recently
from
July 6, 2026 14:45
b025d7b to
2118b3f
Compare
BREAKING CHANGE: The reason is we don't want to overcrowd PosInterface, because we also added QUERY_TYPE_INSTALLMENT_RATES, QUERY_TYPE_INSTALLMENT_PRICES and QUERY_TYPE_BIN_LIST queries. `history()` and `customQuery()` moved to `PosQueryInterface` `PosInterface::history()` and `PosInterface::customQuery()` have been **removed**. Non-order-related queries are now handled by a separate `PosQueryInterface` obtained from `PosQueryFactory::create()`. #### Constant renames | Old constant | New constant | |---|---| | `PosInterface::TX_TYPE_HISTORY` | `PosQueryInterface::QUERY_TYPE_HISTORY` | | `PosInterface::TX_TYPE_CUSTOM_QUERY` | `PosQueryInterface::QUERY_TYPE_CUSTOM_QUERY` |
BREAKING CHANGE posfactory creates pos gateway classes, create method does not need a descriptive name. also create() is follows the convention we use in this library.
… config PosFactory::create() and PosQueryFactory::create() previously received the entire multi-bank config array and performed an internal lookup via $posAccount->getBankName(). Since the account already carries the bank name the lookup was redundant. Callers now extract the slice themselves: $config['banks'][$account->getBankName()] GatewayConfigNotFoundException is removed — it was only ever thrown during the bank-name lookup that no longer exists. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- old ones were either renamed or removed
# Conflicts: # examples/_common-codes/_3d_form.php
nuryagdym
marked this pull request as ready for review
July 9, 2026 12:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minimum PHP sürümü 8.0'a yükseltildi.
symfony/http-foundationbağımlılığı kaldırıldı.Geçiş adımları için UPGRADE-v2.md dosyasına bakınız.
Yeni Gateway'ler
ParamPos'un 3DHost ödeme akışı ayrı bir gateway'e taşındı;Yeni Özellik: PosQuery
PosQueryInterface(src/PosQuery/PosQueryInterface.php) eklendi.Sipariş ile ilişkili olmayan banka sorguları ayrı bir arayüze taşındı:
genel işlem geçmişi (
history), ham API çağrıları (customQuery).QUERY_TYPE_INSTALLMENT_RATESveQUERY_TYPE_INSTALLMENT_PRICES— yeni sorgu tipleri.Bkz. INSTALLMENT-RATES-PRICES-EXAMPLE.md.
getInstallmentRates(array $params): verilen BIN için taksit oranlarını döndürür.getInstallmentPrices(array $params): verilen BIN ve tutar için her taksitte ödenecek hesaplanmış tutarları döndürür.QUERY_TYPE_BIN_LIST— yeni sorgu tipi.getBinList(array $params): verilen BIN numarasına ait kart bilgilerini sorgular. Bkz. BIN-LIST-EXAMPLE.md.PosQueryRequestDataPreparedEvent—PosQueryisteklerinde API verisini değiştirmeye olanak tanıyan yeni event.Kırıcı Değişiklikler
PosInterface::TX_TYPE_HISTORYveTX_TYPE_CUSTOM_QUERYkaldırıldı.Bu sabitler ve ilgili
history()/customQuery()metotlarıPosQueryInterface'e taşındı; (bkz. UPGRADE-v2.md).payment(),cancel(),refund(),status()ve diğer tüm işlem metotları artık doğrudanarraydöndürüyor;getResponse()çağrısına gerek kalmadı.make3DPayment()ve benzeri metotlar artık SymfonyRequestnesnesi değil,düz PHP dizisi (
$_POST/$_GET) kabul ediyor.PosFactory::createPosGateway()→PosFactory::create()olarak yeniden adlandırıldı.AccountFactory—$langve$modelparametreleri kaldırıldı.Dil artık
gateway_configs.langconfig anahtarıyla ayarlanıyor.get3DFormData()—$createWithoutCardvarsayılanıtrue'danfalse'a değişti.$orderdizisiyle geçiliyor.KuveytPos için alıcı bilgisi (
buyer), adres ve sepet içeriği gibi ekstra alanlar v1'deRequestDataPreparedEventlistener'ı içinde ekleniyordu.v2'de bu veriler doğrudan
$orderdizisine dahil ediliyor.get3DFormData()artık HTML string döndürüyor.setTestMode()kaldırıldı. Test modu artıkgateway_configs.test_modeconfig anahtarıyla ayarlanıyor.status_detailresponse alanı kaldırıldı. 3D ödeme response'larındanmd_status_detailda kaldırıldı.currenciesanahtarı kaldırıldı. v1'de config dosyasına üst düzeycurrenciesanahtarı eklenerek para birimi eşleştirmeleri özelleştirilebiliyordu.nameanahtarı kaldırıldı. Banka config dosyalarındaki (pos_test.php,pos_production.php)nameanahtarı hiçbir zaman kodda kullanılmıyordu ve kaldırıldı.ParamPosyapılandırmasındanpayment_api_2vegateway_3d_hostanahtarları kaldırıldı;3DHost akışı artık ayrı
Param3DHostPosgateway'i üzerinden yürütülüyor.KuveytPos,VakifKatilimPosvePayFlexCPV4Posyapılandırmalarındangateway_3danahtarı kaldırıldı (gateway tarafından dahili olarak türetiliyor);PayFlexCPV4Posiçinpayment_apiURL'i de kısaltıldı.Gateways→Gateway,Exceptions→Exception,Entity→Model;EstPos/EstV3Pos→AssecoPos,PosNet→PosNetPosve ilgili account/factory isimleri güncellendi.AbstractPosAccountmetot yeniden adlandırmaları:getBank()→getBankName(),getClientId()→getMerchantId(),getStoreKey()→getSecretKey(),getLang()kaldırıldı.BankClassNullException→GatewayClassNotConfiguredException.BankNotFoundExceptionkaldırıldı.Gateway'e Özel Davranış Değişiklikleri
salegönderiliyordu;Yeni Özellikler
AccountFactory::createForGateway()— gateway sınıfı ve kimlik bilgilerinin düz bir dizi olarak geçilmesiyle account oluşturmayı sağlar;framework entegrasyonlarında kullanışlıdır.
PosExceptionmarker interface — kütüphaneden fırlatılan tüm exception'lar bu interface'i implement ediyor;tek catch bloğuyla tüm kütüphane hatalarını yakalamak mümkün.
AbstractGateway::getCrypt()— gateway'in dahili crypt nesnesine erişim için yeni public metot; özel sorgu (customQuery) imzalamada kullanışlıdır.get3DFormData()— yeni$formFormatparametresi —FORM_FORMAT_ARRAYveyaFORM_FORMAT_HTMLseçeneklerinden biri belirtilebilir.