Download the PHP package baselrabia/paymob without Composer
On this page you can find all versions of the php package baselrabia/paymob. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download baselrabia/paymob
More information about baselrabia/paymob
Files in baselrabia/paymob
Package paymob
Short Description A Package to help with Paymob integration
License MIT
Homepage https://github.com/baselrabia/paymob
Informations about the package paymob
Laravel PayMob
Paymob integration for laravel.
Currently Supported
Installation
-
install the package
- publish the package assets with
Config
- config/paymob.php
- Update your
.env
file
Setup
-
add the package routes to your
routes/web.php
ex. - add
Billable
to the model you will be billing. -
next add
getBillingData()
which should return all the required fields for the order creation, check paymob requirements for more info.- all the optional fields has already been taken care of.
Usage
Normal
-
update
controller
with your own controller, which should have 3 methodsyou can check
ApiDummyController
for a more detailed overview.type @method return GET checkOut
returns the view where the user will press the checkout btn POST process
get the selected payment type & make a request to paymob server GET complete
check for the transaction hmac & save it to your server, for more info check. -
test Card
MasterCard
Key Value Card Number 2223000000000007 Cardholder Name Test Account Expiry Month 01 Expiry Year 39 CVV 100
Refund
-
all you need to is to call
PayMob::refund
and pass to it thetransaction_id
&amount_in_pounds
that will be refunded, ex.for more info check