Git Product home page Git Product logo

laravel-pos's Introduction

Türk bankaları için sanal pos paketi (Laravel)

Temel Paket

mews/pos

Ana başlıklar

Minimum Gereksinimler

  • PHP >= 7.4
  • mews/pos ^1.3
  • laravel 8, 9, 10, 11

Kurulum

  1. $ composer require mews/laravel-pos
    $ php artisan vendor:publish --tag=laravel-pos
  2. /config/laravel-pos.php ayarınızı elinizde gateway bilgileri göre güncelleyiniz. Örnek konfigurasyon:

    <?php
    # /config/laravel-pos.php
    return [
        'banks' => [
            'kuveytpos' => [ # ilk sıradaki banka injection için default olur.
                'gateway_class'     => \Mews\Pos\Gateways\KuveytPos::class,
                'test_mode'         => true,
                'lang'              => \Mews\Pos\PosInterface::LANG_TR,
                'credentials'       => [
                    'payment_model' => \Mews\Pos\PosInterface::MODEL_3D_SECURE,
                    'merchant_id'   => 'xxx',
                    'terminal_id'   => 'yyyyyyy',
                    'user_name'     => 'zzzzzzz',
                    'enc_key'       => 'www123',
                ],
                'gateway_endpoints' => [
                    'payment_api'     => 'https://boatest.kuveytturk.com.tr/boa.virtualpos.services/Home',
                    'gateway_3d'      => 'https://boatest.kuveytturk.com.tr/boa.virtualpos.services/Home/ThreeDModelPayGate',
                    'query_api'       => 'https://boatest.kuveytturk.com.tr/BOA.Integration.WCFService/BOA.Integration.VirtualPos/VirtualPosService.svc?wsdl',
                ],
            ],
            'estpos_payten' => [
                'gateway_class'     => \Mews\Pos\Gateways\EstV3Pos::class,
                'test_mode'         => true,
                'lang'              => \Mews\Pos\PosInterface::LANG_TR,
                'credentials'       => [
                    'payment_model' => \Mews\Pos\PosInterface::MODEL_3D_SECURE,
                    'merchant_id'   => '7001132146464',
                    'user_name'     => 'ISBXXXXX',
                    'user_password' => 'ISBYYYYY',
                    'enc_key'       => 'TRPZZZZZ',
                ],
                'gateway_endpoints' => [
                    'payment_api'     => 'https://entegrasyon.asseco-see.com.tr/fim/api',
                    'gateway_3d'      => 'https://entegrasyon.asseco-see.com.tr/fim/est3Dgate',
                    'gateway_3d_host' => 'https://sanalpos.sanalakpos.com.tr/fim/est3Dgate',
                ],
            ],
        ],
    ];
  3. PHP Session kullanıyorsanız 3D ödemeler için session'i alttaki şekilde konfigure etmeniz gerekir.

    Laravel 11 için environment değişkenleri şu şekilde olacak:

    SESSION_SECURE_COOKIE=true
    SESSION_SAME_SITE=None
    

    Laravel 10, 9, 8 için ise environment'da SESSION_SECURE_COOKIE=true yapılacak ve /config/session.php'de same_site değeri güncellenecek:

    # /config/session.php:
    return [
        // ...
        'same_site' => 'none',
    ]

    Değişikliklerden sonra var olan session'i silip yeni session oluşturunuz.

  4. 3D ödemelerde bankadan websiteye geri redirect edilecek URL'larda (success/fail URL'lar) CSRF kapatılması gerekir.

    Laravel 11 withMiddleware() method'la ayarı yapabilirsiniz.

        <?php
        # /bootstrap/app.php
        
        use Illuminate\Foundation\Application;
        use Illuminate\Foundation\Configuration\Exceptions;
        use Illuminate\Foundation\Configuration\Middleware;
        
        return Application::configure(basePath: dirname(__DIR__))
            // ...
            ->withMiddleware(function (Middleware $middleware) {
                $middleware->validateCsrfTokens(except: [
                    '/single-bank/payment/3d/response'
                ]);
            });

    Laravel 10, 9, 8 ise /app/Http/Middleware/VerifyCsrfToken.php'de ayarlayabilirsiniz.

    <?php
    # /app/Http/Middleware/VerifyCsrfToken.php
    namespace App\Http\Middleware;
    
    use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
    
    class VerifyCsrfToken extends Middleware
    {
        protected $except = [
            // success ve fail URL'lar buraya eklenecek:
            '/single-bank/payment/3d/response',
        ];
    }
  5. KuveytPos için API isteklere ekstra alanlar eklemeniz gerekiyor, bunun için Event Listener'ları kullanabilirsiniz. Örnek:

    <?php
    # /app/Listeners/KuveytPosV2RequestDataPreparedEventListener.php:
    namespace App\Listeners;
    
    use Mews\Pos\Event\RequestDataPreparedEvent;
    
    /**
     * KuveytPos TDV2.0.0 odemenin calismasi icin zorunlu eklenmesi gereken alan var.
     */
     class KuveytPosV2RequestDataPreparedEventListener
    {
        public function __invoke(RequestDataPreparedEvent $event): void
        {
            if ($event->getGatewayClass() !== \Mews\Pos\Gateways\KuveytPos::class) {
                return;
            }
    
            /**
             * ekstra eklenmesi gereken verileri isteseniz $order icine ekleyip sonra o verilere
             * $event->getOrder() ile erisebilirsiniz.
             */
            $additionalRequestDataForKuveyt = [
                'DeviceData'     => [
                    /**
                     * DeviceChannel : DeviceData alanı içerisinde gönderilmesi beklenen işlemin yapıldığı cihaz bilgisi.
                     * 2 karakter olmalıdır. 01-Mobil, 02-Web Browser için kullanılmalıdır.
                     */
                    'DeviceChannel' => '02',
                ],
                'CardHolderData' => [
                    /**
                     * BillAddrCity: Kullanılan kart ile ilişkili kart hamilinin fatura adres şehri.
                     * Maksimum 50 karakter uzunluğunda olmalıdır.
                     */
                    'BillAddrCity'     => 'İstanbul',
                    /**
                     * BillAddrCountry Kullanılan kart ile ilişkili kart hamilinin fatura adresindeki ülke kodu.
                     * Maksimum 3 karakter uzunluğunda olmalıdır.
                     * ISO 3166-1 sayısal üç haneli ülke kodu standardı kullanılmalıdır.
                     */
                    'BillAddrCountry'  => '792',
                    /**
                     * BillAddrLine1: Kullanılan kart ile ilişkili kart hamilinin teslimat adresinde yer alan sokak vb. bilgileri içeren açık adresi.
                     * Maksimum 150 karakter uzunluğunda olmalıdır.
                     */
                    'BillAddrLine1'    => 'XXX Mahallesi XXX Caddesi No 55 Daire 1',
                    /**
                     * BillAddrPostCode: Kullanılan kart ile ilişkili kart hamilinin fatura adresindeki posta kodu.
                     */
                    'BillAddrPostCode' => '34000',
                    /**
                     * BillAddrState: CardHolderData alanı içerisinde gönderilmesi beklenen ödemede kullanılan kart ile ilişkili kart hamilinin fatura adresindeki il veya eyalet bilgisi kodu.
                     * ISO 3166-2'de tanımlı olan il/eyalet kodu olmalıdır.
                     */
                    'BillAddrState'    => '40',
                    /**
                     * Email: Kullanılan kart ile ilişkili kart hamilinin iş yerinde oluşturduğu hesapta kullandığı email adresi.
                     * Maksimum 254 karakter uzunluğunda olmalıdır.
                     */
                    'Email'            => '[email protected]',
                    'MobilePhone'      => [
                        /**
                         * Cc: Kullanılan kart ile ilişkili kart hamilinin cep telefonuna ait ülke kodu. 1-3 karakter uzunluğunda olmalıdır.
                         */
                        'Cc'         => '90',
                        /**
                         * Subscriber: Kullanılan kart ile ilişkili kart hamilinin cep telefonuna ait abone numarası.
                         * Maksimum 15 karakter uzunluğunda olmalıdır.
                         */
                        'Subscriber' => '1234567899',
                    ],
                ],
            ];
            $requestData                    = $event->getRequestData();
            $requestData                    = \array_merge_recursive($requestData, $additionalRequestDataForKuveyt);
            $event->setRequestData($requestData);
        }
    }

    Sonra bu yeni Listener'i AppServiceProvider'da register etmeniz gerekiyor.

    # /app/Providers/AppServiceProvider.php
    namespace App\Providers;
    
    class AppServiceProvider extends ServiceProvider
    {
        public function boot(): void
        {
            // ...
            \Illuminate\Support\Facades\Event::listen(
                \Mews\Pos\Event\RequestDataPreparedEvent::class,
                \App\Listeners\KuveytPosV2RequestDataPreparedEventListener::class
            );
        }
    }

3D Secure Odeme Ornek Kullanim

<?php

namespace App\Http\Controllers;

use Illuminate\Container\Container;
use Illuminate\Http\Request;
use Mews\Pos\Entity\Card\CreditCardInterface;
use Mews\Pos\Exceptions\CardTypeNotSupportedException;
use Mews\Pos\Exceptions\CardTypeRequiredException;
use Mews\Pos\Exceptions\HashMismatchException;
use Mews\Pos\Factory\CreditCardFactory;
use Mews\Pos\Gateways\PayFlexV4Pos;
use Mews\Pos\PosInterface;

class SingleBankThreeDSecurePaymentController extends Controller
{
    private string $paymentModel = PosInterface::MODEL_3D_SECURE;

    public function __construct(
        private PosInterface $pos,
        Container $container,
    )
    {
//        // Pos servise alternatif erişim yöntemi:
//        // "kuveytpos" laravel-pos.php'de tanımladığınız isim olur.
//        $kuveytPos = $container->get('laravel-pos:gateway:kuveytpos');
//
//        // birden fazla banka varsa tag
//        $allPosServices = $container->tagged('laravel-pos:gateway');
//        foreach ($allPosServices as $bank) {
//            if ('kuveytpos' === $bank->getAccount()->getBank()) {
//                // pos found
//            }
//        }
    }

    /**
     * route: /single-bank/payment/3d/form
     * Kullanicidan kredi kart bilgileri alip buraya POST ediyoruz
     */
    public function form(Request $request)
    {
        $session = $request->getSession();

        $transaction = $request->get('tx', PosInterface::TX_TYPE_PAY_AUTH);

        $callbackUrl = url("/single-bank/payment/3d/response");
        $order       = $this->createNewOrder(
            $this->paymentModel,
            $callbackUrl,
            $request->getClientIp(),
            $request->get('currency', PosInterface::CURRENCY_TRY),
            $request->get('installment'),
        );
        $session->set('order', $order);

        $card = $this->createCard($this->pos, $request->request->all());
        
        /**
         * PayFlex'te provizyonu (odemeyi) tamamlamak icin tekrar kredi kart bilgileri isteniyor,
         * bu yuzden kart bilgileri kaydediyoruz
         */
        if ($this->pos::class === PayFlexV4Pos::class) {
            // Laravel 8'de set() yerine put() metodu kullanmanız gerekiyor.
            $session->set('card', $request->request->all());
        }
        $session->set('tx', $transaction);

        try {
            $formData = $this->pos->get3DFormData($order, $this->paymentModel, $transaction, $card);
        } catch (\Throwable $e) {
            dd($e);
        }

        return view('redirect-form', [
            'formData' => $formData,
        ]);
    }

    /**
     * route: /single-bank/payment/3d/response
     * Kullanici bankadan geri buraya redirect edilir.
     * Bu route icin CSRF disable edilmesi gerekiyor.
     */
    public function response(Request $request)
    {
        $session = $request->getSession();

        $transaction = $session->get('tx', PosInterface::TX_TYPE_PAY_AUTH);

        // bankadan POST veya GET ile veri gelmesi gerekiyor
        if (($request->getMethod() !== 'POST')
            // PayFlex-CP GET request ile cevapliyor
            && ($request->getMethod() === 'GET' && ($this->pos::class !== \Mews\Pos\Gateways\PayFlexCPV4Pos::class || [] === $request->query->all()))
        ) {
            return redirect('/');
        }

        $card = null;
        if ($this->pos::class === \Mews\Pos\Gateways\PayFlexV4Pos::class) {
            // bu gateway için ödemeyi tamamlarken tekrar kart bilgisi lazım.
            $savedCard = $session->get('card');
            $card      = $this->createCard($this->pos, $savedCard);
        }

        $order = $session->get('order');
        if (!$order) {
            throw new \Exception('Sipariş bulunamadı, session sıfırlanmış olabilir.');
        }

        try {
            $this->pos->payment($this->paymentModel, $order, $transaction, $card);
        } catch (HashMismatchException $e) {
            dd($e);
        } catch (\Exception|\Error $e) {
            dd($e);
        }

        $response = $this->pos->getResponse();

        // iptal, iade, siparis durum sorgulama islemleri yapabilmek icin $response'u kaydediyoruz
        $session->set('last_response', $response);

        if ($this->pos->isSuccess()) {
            echo 'success';
        }

        dd($response);
    }

    private function createNewOrder(
        string $paymentModel,
        string $callbackUrl,
        string $ip,
        string $currency,
        ?int   $installment = 0,
        string $lang = PosInterface::LANG_TR
    ): array
    {
        $orderId = date('Ymd').strtoupper(substr(uniqid(sha1(time())), 0, 4));

        $order = [
            'id'          => $orderId,
            'amount'      => 10.01,
            'currency'    => $currency,
            'installment' => $installment,
            'ip'          => filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? $ip : '127.0.0.1',
        ];

        if (in_array($paymentModel, [
            PosInterface::MODEL_3D_SECURE,
            PosInterface::MODEL_3D_PAY,
            PosInterface::MODEL_3D_HOST,
            PosInterface::MODEL_3D_PAY_HOSTING,
        ], true)) {
            $order['success_url'] = $callbackUrl;
            $order['fail_url']    = $callbackUrl;
        }

        if ($lang) {
            //lang degeri verilmezse account (EstPosAccount) dili kullanilacak
            $order['lang'] = $lang;
        }

        return $order;
    }

    private function createCard(PosInterface $pos, array $card): CreditCardInterface
    {
        try {
            return CreditCardFactory::createForGateway(
                $pos,
                $card['number'],
                $card['year'],
                $card['month'],
                $card['cvv'],
                $card['name'],
                $card['type'] ?? null
            );
        } catch (CardTypeRequiredException|CardTypeNotSupportedException $e) {
            dd($e);
        } catch (\LogicException $e) {
            dd($e);
        }
    }
}
# /routes/web.php
Route::match(['POST'], '/single-bank/payment/3d/form', [\App\Http\Controllers\SingleBankThreeDSecurePaymentController::class, 'form']);
Route::match(['GET','POST'], '/single-bank/payment/3d/response', [\App\Http\Controllers\SingleBankThreeDSecurePaymentController::class, 'response']);
<!--/resources/views/redirect-form.blade.php-->
<form method="{{ $formData['method'] }}" action="{{ $formData['gateway'] }}"  class="redirect-form" role="form">
    @foreach($formData['inputs'] as $key => $value)
    <input type="hidden" name="{{ $key }}" value="{{ $value }}">
    @endforeach
    <div class="text-center">Redirecting...</div>
    <hr>
    <div class="form-group text-center">
        <button type="submit" class="btn btn-lg btn-block btn-success">Submit</button>
    </div>

</form>

Troubleshoots

  • Error: "cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://..." Genellikle lokal ortamda bu sorunla karşılaşabilirsiniz. Lokal ortamınızda CA certificate bulunmadığında oluşur. Bu durumda sunucuda çalıştırmayı deneyiniz.

License

MIT

laravel-pos's People

Contributors

amora2972 avatar mewebstudio avatar nuryagdym avatar unusefulcoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-pos's Issues

PHP 8

Projeme eklemek istediğimde PHP 8 için uyumlu olmadığı uyarısını alıyorum, bu konuda bir güncelleme yapabilir misiniz?

Mews\Pos\Pos erisimlerinin ve dosyanin olmamasi

Merhabalar,

composer ile basarili kurdugum bu pakette, bazi pos paketinin dosyalarini erisemiyorum. Cunku o dosyalar yok. Sanirim ya dosyalarda eksiklik var yada koklu degisikligi gidildigi asikar. Ama bu paketlere yansimamis sanirim.

Konuyla ilgili neler yapabiliriz? Yonlendirebilirseniz sevinirim,

3D İçin Örnek Döküman

3d aşağıdaki şekilde gönderdiğimde Undefined index: HASHPARAMS hatası alıyorum. 3d için bir örnek döküman ekleyebilir misiniz?

$pos->account([
'bank' => 'isbank',
'model' => '3d',
'client_id' => 'XXXXX',
'username' => 'XXXXX',
'password' => 'XXXXX',
'store_key' => 'XXXXX',
'env' => '',
]);

PosNet.php $this->data->approved non-object hatası mcrypt_encrypt problemi

PosNet.php dosyasında

    $this->crypt = function_exists('mcrypt_encrypt') ?
        new PosNetCrypt :
        null;

$this->crypt karşılığı sunucuda mcrypt_encrypt yoksa null bırakılmış buda diğer işlemlerin aksamasına sebep oluyor ve $this->data->approved non-object hatasına sebebiyet veriyor. null yerine bir hata fırlatılsa daha iyi olur. Read.me dosyasında minimum gereksinim kısmına da bilgi amaçlı eklenebilir.

Kurulum Problemi

Merhaba, kurulumda aşağıdaki gibi bir problem alıyorum, php versiyonum 7.2.5 laravel versiyonu 7.3

Problem 1
    - Installation request for mews/laravel-pos ^0.3.8 -> satisfiable by mews/laravel-pos[0.3.8].
    - Conclusion: remove guzzlehttp/guzzle 7.3.0
    - Conclusion: don't install guzzlehttp/guzzle 7.3.0
    - mews/laravel-pos 0.3.8 requires mews/pos ^0.4.3 -> satisfiable by mews/pos[0.4.10, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9].
    - mews/pos 0.4.10 requires guzzlehttp/guzzle ^6.3.3 -> satisfiable by guzzlehttp/guzzle[6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev].
    - mews/pos 0.4.3 requires guzzlehttp/guzzle ^6.3.3 -> satisfiable by guzzlehttp/guzzle[6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev].
    - mews/pos 0.4.4 requires guzzlehttp/guzzle ^6.3.3 -> satisfiable by guzzlehttp/guzzle[6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev].
    - mews/pos 0.4.5 requires guzzlehttp/guzzle ^6.3.3 -> satisfiable by guzzlehttp/guzzle[6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev].
    - mews/pos 0.4.6 requires guzzlehttp/guzzle ^6.3.3 -> satisfiable by guzzlehttp/guzzle[6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev].
    - mews/pos 0.4.7 requires guzzlehttp/guzzle ^6.3.3 -> satisfiable by guzzlehttp/guzzle[6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev].
    - mews/pos 0.4.8 requires guzzlehttp/guzzle ^6.3.3 -> satisfiable by guzzlehttp/guzzle[6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev].
    - mews/pos 0.4.9 requires guzzlehttp/guzzle ^6.3.3 -> satisfiable by guzzlehttp/guzzle[6.3.3, 6.4.0, 6.4.1, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.x-dev].
    - Can only install one of: guzzlehttp/guzzle[6.3.3, 7.3.0].
    - Can only install one of: guzzlehttp/guzzle[6.4.0, 7.3.0].
    - Can only install one of: guzzlehttp/guzzle[6.4.1, 7.3.0].
    - Can only install one of: guzzlehttp/guzzle[6.5.0, 7.3.0].
    - Can only install one of: guzzlehttp/guzzle[6.5.1, 7.3.0].
    - Can only install one of: guzzlehttp/guzzle[6.5.2, 7.3.0].
    - Can only install one of: guzzlehttp/guzzle[6.5.3, 7.3.0].
    - Can only install one of: guzzlehttp/guzzle[6.5.4, 7.3.0].
    - Can only install one of: guzzlehttp/guzzle[6.5.5, 7.3.0].
    - Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.3.0].
    - Installation request for guzzlehttp/guzzle (locked at 7.3.0, required as ^6.3.1|^7.0.1) -> satisfiable by guzzlehttp/guzzle[7.3.0].


Installation failed, reverting ./composer.json to its original content.

C:\xampp\htdocs\ticaret
λ php artisan --version
Laravel Framework 7.30.4

3d Secure return with new session

Hello;
When I try to use 3dSecure version the redirect page opens without problem. But after the 3d Form redirects back to the site, all session is lost. The user is also logging out.
Do you have any solutions about it?

hata: yapı kredi get3dFormData

     $pos = \Mews\LaravelPos\Facades\LaravelPos::instance();
     $pos = $pos->account($account);
     $pos = $pos->prepare($order, "pay", $card);
     $return = $pos->get3DFormData();

Şeklinde çalıştırdığım zaman,
#data: {#1408 ▼ +"approved": "0" +"respCode": "E181" +"respText": "Encryption Key bulunamadı." }

test olarak

get3dFormData fonksiyonuna log attığım zaman cart ve account boş olduklarını fark ettim nasıl çözüm önerirsiniz? log:

{
  "method": "get3DFormData",
  "account": {},
  "card": {},
  "order": {
    "id": "2134214124",
    "email": "[email protected]",
    "name": "asd asd",
    "ip": "XXXXX",
    "installment": "00",
    "transaction": "pay",
    "currency": "TL",
    "amount": 1000,
    "success_url": "xxxxx",
    "fail_url": "xxxxx",
    "lang": "tr",
    "rand": "680789001632293066"
  }
}

qnb finansbank iptal iade para birim kodu hatası

Selamlar,

qnb finansbank iptal iade para birim kodu hatası alıyorum. Kodlarına biraz baktım ancak sana danışmak istedim.

<?xml version="1.0" encoding="UTF-8"?>
<PayforRequest><MerchantId>****</MerchantId><UserCode>***</UserCode><UserPass>***</UserPass><MbrId>5</MbrId><OrgOrderId>16777226</OrgOrderId><SecureType>NonSecure</SecureType><TxnType>Void</TxnType><Currency>TL</Currency><Lang>tr</Lang></PayforRequest>

Laravel 6 Kurulum hatası

Merhaba, Laravel 6 sürümü için kurulum yapamıyorum yardımcı olur musnuz?

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - mews/pos 0.3.8 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - mews/pos 0.3.7 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - mews/pos 0.3.6 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - mews/pos 0.3.5 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
    - mews/laravel-pos dev-master requires mews/pos ^0.3.5 -> satisfiable by mews/pos[0.3.5, 0.3.6, 0.3.7, 0.3.8].
    - Installation request for mews/laravel-pos dev-master -> satisfiable by mews/laravel-pos[dev-master].

  To enable extensions, verify that they are enabled in your .ini files:
    - /usr/local/etc/php/7.3/php.ini
    - /usr/local/etc/php/7.3/conf.d/ext-opcache.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Şöyle hata alıyorum

Undefined index: mdStatus

laravel-pos paketini kullanıyorum. 3d şifresini girdikten sonra ödemeyi tamamlarken bu hatayı alıyorum.

Undefined index: mdStatus
/src/Gateways/GarantiPos.php satır 725

Aynı dosya içinde 702. Satırda mdStatus lowercase olarak kullanılmış. Bankalar aldığım dönütü incelediğimde de mdStatus lowercase olarak geliyor.

Teşekkürler

"System based initialization problem. Please try again later" hatası döndürüyor nedeni nedir? Ne yapmalıyım?

Merhaba sistemi kurup test etmek için çalıştırdım fakat belirttiğim hatayı verdi, en sona yazılan dd($payment->response) kodunu çalıştırdı yani, ekranda sadece return code 99 vs. yazıyor. İstenilen bilgilerde ilk baştaki account kısmında client_id,username vs. olan kısımda tam olarak neyleri kastettiğini anlamadığım için rastgele bilgiler yazmıştım.
Sizce sebebi bu mudur yoksa başka bir sebepten dolayı mı bu hatayı veriyor? Yardımcı olursanız sevinirim. Paylaşımınız için de teşekkürler, emeğinize sağlık :)

Laravel 7.6.1 guzzle versiyon sorunu

Laravel 7.6.1 Yüklerken böyle bir hata alıyorum. guzzle 6.5.2 yüklü.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Can only install one of: guzzlehttp/guzzle[6.5.2, 6.3.3].
    - Can only install one of: guzzlehttp/guzzle[6.3.3, 6.5.2].
    - Can only install one of: guzzlehttp/guzzle[6.3.3, 6.5.2].
    - mews/pos 0.3.8 requires guzzlehttp/guzzle 6.3.3 -> satisfiable by guzzlehttp/guzzle[6.3.3].
    - mews/laravel-pos 0.3.3 requires mews/pos ^0.3.8 -> satisfiable by mews/pos[0.3.8].
    - Installation request for mews/laravel-pos ^0.3.3 -> satisfiable by mews/laravel-pos[0.3.3].
    - Installation request for guzzlehttp/guzzle (locked at 6.5.2) -> satisfiable by guzzlehttp/guzzle[6.5.2].


Installation failed, reverting ./composer.json to its original content.

Yapıkredi 3d get3dFormData dönüşü XML Hatası

Merhaba;

Yapıkredi pos ile test ederken

get3dFormData() fonksiyonun da aşağıdaki hatayı alıyorum

{message: "String could not be parsed as XML", exception: "Exception",…}
message: "String could not be parsed as XML"
exception: "Exception"
file: "/vendor/mews/pos/src/PosNet.php"
line: 651
trace: [{file: "/vendor/mews/pos/src/PosNet.php", line: 651,…},…]

Laravel 7.19.1 dependency rejection

Your requirements could not be resolved to an installable set of packages.

Problem 1
- mews/laravel-pos 0.3.3 requires mews/pos ^0.3.8 -> satisfiable by mews/pos[0.3.8].
- Installation request for mews/laravel-pos ^0.3.3 -> satisfiable by mews/laravel-pos[0.3.3].
- Conclusion: remove symfony/http-foundation v5.1.2
- Conclusion: don't install symfony/http-foundation v5.1.2
- mews/pos 0.3.8 requires symfony/http-foundation ^4.1 -> satisfiable by symfony/http-foundation[4.1.x-dev, 4.2.x-dev, 4.3.x-dev, 4.4.x-dev, v4.1.0, v4.1.0-BETA1, v4.1.0-BETA2, v4.1.0-BETA3, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.2, v4.1.3, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.0, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.0-BETA1, v4.3.0-BETA2, v4.3.0-RC1, v4.3.1, v4.3.10, v4.3.11, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.0-BETA1, v4.4.0-BETA2, v4.4.0-RC1, v4.4.1, v4.4.10, v4.4.2, v4.4.3, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9].
- Can only install one of: symfony/http-foundation[4.1.x-dev, v5.1.2].

http-foundation:^5 is a requirement for laravel/framework

https://github.com/laravel/framework/blob/a66caa51ae1a99990ce6a572ade5fd78e4ad3d3a/composer.json#L37

Class 'Mews\Pos\Pos' not found

Hello,
I am on Laravel 8.16. I am getting this error of Pos class not found, I checked the folder pos/src and I only see PosInterface.php on the root of this folder.


vendor\mews\laravel-pos\src\LaravelPos.php:89
    public function account(array $account)
    {
        $this->account = $account;

        $this->pos = new Pos($this->account, $this->config);

        $this->bank = $this->pos->bank;

        return $this;

    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.