ehabtalaat / upayment
This is a payment gateway package for integrating UPayment
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- php: >=8.2
- composer-plugin-api: ^2.0
- guzzlehttp/guzzle: ^7.0
README
A simple and lightweight package to integrate with the UPayment payment gateway in PHP (Laravel compatible).
✅ Created for learning and experimenting with package development — feel free to use and contribute.
🚀 Installation
composer require ehabtalaat/upayment
📖 Usage
use Ehabtalaat\Upayment\Gateway\UPaymentGateway; use Ehabtalaat\Upayment\Services\PaymentService; $config = [ "token" => "YOUR_TOKEN", "url" => "https://secure.upayment.io/payment-request", "currency" => "KWD", // or any supported currency ]; $gateway = new UPaymentGateway($config); $paymentService = new PaymentService($gateway); $payload = [ "name" => "Company XYZ", // Example company name "email" => "contact@companyxyz.com", // Example company email "mobile" => "50000000", // Example phone number "description" => "payment description", // Payment description "orderId" => "123456789", // Example order ID "amount" => 1000.00, // Example tender bond amount "returnUrl" => "https://yourdomain.com/payment/success", // Replace with your actual success URL "cancelUrl" => "https://yourdomain.com/payment/fail", // Replace with your actual fail URL "notificationUrl"=> "https://yourdomain.com/payment/notify", // Replace with your actual notification URL ]; $response = $paymentService->charge($payload);