abdulbaset/paymob-payment-gateway

The Paymob Payment Gateway PHP package is a convenient integration for developers seeking to integrate Paymob's payment services into their PHP applications. This package streamlines the process of initiating and managing payments, offering support for various payment methods, including mobile walle

2.0.0 2023-12-23 04:00 UTC

This package is auto-updated.

Last update: 2024-08-23 05:29:06 UTC


README

Overview

The Paymob Payment Gateway PHP package is a convenient integration for developers seeking to integrate Paymob's payment services into their PHP applications. This package streamlines the process of initiating and managing payments, offering support for various payment methods, including mobile wallets and card payments.

Features

  • Mobile Wallet Integration: Initiate payments with popular mobile wallets.
  • Card Payments: Seamless integration for card payments.
  • Authentication: Obtain secure API tokens for communication with Paymob API.
  • Flexible Configuration: Easily configure integration settings.
  • Order Management: Efficiently manage order details for payment processing.

Installation

Use Composer to install the package:

composer require abdulbaset/paymob-payment-gateway

Usage

after installing the package you should include the namespace, see the following code:

use Abdulbaset\PaymentGateways\Paymob\PaymobPaymentMethod;

if you want to get the card url for payment, see the following code:

$invoice = new PaymobPaymentMethod();
$invoice->setApiKey($API_Key);
$invoice->setAmountCents(10.00 * 100);
$invoice->getCardPaymentsURL('0123456', '123456');
  • for example, Screenshot 1

if you want to get the mobile wallet url for payment, see the following code:

$invoice = new PaymobPaymentMethod();
$invoice->setApiKey($API_Key);
$invoice->setAmountCents(10.00 * 100);
$invoice->getMobileWalletsURL('0123456','01010101010');
  • for example, Screenshot 1

License

This Paymob Payment Gateway PHP Package is open-source software licensed under the MIT License.