Download the PHP package yousefkadah/laravel-pelecard without Composer

On this page you can find all versions of the php package yousefkadah/laravel-pelecard. 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 laravel-pelecard

Laravel Pelecard Payment Gateway

Latest Version on Packagist Total Downloads

A comprehensive Laravel package for integrating with the Pelecard payment gateway. Built with Laravel Cashier-level code quality, featuring subscription billing, multi-tenancy support, and a familiar Billable trait interface.

Features

Requirements

Installation

Install the package via Composer:

Publish the configuration file:

Run the migrations:

Configuration

Add your Pelecard credentials to your .env file:

Billable Model

By default the billable entity — the model that owns subscriptions, transactions and the saved card token — is your App\Models\User. To bill a different model (e.g. a Tenant or Team in a SaaS app), set it in config/pelecard.php (or the PELECARD_MODEL env var):

The model's table and foreign key drive both the migration and the relationships, so a Tenant model (table tenants) automatically uses a tenant_id foreign key on the subscriptions and pelecard_transactions tables — no migration editing required. Just add the Billable trait to that model. (This mirrors Laravel Cashier's configurable customer model.)

Multi-Tenancy Configuration

For applications that need separate Pelecard credentials per tenant, enable multi-tenancy in config/pelecard.php:

Usage

Basic Setup

Add the Billable trait to your billable model (your User, or whatever pelecard.model points at):

One-Time Payments

Security Note: Always use tokens for payments. Only collect card details for the initial tokenization.

Charge a Customer (Using Token)

First-Time Payment (Tokenize Card)

Automatic Card Saving (Recommended)

The package automatically extracts tokens from payment responses (J2/J4/J5):

Authorize (Hold Funds)

Capture Authorization

Pelecard has no dedicated capture service — capturing a held (J5) authorization is done by charging the saved token with ActionType J4:

Refund a Transaction

Using DTOs (Type-Safe Requests)

The package provides Data Transfer Objects for type-safe API requests with IDE autocomplete:

php // Using ParamX and ParamZ for order tracking $response = Pelecard::charge([ 'amount' => 10000, 'currency' => 'ILS', 'token' => $user->pelecard_token, 'param_x' => 'order_12345', // Order ID 'param_z' => json_encode([ // Additional metadata 'customer_id' => $user->id, 'source' => 'mobile_app', ]), ]);

// In webhook callback, retrieve the parameters $paramX = $request->input('ParamX'); // 'order_12345' $paramZ = $request->input('ParamZ'); // JSON data

// With DTOs $charge = new ChargeRequestDTO( amount: 10000, currency: 'ILS', token: $user->pelecard_token, ); $charge->paramX = 'order_12345'; $charge->paramZ = json_encode(['user_id' => $user->id]);

$response = Pelecard::charge($charge->toArray()); blade {{-- Only ParamX is supported in iframe --}} <x-pelecard::payment-iframe :amount="10000" param-x="order_12345" />

3D Secure Authentication

3D Secure provides an additional layer of security for online card transactions.

Using 3DS with Saved Token

3DS with iFrame (Recommended)

Enable 3DS in the iframe payment page:

Or programmatically:

Get 3DS Data After Authentication

Google Pay

Advanced Token Management

Best Practice: Always tokenize cards and use tokens for recurring payments to comply with PCI-DSS.

Convert Card to Token

Charge Using Token

Retrieve Token Details

Update Token

Transaction Retrieval

Invoice Creation

The package provides a flexible invoice builder with customizable templates.

Creating an Invoice

Customizing Invoice Template

Publish the invoice templates:

This creates resources/views/vendor/pelecard/invoices/default.blade.php which you can customize:

Using Custom Template

Error Messages

Invoice Creation

iFrame Payment Integration

Pelecard's iframe integration allows customers to complete payments directly on your website without being redirected to an external payment page.

Using the Blade Component

Using the Helper Directly

Customization Options

Subscriptions

The subscription API follows current Laravel Cashier conventions: subscriptions have a type (e.g. 'default') and one or more prices.

Create a Subscription

Check Subscription Status

Cancel a Subscription

Resume a Canceled Subscription

Swap Prices

Update Quantity

Multi-Tenancy

Per-Team Credentials (SaaS Applications)

Direct Client Usage

Webhooks

Display webhook URL:

Configure the webhook URL in your Pelecard dashboard to receive payment notifications.

Listen to Webhook Events

Payment Methods

Update Default Payment Method

Check for Payment Method

Transaction History

Artisan Commands

Display Webhook URL

Sync Subscriptions

Events

The package dispatches the following events:

Code Quality Tools

This package uses industry-standard code quality tools to maintain high code standards:

Laravel Pint (Code Formatting)

Rector (Automated Refactoring)

PHPStan (Static Analysis)

Run All Quality Checks

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-pelecard with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3|^8.4|^8.5
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
guzzlehttp/guzzle Version ^7.5
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 yousefkadah/laravel-pelecard contains the following files

Loading the files please wait ...