Download the PHP package dp-soft-co/payments without Composer
On this page you can find all versions of the php package dp-soft-co/payments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dp-soft-co/payments
More information about dp-soft-co/payments
Files in dp-soft-co/payments
Package payments
Short Description Payment helper for Paypal, Paymob, Kashier, Hyperpay, Fawry and more - Forked from nafezly/payments with Kashier Payment Sessions API fix
License MIT
Informations about the package payments
Dpsoft Payment Gateways
A Laravel package for integrating multiple payment gateways with a unified API. Supports 19+ gateways including PayPal, Paymob, Kashier, Fawry, Fawaterk, HyperPay, Thawani, Tap, Opay, Paytabs, Binance, PerfectMoney, NowPayments, Payeer, Telr, Clickpay, MyFatoorah, Stripe, and E-Wallets.

Supported Gateways
| Gateway | Key | Modes | Notes |
|---|---|---|---|
| PayPal | paypal |
Sandbox / Live | REST API v2 with redirect & button checkout |
| PayPal Buttons | paypal_button |
Sandbox / Live | JS SDK button integration |
| PayMob | paymob |
Test / Live | Card payments with redirect & pixel checkout |
| PayMob Wallets | paymob_wallet |
Test / Live | Vodafone Cash, Orange Money, Meza Wallet, Etisalat Cash, We Cash |
| Kashier | kashier |
Test / Live | Payment Sessions API with iframe |
| Fawry | fawry |
Test / Live | Popup / inside page / side page |
| Fawaterk | fawaterk |
Test / Live | API v3 — OAuth + hosted checkout & iframe |
| HyperPay | hyperpay |
Test / Live | Credit, MADA, Apple Pay |
| Thawani | thawani |
Test / Live | Oman-based gateway |
| Tap | tap |
Test / Live | Multi-currency |
| Opay | opay |
Test / Live | Egypt & Nigeria |
| Paytabs | paytabs |
Test / Live | Multi-region |
| Binance Pay | binance |
Live | Crypto payments |
| PerfectMoney | perfectmoney |
Live | SCI form-based |
| NowPayments | nowpayments |
Live | Crypto invoices |
| Payeer | payeer |
Live | Multi-currency e-wallet |
| Telr | telr |
Test / Live | UAE-based gateway |
| Clickpay | clickpay |
Test / Live | Saudi-based |
| MyFatoorah | myfatoorah |
Test / Live | Multi-country (EG, SA, AE, QA, KW) |
| Stripe | stripe |
Test / Live | Checkout Sessions |
Installation
Publish Vendor Files
Configuration
All gateway settings are driven by environment variables. After publishing, edit config/dpsoft-payments.php and add the keys you need to your .env.
PayMob
Fawaterk (API v3)
Fawaterk v3 uses OAuth client credentials for API calls and Vendor API Key for hash signing (iframe & webhooks).
Endpoints used:
POST /api/v3/createTransaction— create payment (OAuth Bearer token)POST /api/v3/getTransactionData— verify payment (OAuth Bearer token)POST /oauth/token— obtain access token (client credentials grant)
Webhook hash verification:
- Paid webhook:
transactionHashKey=HMAC-SHA256("TransactionId={id}&TransactionKey={key}&PaymentMethod={method}", vendor_api_key) - Failed webhook:
hashKey= same formula as above - Cancel webhook:
hashKey=HMAC-SHA256("referenceId={refId}&PaymentMethod={method}", vendor_api_key) - Legacy v2 webhooks still supported via
hashKeywithInvoiceId/InvoiceKey
Iframe hash:
hashKey=HMAC-SHA256("Domain={your_domain}&ProviderKey={provider_key}", vendor_api_key)- Uses
fawaterkCheckoutV2()andfawaterkPlugin.js
Kashier
HyperPay
Fawry
PayPal
Stripe
Thawani
Tap
Opay
Paytabs
Binance Pay
NowPayments
Payeer
PerfectMoney
Telr
Clickpay
MyFatoorah
How To Use
Standard Controller Example
The following Laravel controller pattern works with every gateway supported by the package. Store the gateway class name used to create the invoice so the callback can use the same gateway. Replace Invoice, the payment view, and success/failure routes with your application equivalents.
Render gateway HTML only when it comes directly from the package response:
Register the verification route:
CSRF Protection
Payment gateways send POST callbacks from an iframe or external page and will not include the Laravel CSRF token. You must exclude the verification route from CSRF validation:
-
Laravel 11 (
bootstrap/app.php): - Laravel 10 (
app/Http/Middleware/VerifyCsrfToken.php):
Adjust the wildcard to match your actual route path and any language prefix (e.g. *payments/verify*).
Gateway-specific source values
| Gateway | source values |
|---|---|
kashier |
Comma-separated allowed methods: card,wallet, card,bank_installments,wallet,fawry, etc. Defaults to card,wallet. |
hyperpay |
CREDIT, MADA, or APPLE. Required to select the matching HyperPay entity ID and payment brand. |
Most other gateways do not use source; passing null is valid.
Test Cards
Fawaterk (Staging)
| Brand | Card Number | Expiry | CVV | Result |
|---|---|---|---|---|
| Mastercard | 5123450000000008 |
12/26 | 100 | Success |
| Visa | 4005 5500 0000 0001 |
12/26 | 100 | Success |
| Mastercard | 5543474002249996 |
05/26 | 123 | Decline |
| Visa | 4222 0000 0672 4235 |
12/26 | 123 | Decline |
Other Gateways
License
MIT License. See LICENSE file for details.
All versions of payments with dependencies
laravel/framework Version >=6.0
paypal/paypal-server-sdk Version ^2.3
ext-json Version *
ext-curl Version *