mrjavaci / paytr
PayTr ödeme sistemi
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 15
pkg:composer/mrjavaci/paytr
Requires
- php: >=7.1.3
- ext-json: *
- symfony/http-client: ^4.0|^5.0|^6.0
- symfony/http-foundation: ^4.0|^5.0|^6.0
This package is auto-updated.
Last update: 2025-11-04 19:14:04 UTC
README
Kurulum:
composer require mrjavaci/paytr
Örnek kullanım, example dizini içerisindedir.
$payment = new Mews\PayTr\Payment( require __DIR__ . '/../config/paytr.php' );
ile oluşturulan nesnede varsayılan ayarlar kullanılır. Bu ayarlar config/paytr.php içerisindedir.
Buradaki ayarları projenizdeki PayTR hesabınıza uygun şekilde güncellemeniz gerekmektedir.
İstenirse farklı ayarlarla nesneyi oluşturabilirsiniz. Örnek:
$payment = new Mews\PayTr\Payment([ 'apiUrl' => 'https://www.paytr.com/odeme/api/get-token', 'merchantId' => 'XXXXXX', 'merchantKey' => 'XXXXXXXXXXXX', 'merchantSalt' => 'XXXXXXXXXXXX', 'successUrl' => 'https://paytr.test/example/index.php?status=success', 'failUrl' => 'https://paytr.test/example/index.php?status=fail', ]);
veya
$payment = new Mews\PayTr\Payment(); $payment->setConfig(new Mews\PayTr\Config([ 'apiUrl' => 'https://www.paytr.com/odeme/api/get-token', 'merchantId' => 'XXXXXX', 'merchantKey' => 'XXXXXXXXXXXX', 'merchantSalt' => 'XXXXXXXXXXXX', 'successUrl' => 'https://paytr.test/example/index.php?status=success', 'failUrl' => 'https://paytr.test/example/index.php?status=fail', ]));
exampledizini içerisindekiindex.phpvepayment.phpödeme işlemleri için örnektir.callback.phpise, ödeme sonrası PayTR' den gelecek ödeme sonucunu işleyen kısımdır.