Turkcell Paycell SDK gateway for Omnipay payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 8.1.x. This package implements Turkcell Paycell SDK support for Omnipay.
- Please review Paycell SDK Documentation before starting integration
- Check "Service Access and General Information" section for critical integration points
- This package uses RESTful JSON service examples
- For integration support: paycelldev@paycell.com.tr
composer require league/omnipay yasinkuyu/omnipay-paycell-sdkRequired additional dependencies:
composer require php-http/curl-client guzzlehttp/psr7 php-http/messageTo enable test mode, set the following in your initialization:
$gateway->setTestMode(true); // For test environment
$gateway->setTestMode(false); // For production environmentTest mode uses different endpoints and credentials:
- Test URL: https://websdktest.turkcell.com.tr
- Production URL: https://paycellsdk.paycell.com.tr
- Application name: PAYCELLTEST
- Application password: PaycellTestPassword
- Secure code: PAYCELL12345
- Eulaid: 17
- Merchant Code: 9998
- Terminal Code: [Get from Paycell]
- Navigate to example directory:
cd /YOUR-COMPOSER-PATH/vendor/yasinkuyu/omnipay-paycell-sdk/example-
Copy
init.php.exampletoinit.php -
Start test server:
php -S localhost:8000- Open test page in browser:
http://localhost:8000/purchase.php
use Omnipay\Omnipay;
$gateway = Omnipay::create('PaycellSDK');
$gateway->setTestMode(true); // Enable test mode
$gateway->setApplicationName('PAYCELLTEST');
$gateway->setApplicationPwd('PaycellTestPassword');
$gateway->setSecureCode('PAYCELL12345');
$gateway->setEulaID(17);
$gateway->setMerchantCode(9998);
$gateway->setTerminalCode('XXXXXXXXX');$transactionDateTime = date('YmdHis') . substr(microtime(), 2, 3);
$gateway->setReferenceNumber($transactionDateTime);
$gateway->setHostAccount("customer@email.com");
$gateway->setPaymentSecurity("NON_THREED_SECURE"); // or "THREED_SECURE"
$gateway->setLanguage("tr");
$response = $gateway->purchase([
'amount' => '10.00',
'currency' => 'TRY',
])->send();
if ($response->isSuccessful()) {
echo "Payment successful!";
// Get tracking URL for redirect
$trackingUrl = $response->getTrackingUrl();
}$response = $gateway->query([
'originalPaymentReferenceNumber' => $paymentReferenceNumber,
])->send();
if ($response->isSuccessful()) {
echo "Transaction status: " . $response->getMessage();
}$response = $gateway->refund([
'amount' => '10.00',
'currency' => 'TRY',
'originalPaymentReferenceNumber' => $paymentReferenceNumber,
])->send();$response = $gateway->reverse([
'originalPaymentReferenceNumber' => $paymentReferenceNumber,
])->send();- Purchase (Regular and 3D Secure)
- Query Transaction Status
- Refund
- Reverse (Cancel)
For test credit cards, visit: https://paycell.com.tr/test-kredi-kartlari
- PHP >= 8.1.0
- Composer
- PHP cURL extension
- For general questions, use Stack Overflow with the
omnipaytag - Report bugs via GitHub Issues
- Technical support: paycelldev@paycell.com.tr
For detailed integration information and API documentation, please visit Paycell SDK Documentation.
The MIT License (MIT). Please see License File for more information.
- Omnipay: NestPay (EST / Payten) — İş Bankası, Akbank, Halkbank, Ziraat, TEB, QNB, ING, Şekerbank, Anadolubank virtual POS; 3D Pay Hosting
- Omnipay: GVP (Garanti BBVA) — Garanti BBVA virtual POS; hosted payment page
- Omnipay: Akbank — Akbank virtual POS (new platform); hosted payment page
- Omnipay: QNB — QNB virtual POS (PayFor); hosted payment page
- Omnipay: Paratika — Paratika, VakıfPayS and ZiraatPay hosted payment page
- Omnipay: Paycell API — Turkcell Paycell payment API
- Omnipay: iyzico — iyzico checkout form
- Omnipay: PayTR — PayTR virtual POS
- Omnipay: Posnet — Yapı Kredi Posnet virtual POS