PHPackages                             rarashed/payplus-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. rarashed/payplus-sdk

ActiveComposer-plugin[Payment Processing](/categories/payments)

rarashed/payplus-sdk
====================

payplus gateway sdk for payment pages

02PHP

Since Nov 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/RaRashed/payplus-sdk)[ Packagist](https://packagist.org/packages/rarashed/payplus-sdk)[ RSS](/packages/rarashed-payplus-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Payplus Payment SDK
===================

[](#payplus-payment-sdk)

This PHP SDK allows you to integrate Payplus payment gateway easily, enabling payment link generation and payment processing.

Installation
------------

[](#installation)

### Prerequisites

[](#prerequisites)

Make sure that you have PHP 7.4 or higher installed on your system, along with Composer for dependency management.

1. **Install Composer** if you haven't already:

    Follow the official [Composer installation guide](https://getcomposer.org/download/) for your system.
2. **Install the SDK**:

    In your project directory, run the following command to install the SDK via Composer:

    ```
    composer require rarashed/payplus-sdk
    ```

    \#OR

    ```
    composer require rarashed/payplus-sdk --no-plugins
    ```

    \#To configure the SDK, provide your Payplus API credentials and set the appropriate URLs for testing or production environments.

    ```
    use RaRashed\PayplusSdk\Payplus;
    ```

\#Define constants for currency and URLs

```
const CURRENCY = "ILS"; // Payment currency
const TEST = "https://restapidev.payplus.co.il/api/v1.0/PaymentPages/generateLink"; // Test URL
const PRODUCTION = "https://restapi.payplus.co.il/api/v1.0/PaymentPages/generateLink"; // Production URL
```

Configuration array
===================

[](#configuration-array)

```
$config = [
    'payment_page_uid' => 'your_payment_page_uid', # Your unique Payment Page ID
    'api_key' => 'your_api_key',                    # Your Payplus API Key
    'secret_key' => 'your_secret_key',              # Your Payplus Secret Key
    'payment_url' => PRODUCTION                     # API Endpoint URL (use TEST for sandbox environment)
];
```

Instantiate the Payplus SDK with the configuration
==================================================

[](#instantiate-the-payplus-sdk-with-the-configuration)

```
$payplus = new Payplus($config);
```

\#After configuring the SDK, you can send payment data to the Payplus API to generate a payment link. Here's an example:

```
$paymentData = [
    "payment_page_uid" => $config['payment_page_uid'], // Required: Payment Page UID
    "expiry_datetime" => "30",                        // Payment link expiry time (in minutes)
    "refURL_success" => "https://webhook.site",       // Redirect URL upon successful payment
    "refURL_failure" => "https://webhook.site",       // Redirect URL upon failed payment
    "refURL_callback" => "https://webhook.site",      // Callback URL for payment status updates
    "customer" => [
        "customer_name" => "John Doe",                // Customer's full name
        "email" => "john.doe@example.com",            // Customer's email address
        "phone" => "1234567890"                       // Customer's phone number
    ],
    "items" => [
        [
            "name" => "Transaction Item",             // Item description
            "quantity" => 1,                          // Quantity of the item
            "price" => 100,                           // Item price
            "vat_type" => 0                           // VAT type (0 = no VAT)
        ]
    ],
    "amount" => 100,                                  // Total transaction amount
    "payments" => 1,                                  // Number of payments to be processed
    "currency_code" => CURRENCY,                      // Payment currency (e.g., ILS for Israeli Shekel)
    "sendEmailApproval" => true,                      // Whether to send an approval email
    "sendEmailFailure" => false                       // Whether to send a failure email
];
```

\#Process the payment request and receive a response

```
$response = $payplus->processPayment($paymentData);
```

Handle the response
===================

[](#handle-the-response)

```
if (is_string($response)) {
    // Redirect the user to the generated payment page link
    header("Location: " . $response);
    exit;
} elseif (is_array($response) && $response['status'] === 'error') {
    // Handle error (e.g., display or log the error)
    echo json_encode($response);
}
```

\#success and callback url will pass status and transaction id

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ebec0c4630ffd16526e0d023fa0ad02469679c150628b49729aae6f5092c3b4?d=identicon)[RaRashed](/maintainers/RaRashed)

---

Top Contributors

[![RaRashed](https://avatars.githubusercontent.com/u/45737375?v=4)](https://github.com/RaRashed "RaRashed (7 commits)")

### Embed Badge

![Health badge](/badges/rarashed-payplus-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/rarashed-payplus-sdk/health.svg)](https://phpackages.com/packages/rarashed-payplus-sdk)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
