Download the PHP package letuananh1873/fpx-payment without Composer
On this page you can find all versions of the php package letuananh1873/fpx-payment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download letuananh1873/fpx-payment
More information about letuananh1873/fpx-payment
Files in letuananh1873/fpx-payment
Package fpx-payment
Short Description A laravel implementation for FPX payment service
License MIT
Homepage https://github.com/jagdish-j-p/fpx-payment
Informations about the package fpx-payment
Very short description of the package
This package provides laravel implementations for Paynet FPX services.
Installation
You can install the package via composer:
Then run the publish command to publish the config files and support controller
This will generate the following files
- The config file with default setup for you to override
fpx.php
- The controller that will receive payment response and any host-to-host events
Http/Controllers/FPX/Controller.php
- The assets in public directory.
- The view file with default html for you to override
payment.blade.php
. Note do not change form action URLfpx.payment.auth.request
.
Setups
-
Add your redirect urls and your Seller and Exchange Id to the
.env
file. -
You can skip this steps, if you have already generated CSR. Visit
fpx/csr/request
path in browser to generate CSR.http://app.test/fpx/csr/request
Fill the form and click on
GENERATE
. On right side textarea will be generated with openSSL code. Download openSSL fromhttps://www.openssl.org/
if you don't have installed it. Run openssl code to generate CSR. Submit this CSR to FPX service provider to get the Exchange Certificates. - After generating your certificates add them to your app. By default, we look for the certificates inside the following directives.
Create
fpx/uat
andfpx/prod
directories instorage/app/public
directory and paste your certificates there. You can find UAT certificate inuat certificate/fpxuat_current.cur
rename it with your Exchange ID and place it in mentioned UAT directory.
You can override the defaults by updating the config file.
- Run migration to add the banks and fpx_transactions table
Usage
- First run the following command to seed the banks list.
you should schedule the fpx:banks Artisan command to run daily:
- Add one the
x-fpx-payment
component with the following attributes
During testing, you can use the test-mode
attribute to override the provided amount to 'MYR 1.00'
-
Handle the payment response in
Http/Controllers/FPX/Controller.php
-
Check Status of all pending transactions using command
-
Check Status of specific transaction using command pass comma saperated order reference ids.
-
Check transaction status and Bank list from Controller
- API for transaction status
Web Integration
You can visit http://app.test/fpx/initiate/payment for the payment flow demo of web integration.
Mobile App Integration
- Append
app
parameter in the URL to check the demo. http://app.test/fpx/initiate/payment/app - This will print JSON response after completion of transaction to integrate with mobile app.
Follow these steps to integrate in mobile application.
Request Details
Open http://app.test/fpx/initiate/payment/app in web view with POST method and POST below parameters.
Response
You must use response
field to display receipt. fpx_response
is added if you need any extra details.
response.status
will be succeeded, failed or pending.
You can also override payment.blade.php
with your custom design to integrate with your layout. but do not change name
attribute of html controls and action
URL of form.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Jagdish-J-P
- AIMEN.S.A.SASI
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.
All versions of fpx-payment with dependencies
illuminate/support Version ^9.9.0
nesbot/carbon Version ^2.48.0
laravelcollective/html Version ^6.2
monarobase/country-list Version ^3.2
eastwest/json Version ^3.0