PHPackages                             hyperpay/payment - 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. hyperpay/payment

ActiveLibrary

hyperpay/payment
================

212.5k↑250%2PHP

Since Jul 28Pushed 3y agoCompare

[ Source](https://github.com/HyperpayOpenSource/laravel-package)[ Packagist](https://packagist.org/packages/hyperpay/payment)[ RSS](/packages/hyperpay-payment/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![](https://camo.githubusercontent.com/11a0ec2206d4af7a1c6ef67a684887844eb1fb6273137c1c470683a24d10a9ef/68747470733a2f2f7777772e68797065727061792e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032302f30342f63726f707065642d3031312d333030783135352e706e67) ](https://hyperpay.com)

Copy and Pay
============

[](#copy-and-pay)

( Payment package ) Copy and pay package for Laravel &gt;= 7

#### requirements

[](#requirements)

- composer version &gt;= 2.6
- Laravel version &gt;= 7

#### features

[](#features)

- Handle Payment process
- Easy to use

#### supported brands

[](#supported-brands)

[![](https://camo.githubusercontent.com/81831b1f9796143d7152df1d9ad18a51401c0a4bd40513341cdfc61950ceb24f/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f7468756d622f322f32612f4d6173746572636172642d6c6f676f2e7376672f32303070782d4d6173746572636172642d6c6f676f2e7376672e706e67)](https://camo.githubusercontent.com/81831b1f9796143d7152df1d9ad18a51401c0a4bd40513341cdfc61950ceb24f/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f7468756d622f322f32612f4d6173746572636172642d6c6f676f2e7376672f32303070782d4d6173746572636172642d6c6f676f2e7376672e706e67)

[![](https://camo.githubusercontent.com/58f612af0b28ca750af9bc40da6169865277e62d462f16fe6e36b7258ace4318/68747470733a2f2f7777772e736d617274656e657267796465636973696f6e732e636f6d2f75706c6f61642f696d616765732f636f6d70616e795f696d616765732f616d65726963616e5f657870726573732e6a7067)](https://camo.githubusercontent.com/58f612af0b28ca750af9bc40da6169865277e62d462f16fe6e36b7258ace4318/68747470733a2f2f7777772e736d617274656e657267796465636973696f6e732e636f6d2f75706c6f61642f696d616765732f636f6d70616e795f696d616765732f616d65726963616e5f657870726573732e6a7067)

[![](https://camo.githubusercontent.com/a6a76744f2cc0c99f033c13f36fb37a8cab3e24fdc5dc9a221723eda4bdc699b/68747470733a2f2f656e637279707465642d74626e332e677374617469632e636f6d2f696d616765733f713d74626e3a414e64394763525f46725461616147456b3965554c5170623335355378744146697a47356a6c654271705f3171386a3264674d7871664854)](https://camo.githubusercontent.com/a6a76744f2cc0c99f033c13f36fb37a8cab3e24fdc5dc9a221723eda4bdc699b/68747470733a2f2f656e637279707465642d74626e332e677374617469632e636f6d2f696d616765733f713d74626e3a414e64394763525f46725461616147456b3965554c5170623335355378744146697a47356a6c654271705f3171386a3264674d7871664854)

[![](https://camo.githubusercontent.com/b5f0ef237ef1277a3c18ab3de5dc18c5457d9ff7f4a869013384031e209a43c6/68747470733a2f2f6b73616578706174732e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031382f30332f6d6164612d636172642e6a7067)](https://camo.githubusercontent.com/b5f0ef237ef1277a3c18ab3de5dc18c5457d9ff7f4a869013384031e209a43c6/68747470733a2f2f6b73616578706174732e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031382f30332f6d6164612d636172642e6a7067)

### Resources

[](#resources)

- [ACI Documentation ](https://wordpresshyperpay.docs.oppwa.com/tutorials/integration-guide)
- [Laravel 7 Documentation ](https://laravel.com/docs/7.x)

### Indexes

[](#indexes)

- [Installation ](#installation)
- [Basic Use](#basic-use)
- [customization](#customization)
- [Handel Result](#handel-result)

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

[](#installation)

```
composer require hyperpay/payment
```

Publish configuration files

```
php artisan vendor:publish --provider='Hyperpay\Payment\HyperpayServiceProvider'
```

configure the payments credentials in **config/payments.php**

```
project
|
└───config
   │   payments.php

```

```
return [

"environment"  =>  "test",

"gatewayes"  => [
	"card"  => [
		"enabled"  =>  false,
		'entity_id'  =>  "",
		"access_token"  =>  "",
		"currency"  =>  "SAR",
		"transaction_type"  =>  "DB",
		"brands"  =>  "VISA MASTER AMEX",
		"label"  =>  "Cridet Card",
	],
	"mada"  => [
		"enabled"  =>  false,
		'entity_id'  =>  "",
		"access_token"  =>  "",
		"currency"  =>  "SAR",
		"transaction_type"  =>  "DB",
		"brands"  =>  "MADA",
		"label"  =>  "Mada Debit Card",
		],
	]
	];
```

Fill **entity\_id** and **access\_token** with credential you provided with Define supported brands

```
"card"  =>  [
	"brands"  =>  "VISA MASTER AMEX",
```

> **Make sure to write all brands with CAPITAL letter and separated with space " "**

### Enable/Disable

[](#enabledisable)

By default all payment methods are disabled , to enable payment method just change **enabled** to **true**

```
...
"card"  =>  [
	"enabled"  =>  true,
....
```

Basic Use
---------

[](#basic-use)

Inside any blade template you can call payment component

```

```

**component attributes**

- amount ( Require ) : total order amount
- merchantTransactionId ( Require ) : typically represent **order\_id**
- firstName ( Optional ) : customer first name
- lastName ( Optional ) : customer last name
- email( Optional ) : customer email
- street ( Optional ) : customer street address
- city( Optional ) : customer city address
- country( Optional ) : customer country address
- zip( Optional ) : customer zip code

**passing data**

```

```

customization
-------------

[](#customization)

```
...
"card"  =>  [
	"label"  =>  "As you want to dispaly to customers",
....
```

**Translation**Our package can detect your app locale and automatically translate components If you want to customize translation edit translation file from

```
project
|
└───resources
   |
   └─── lang
	   |
	   └─── ar
		 | payment.php
	   |
	   └─── en
		| payment.php

```

```
return [
	"Mada Debit Card"  =>  "بطاقة مدى البنكية",
	"Cridet Card"  =>  "بطاقة ائتمان",
	"Pay_Again_?"  =>  "دفع مرة اخرى ؟"
];
```

Handel Result
-------------

[](#handel-result)

**Success**To handle success status you will write your logic inside *success* method in :

```
project
|
└───app
   |
   └─── Http
	   |
	   └─── Controllers
			 | PaymentController.php

```

```
public  function  success($result)
{
	return  $result;
}
```

here where you can handle success status of transaction like *( rediract , update database , etc. )*

all data you need will be in **$result** argument

```
{
"id": "8ac7a49f82323dc60182350fb142773d",
"paymentType": "DB",
"paymentBrand": "VISA",
"amount": "95.00",
"currency": "SAR",
"descriptor": "9751.3590.4583 new channel Ahmad",
"merchantTransactionId": "5",
"result": {
  "code": "000.000.000",
  "description": "Transaction succeeded"
},
"resultDetails": {
  "ExtendedDescription": "Successfully processed"
},
"buildNumber": "a94641688adf253dbf3145d2dd0a203bbeeb50aa@2022-07-22 12:35:29 +0000",
"timestamp": "2022-07-25 11:13:20+0000",
"ndc": "777D1BE1744BEFD249DA95017DF97957.uat01-vm-tx03"
}
```

**failed**By default when transaction failed the customer will redirect back to payment page with the error message

if you want to change this approach create a method call ***failed()*** with **$result** argument in PaymentController.php

```
public  function  failed($result)
{
	Session::flash('alert'  ,  $result['result']['description']);
	return  back();
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

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/57dadae5f791fd8dcb4054bdd34643396338b910b52567e6f7348b33f4bce50c?d=identicon)[Hyper-wadi](/maintainers/Hyper-wadi)

### Embed Badge

![Health badge](/badges/hyperpay-payment/health.svg)

```
[![Health](https://phpackages.com/badges/hyperpay-payment/health.svg)](https://phpackages.com/packages/hyperpay-payment)
```

PHPackages © 2026

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