Download the PHP package sofizpay/sofizpay-php-sdk without Composer

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

SofizPay Logo

SofizPay PHP SDK

The official PHP library for secure digital payments on the SofizPay platform.

[![Packagist Version](https://img.shields.io/packagist/v/sofizpay/sofizpay-php-sdk.svg)](https://packagist.org/packages/sofizpay/sofizpay-php-sdk) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![PHP Version](https://img.shields.io/badge/PHP-7.4%2B-blue.svg)](https://www.php.net/)

๐Ÿ“‹ Table of Contents


๐ŸŒŸ Overview

The SofizPay PHP SDK provides a comprehensive interface for integrating DZT digital payments into your PHP applications. It supports on-chain Stellar payments, CIB/Dahabia bank deposits, and digital service recharges (Missions).

Key Benefits:


๐Ÿ“ฆ Installation

Composer

Requirements:


๐Ÿš€ Quick Start


๐Ÿ”ง Core Methods

getBalance(string $publicKey)

Returns the current DZT balance for a given Stellar account.


submit(array $data)

Submits a DZT payment to the Stellar network.

โš ๏ธ Memo Truncation: Memos longer than 28 characters are automatically truncated.


getTransactions(string $publicKey, ?int $limit, ?string $cursor)

Fetches exhaustive transaction history via Stellar. Includes payments, trustlines, and account creation.


searchTransactionsByMemo(string $publicKey, string $memo, int $limit)

Performs a case-insensitive search over recent transactions.


๐Ÿ“ฑ Digital Services (Missions)

Mission APIs allow users to spend DZT on real-world digital services. All calls require encrypted_sk.

Phone Recharge

Internet Recharge (Idoom 4G)

Game Top-up (FreeFire, PUBG)

Bill Payment

Operation History & Details

Get Available Products

[!TIP] Use the product name for the offer field and the product amount for the amount field.


๐Ÿฆ Bank Integration (CIB & EDAHABIA)

Generate secure Dahabia/CIB bank payment links with optional real-time webhook callbacks.


๐Ÿงช Sandbox Environment & Mock Cards

The SofizPay Sandbox simulates the SATIM CIB/EDAHABIA payment system without connecting to real bank accounts.

Sandbox Test Cards

Use the following test credentials on the sandbox payment page:

Card Number Expiry CVV Cardholder Name Result Note
6280581001234567 12/28 123 TEST SUCCESS โœ… Approved Use OTP 123456
6280581009876543 12/29 456 TEST SUCCESS TWO โœ… Approved Use OTP 123456
6280581005555555 06/28 999 TEST DECLINED โŒ Declined by issuer Tests card refusal
6280581004444444 09/28 444 TEST INSUFFICIENT โŒ Insufficient funds Tests insufficient balance
6280581003333333 03/21 333 TEST EXPIRED โŒ Expired card Tests expired card
6280581002222222 11/28 222 TEST TIMEOUT โŒ Timeout Tests transaction timeout

[!TIP] OTP Code: Always enter 123456 on the OTP page for approved tests. Entering any other OTP triggers an Invalid OTP error.


๐Ÿ”” Webhooks & Signature Verification

When a payment succeeds or fails, SofizPay delivers a server-to-server asynchronous HTTP POST event notification (cib.payment.updated) to your registered webhook_url.

Webhook Event Payload

Verifying Webhooks (verifyWebhookPayload)

Always verify the webhook before processing payments in your database.

โš ๏ธ Use verifyWebhookPayload, not only verifyWebhookSignature. The RSA signature covers only the message string ("cib" . payment_status . amount . order_number, e.g. cibsuccess1500005965287001). The top-level fields such as payment_status, amount and order_number are not signed by themselves. verifyWebhookPayload checks the signature and that those fields match the signed message, so they can be trusted.

Recommended hardening:


๐Ÿ”„ Return URL vs. Webhook Notifications

Feature Return URL (return_url) Webhook (webhook_url)
Trigger mechanism Client browser redirect Server-to-server direct HTTP POST
Reliability Can fail if user closes browser / network drops Guaranteed server delivery
Security Susceptible to tampering Cryptographically signed (RSA-2048)
Recommended use Display "Thank you" screen Update database, activate subscriptions

๐Ÿ”ด Real-time Transaction Streaming

The PHP SDK allows you to start/stop transaction polling (simulated streaming).

Note: Real-time streaming is best handled via the JavaScript SDK in the browser or via Node.js for production environments.


๐Ÿ“ค Response Format

All methods return an associative array:


๐Ÿ›ก๏ธ Security Best Practices


๐Ÿ“ž Support


License

MIT ยฉ SofizPay Team

Built with โค๏ธ for PHP developers | Version 1.0.2


All versions of sofizpay-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
soneso/stellar-php-sdk Version ^1.1
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 sofizpay/sofizpay-php-sdk contains the following files

Loading the files please wait ...