Download the PHP package fatoorahpayment/gatewayintegration without Composer
On this page you can find all versions of the php package fatoorahpayment/gatewayintegration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fatoorahpayment/gatewayintegration
More information about fatoorahpayment/gatewayintegration
Files in fatoorahpayment/gatewayintegration
Package gatewayintegration
Short Description package created for crazy idea company to handle the gateway integration for myfatoorah
License MIT
Homepage https://github.com/crazyideaco/fatoorahPackage
Informations about the package gatewayintegration
fatoorahPackage
composer require fatoorahpayment/gatewayintegration
Guide of use
-
config file
-
token from the .env
-
api endpoints
config file
please run this command to publish the config file that has essential keys
php artisan vendor:publish --tag=crazyfatoorahpackage-config php artisan vendor:publish --tag=crazyfatoorahpackage-views
-
after you publish your config file you will find key
test_modeits value istrueas default you can change it tofalseif you want to turn to live mode - there are
api_token_keykey this key will have your token from myfatoorah account it have defualt token for test you can overwrite it any time later for your live token
please remember to add the key
MYFATOORAH_API_TOKEN_KEYto your .env file in your project
api endpoints
-
for the Gateway integreation
there are two main endpoint
- Call
initial_data()endpoint (optional step) => post request, -
when you call this endpoint you have to send this keys request
- Call
execute_payment()endpoint: => post request - the request you have to send is
- Call
steps for creating this package
-
create new laravel project
-
packages folder
-
composer init
-
your composer.json file structure
-
your package structure
-
source code
-
publish the package
-
submit your package to packagist.org
references
-
publish-laravel-packagist
-
laravel-docs-packages
-
myfatoorah-docs
-
git tags references
-
write README file tutorial
some useful commands
- git tag // fetch all tags
- git tag {tag-name ex. v1.0.1} // create new tag
- git tag -d {tag name or many tags } delete one or many tags
- git push origin {tag name} // to push the tag you created after commit your updates
create laravel project
create your required version of laravel framework project, its preferable to be the latest version
packages folder
inside the base path of the created project
- create packages folder
- inside it create your prefered vendor name {any name you'd like } (this will be the vendor name of the package that composer will be creating )
- inside the vendor folder create your package folder {give it any name you'd prefer}
composer init
- after finishing previous steps navigate to your package folder and run this command composer init
-
this command will define the composer inside your package folder
- and will create src folder , your specific composer.json for this package
- then will ask you for details like your package name , description, etc
your composer.json file structure
your composer.json file should be like something like this
your package structure && source code
- it should be inside src folder
- create your prefered package structure that you will build it may be something like this
or what ever structure your want
- inside this sturcture your put your source code of the package
publish the package
-
inside the package folder run the git command git init
- create your git repo whether it's github, gitlab, gitbucket ,etc
- commit your code
- push it
-
after pushing your package create tag based on your package version git push --tags
-
after pushing your tags goto your repo and create release based on your tag
-
keep in mind that packagist keep track of the releases from your github and if you want to update your package you need to push to the main and your tag of the release
-
also the version key in your package composer.json file need to be the same as the release title
-
tags dont't accept updates so each update to the package you will creat tag for it
-
please keep this in your mind the tags are not updateable so if you want to update the package , so after implementing your updates remember to update the
versionkey in your composer.json file
submit your package to packagist.org
make sure your git repo has only the code or folders inside your package-name folder
then login to the packagist then submit your repo clone link