Download the PHP package thebrightlabs/laravel-qicard-gateway without Composer
On this page you can find all versions of the php package thebrightlabs/laravel-qicard-gateway. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thebrightlabs/laravel-qicard-gateway
More information about thebrightlabs/laravel-qicard-gateway
Files in thebrightlabs/laravel-qicard-gateway
Package laravel-qicard-gateway
Short Description Laravel package for Qi Card payment gateway integration
License MIT
Homepage https://github.com/TheBrightLabs/laravel-qicard-gateway
Informations about the package laravel-qicard-gateway

Laravel QiCard Gateway
A simple, secure Laravel package for integrating the Qi Card payment gateway in your application.
This package handles all payment, subscription, and webhook logic for you—just plug it into your project and start accepting Qi Card payments in Iraq.
Features
- Easy Qi Card payment integration for Laravel
- Ready-to-use plans and subscriptions tables and migrations
- Secure payment status checks (never trust webhook status alone)
- Webhook support with built-in replay and protection (different verification than the one QiCard proivdes)
- All configuration through environment variables—no code changes needed
- Includes a default seeder for demo plans
Installation
Setup
-
Publish config and migrations:
This publishes the config file and database migrations for
plansandsubscriptions. -
Run migrations:
-
(Optional) Seed demo plans:
You can edit, add, or remove plans later using CRUD.
Configuration
- All settings are in your
.envfile. - Sandbox mode (for testing) is enabled by default; production keys are only needed when you go live.
Example .env:
Usage
1. Show Plans and Handle Subscriptions
Display your plans using the plans table.
When a user clicks "Subscribe," send a GET request to your payment route with the plan ID.
Example Blade/Volt:
Example Route:
2. Payment Flow
- User is redirected to Qi Card to complete payment.
- After payment, Qi Card redirects back to your
finishPaymentUrland/or calls yournotificationUrl(webhook).
Webhook & Status Checks
- Never trust the webhook status directly.
- When a webhook is received, the package checks the payment status with Qi Card’s official API before updating your subscription.
- Only if the status matches, the subscription is marked as
paidorcancelled. - If the webhook is suspicious or doesn’t match, it is ignored.

Automatic Pending Subscription Cleanup
- Some users may never finish payment.
- The package provides a console command to check all pending subscriptions and update their status automatically.
Add to your scheduler (in routes/console.php):
- This command checks all pending subscriptions and updates them to
cancelledif not completed.
Plan & Subscription Statuses
- pending: User started payment but hasn’t finished yet.
- paid: Payment succeeded and subscription is active.
- cancelled: Payment was cancelled or failed.
Customization
- All config is via
.env—no code changes needed for production or sandbox. - Default URL for webhook is recommended for best security and compatibility.
Security
- Webhook requests are always verified against Qi Card’s API, not trusted directly.
- You can safely use this package in production.
License
MIT
Credits
Developed by TheBrightLabs
https://thebrightlabs.co
Let us know if you have questions or suggestions!