Download the PHP package mirarus/virtual-pos without Composer

On this page you can find all versions of the php package mirarus/virtual-pos. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package virtual-pos

virtual-pos

Multiple Virtual Pos Interface

// composer require mirarus/virtual-pos

require "vendor/autoload.php";

use Mirarus\VirtualPos\Enums\Locale;
use Mirarus\VirtualPos\Enums\Currency;
use Mirarus\VirtualPos\Enums\BasketItemType;
use Mirarus\VirtualPos\Models\Basket;
use Mirarus\VirtualPos\Models\BasketItem;
use Mirarus\VirtualPos\Models\Order;
use Mirarus\VirtualPos\Models\Buyer;
use Mirarus\VirtualPos\Models\Address;
use Mirarus\VirtualPos\VirtualPos;
use Mirarus\VirtualPos\Providers\PayTR;
use Mirarus\VirtualPos\Providers\Iyzico;
use Mirarus\VirtualPos\Providers\Shopier;

// PayTR için
$PayTR = new PayTR();
$PayTR->setApiId("--api-id--");
$PayTR->setApiKey("--api-key--");
$PayTR->setApiSecret("--api-secret--");
$PayTR->setApiSandbox(true);
$PayTR->setApiDebug(true);
$PayTR->setApiSuccessfulUrl("http://localhost/pay-success");
$PayTR->setApiFailedUrl("http://localhost/pay-failed");

// Iyzico için
$Iyzico = new Iyzico();
$Iyzico->setApiKey("--api-key--");
$Iyzico->setApiSecret("--api-secret--");
$Iyzico->setApiSandbox(true);
$Iyzico->setApiReturnUrl("http://localhost/pay-callback");

// Shopier için
$Shopier = new Shopier();
$Shopier->setApiKey("--api-key--");
$Shopier->setApiSecret("--api-secret--");
$Shopier->setWebSiteIndex(1);
$Shopier->setApiReturnUrl("http://localhost/pay-callback");

// Ortak Kullanım - Müşteri Bilgileri
$buyer = new Buyer();
$buyer->setId(1);
$buyer->setName("John Doe");
$buyer->setSurname("Smith");
$buyer->setEmail("[email protected]");
$buyer->setPhone("905000000000");
$buyer->setIdentityNumber("11111111111");

// Ortak Kullanım - Müşteri Adres Bilgileri
$address = new Address();
$address->setAddress("... Mah. ... Sok. No: ...");
$address->setState("Keçiören");
$address->setCity("Ankara");
$address->setCountry("Turkey");
$address->setZipCode("06000");

// setInstallment Harici, Ortak Kullanım - Sipariş Bilgileri
$order = new Order();
$order->setId(10000);
$order->setPrice(10);
$order->setLocale(Locale::TR);
$order->setCurrency(Currency::TL);
$order->setInstallment(1); // Taksit Sayısı (PayTR için)
$order->setInstallments([1]); // Taksit Sayıları (Iyzico için)

// Ortak Kullanım - Sepet İçeriği
$basketItem = new BasketItem();
$basketItem->setId(1);
$basketItem->setName("Ayakkabı");
$basketItem->setPrice("10.30");
$basketItem->setQuantity(1);
$basketItem->setCategory("Giyim");
$basketItem->setType(BasketItemType::PHYSICAL);

// Ortak Kullanım - Sepet Bilgileri
$basket = new Basket();
$basket->setBasketItem($basketItem); // Sepet İçeriği (Shopier için ilk tanımlanan basketItem geçerli olacaktır)

// Sınıf Başlatma
$virtualPos = new VirtualPos();
$virtualPos->setProvider($PayTR); // $PayTR, $Iyzico veya $Shopier
$virtualPos->setBuyer($buyer);
$virtualPos->setAddress($address);
$virtualPos->setOrder($order);
$virtualPos->setBasket($basket);

// Ödeme Formu Oluştur
echo $virtualPos->createPaymentForm();

Geri Dönüş Bildirimi / Callback;

require "vendor/autoload.php";

use Mirarus\VirtualPos\VirtualPos;
use Mirarus\VirtualPos\Providers\PayTR;
use Mirarus\VirtualPos\Providers\Iyzico;
use Mirarus\VirtualPos\Providers\Shopier;

// PayTR için
$PayTR = new PayTR();
$PayTR->setApiKey("--api-key--");
$PayTR->setApiSecret("--api-secret--");

// Iyzico için
$Iyzico = new Iyzico();
$Iyzico->setApiKey("--api-key--");
$Iyzico->setApiSecret("--api-secret--");
$Iyzico->setApiSandbox(true);

// Shopier için
$Shopier = new Shopier();
$Shopier->setApiSecret("--api-secret--");

// Sınıf Başlatma
$virtualPos = new VirtualPos();
$virtualPos->setProvider($PayTR); // $PayTR, $Iyzico veya $Shopier

// CallBack İşlemi - DB İşlemleri vs. yapılabilir, Return Gönderilemez
$createCallback = $virtualPos->createCallback(function($data) {
// data: [orderId, status, paymentData]
// PayTR callback tarafında gönderilmesi istenen OK ifadesi dahili olarak aktarılmaktadır.

    print_r($data);
    // CallBack Proccess
});

All versions of virtual-pos with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
ext-json Version *
guzzlehttp/guzzle Version ^7.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mirarus/virtual-pos contains the following files

Loading the files please wait ....