Looking to hire Laravel developers? Try LaraJobs

laravel-package maintained by paymob

Description
Paymob Payment for Laravel.
Author
Paymob Technical Team
Last update
2024/05/14 13:56 (dev-main)
License
Downloads
470

Comments
comments powered by Disqus

Paymob Laravel Package

Installation

  1. Install the Paymob Laravel Package via paymob/laravel-package
composer require paymob/laravel-package
  1. Publish the Paymob Service Provider using the following command.
php artisan vendor:publish --provider="Paymob\LaravelPackage\PaymobServiceProvider" --tag="paymob"
  1. Customize the process and callback actions that exist in app/Http/Controllers/PaymobController.php file as per your needs.

Configuration

Paymob Account

  1. Login to the Paymob account → Setting in the left menu.
  2. Get the Secret, public, API keys, HMAC and Payment Methods IDs (integration IDs).

Merchant Configurations

  1. Edit the config/paymob.php file and paste each key in its place.
  2. Please ensure adding the integration IDs separated by comma ,. These IDs will be shown in the Paymob payment page.
  3. Copy integration callback URL that exists in config/paymob.php file, replace only the {YourWebsiteURL} with your site domain. Then, paste it into each payment integration/method in Paymob account.

https://{YourWebsiteURL}/paymob/callback

  1. Below URL is considered as your website payment process for Paymob Payment. Just replace the {YourWebsiteURL} with the actual domain.

https://{YourWebsiteURL}/paymob/process