mewebstudio/laravel-pos

Kurulum Problemi

GurrKhoo opened this issue · 7 comments

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

@GurrKhoo composer.lock dosyasını silip tekrar composer install deneyin. tabi composer require mews/laravel-pos bu komutu öncesinde çalıştırmanız gerekiyor

@GurrKhoo composer.lock dosyasını silip tekrar composer install deneyin. tabi composer require mews/laravel-pos bu komutu öncesinde çalıştırmanız gerekiyor

aynı hatayı veriyor yine.

@GurrKhoo composer.json içeriğini paylaşır mısınız?

hocam kurulumu tamamladım, guzzle yi silip 6.3.3 sürümünü yükledim fakat çekim için felan gerekli dökümantasyon yok, örneğin

public function prepare(array $order, string $txType, array $card = null)
{
        $card['bank'] = $this->bankName;
        $card = CardFactory::create($card);
        $this->bank->prepare($order, $txType, $card);
        return $this;
}

şöyle bir fonksiyon var uygulamada, dikkat ederseniz fonksiyonda order, txtype, card şeklinde 3 adet parametre istiyor fakat uygulamanın örnek verdiği kullanımda yanlızca 1 adet parametre gönderiyor, doğal olarak sistem hata veriyor

$pos->prepare($order); <<<< burda yanlızca 1 parametre gönderiyor
$payment = $pos->payment($card);
dd($payment->response);

gelen hata

ArgumentCountError
Too few arguments to function Mews\LaravelPos\LaravelPos::prepare(), 1 passed in C:\xampp\htdocs\ticaret\app\Http\Controllers\OdemeController.php on line 83 and at least 2 expected

Arkadaşlar paket yeni sürümler de sorun çıkartıyor. Tabii ki bu işler gönüllülük esaslı yapılıyor ancak paket sahibine ricamdır. Bu kadar uğraşmışsınız güncel sürümünü düzenleyin lütfen. Laravel paketleri konusunda zaten Türkiye bandında çokça eksik ve sorunlar var.

Ben çekim yapamadım henüz ancak çalıştırdığımda en azından karşıya gitti response döndü. Hata aldım ama bu çalıştığını gösteriyor. Benim şu an hesap bilgileriyle alakalı bir sorunum var onu düzelttiğim zaman çalışacak diye düşünüyorum. Sizlerde sorguyu aşağıdaki şekilde düzenleyip sonuca ulaşabilirsiniz. Belki birisine faydası olur.

$pos->prepare($order, 'pay', $card);

$payment = $pos->payment($card);
dd($payment);

Class içerisindeki fonksiyonlarda kopukluk var sanki. prepare zaten en az 2 parametre alıyor. 3. parametre kart bilgileri onuda göndermeyince yine hata veriyor. O yüzden yukarıdaki gibi yaparsanız sonuca ulaşacaksınız.

prepare içinde 2.parametreye verilen değerleri de vendor klasöründeki Classları inceleyip buldum. Onlarda şöyle;

  • 'pay';
  • 'pre';
  • 'post';
  • 'cancel';
  • 'refund';
  • 'status';
  • 'history';

Kolaylıklar diliyorum :)

bende kurulum hatası alıyorum

rica etsem paket için güncelleme yapabilir misiniz

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

Problem 1
- Root composer.json requires mews/laravel-pos ^0.3.9 -> satisfiable by mews/laravel-pos[0.3.9].
- mews/laravel-pos 0.3.9 requires illuminate/config ~5.7|~5.8|^6.0|^7.0|^8.0 -> found illuminate/config[v5.7.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely
because it conflicts with another require.