qpay-sdk/laravel

QPay V2 payment integration for Laravel

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/qpay-sdk/laravel

1.0.0 2026-02-26 11:59 UTC

This package is not auto-updated.

Last update: 2026-02-27 12:11:31 UTC


README

CI Packagist License: MIT

QPay V2 payment integration for Laravel.

Install

composer require qpay-sdk/laravel
php artisan qpay:install

Configuration

Add to .env:

QPAY_BASE_URL=https://merchant.qpay.mn
QPAY_USERNAME=your_username
QPAY_PASSWORD=your_password
QPAY_INVOICE_CODE=your_invoice_code
QPAY_CALLBACK_URL=https://yoursite.com/qpay/webhook

Usage

use QPay\Laravel\Facades\QPay;
use QPay\Models\CreateSimpleInvoiceRequest;

$invoice = QPay::createSimpleInvoice(new CreateSimpleInvoiceRequest(
    invoiceCode: config('qpay.invoice_code'),
    senderInvoiceNo: 'ORDER-001',
    amount: 10000,
    callbackUrl: config('qpay.callback_url'),
));

// $invoice->invoiceId, $invoice->qrImage, $invoice->urls

Blade Components

<x-qpay-qr-code :qr-image="$invoice->qrImage" />
<x-qpay-payment-button :urls="$invoice->urls" :short-url="$invoice->qPayShortUrl" />

Webhook

Listen for payment events:

use QPay\Laravel\Events\PaymentReceived;

Event::listen(PaymentReceived::class, function ($event) {
    // $event->invoiceId
    // $event->result->rows
});

License

MIT