Download the PHP package jiannius/senangpay without Composer

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

Jiannius SenangPay

A Laravel SDK wrapper for SenangPay, the Malaysian payment gateway. It signs the outbound hash, validates inbound callbacks (regular and recurring), and wires the redirect / callback / webhook routes so you only have to write the controller actions.

Requirements

Installation

The service provider is auto-discovered. Nothing to publish.

Configuration

Add a senangpay entry to config/services.php:

In the SenangPay dashboard (Menu → Settings → Profile → Shopping Cart Integration Link), set Hash Type to SHA256. MD5 is not supported by this package and will silently mismatch every signature.

Routes & the host controller

The service provider registers three routes under the /__senangpay prefix and dispatches them to App\Http\Controllers\SenangpayController in your app. You must create that controller.

Method Path Action Purpose
GET /__senangpay/redirect redirect Return URL — browser lands here after payment
GET /__senangpay/recurring recurring Recurring-payment callback (new/remove/terminate)
POST /__senangpay/webhook webhook Server-to-server callback

Routes are registered with ->withoutMiddleware('web') so the webhook is not blocked by CSRF.

Usage

Redirect to checkout

checkout() returns a Laravel RedirectResponse to SenangPay's hosted payment page. Return it directly from your controller.

amount is normalised to a two-decimal string ("49.90") before hashing — pass it as a plain number, not a pre-formatted string.

Query an order's status (server-to-server)

Returns the first record from SenangPay's query_order_status response.

Normalised payment status

When called inside the redirect or webhook action, getStatus() collapses SenangPay's mixed numeric/string status values into one of success, failed, pending, or null.

Per-tenant credentials at runtime

Setters override the config('services.senangpay.*') defaults for the current request.

Test the connection

Hits query_order_status with a dummy order id — useful for a settings-page "Test credentials" button.

Host-app contracts

These aren't enforced by the package. Get them wrong and integrations silently break.

  1. The webhook action must respond with the literal string OK. No HTML tags, no JSON, no redirect. If SenangPay doesn't see OK in the response body, the callback is treated as failed and the merchant gets an email.
  2. The webhook action must be idempotent on (order_id, status_id). SenangPay retries on a schedule: first call ~5 minutes after the transaction starts (if pending), real-time on any status change, and a final call ~1 hour after the transaction starts. A successful payment will hit your webhook multiple times.
  3. The dashboard hash type must be SHA256. This package does not support MD5.

Reference

SenangPay developer documentation:

License

MIT — see LICENSE.md.


All versions of senangpay with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^13.0
doctrine/dbal Version ^3.6|^4.0
symfony/http-client Version ^7.0|^8.0
laravel/pail Version ^1.0
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 jiannius/senangpay contains the following files

Loading the files please wait ...