Download the PHP package irfan-chowdhury/bkash-tokenized-checkout without Composer
On this page you can find all versions of the php package irfan-chowdhury/bkash-tokenized-checkout. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download irfan-chowdhury/bkash-tokenized-checkout
More information about irfan-chowdhury/bkash-tokenized-checkout
Files in irfan-chowdhury/bkash-tokenized-checkout
Package bkash-tokenized-checkout
Short Description This is a bkash tokenized payment gateway solution with laravel. Integrate with the payment solution that fits all business needs and Enrich the customers' online payment experience.
License MIT
Informations about the package bkash-tokenized-checkout
Requirements
Installation
You can install the package via composer :
Configuration
After completing the installation, service provider need to register in config/app.php
, add in providers array -
Now run this publish this -
Environement Variable (.ENV)
Guideline to setup bKash
Then are some types of bKash integration. Here we used Tokenized solution
.
Step-1 : Registration
First of all you need a marchant account and then need to register your website there.
- Visit Website : https://pgw-integration.bkash.com
- Setup Account Info
- Product Request
- Product List
- Overview
Step-2 : Sandbox Validation
First of all follow the developer documentation.
Visit the link : https://developer.bka.sh/docs/tokenized-checkout-overview
Our Sandbox Credentials will be look like that -
1. Grand Token
Request URL: {base_URL}/tokenized/checkout/token/grant
Here the base_URL will be - https://tokenized.sandbox.bka.sh/v1.2.0-beta/
Now follow the screenshot given below -
in POSTMAN -
Headers
Body
Response Result -
2. Create Payment
Follow the format -
in Postman -
Header -
Body -
Response
3. Execute Payment
First copy the bKashURL
and then goto the link and make payment from their site first -
For an example, sample link look like-
After creating the payment, now goto postman and follow the format -
in Postman -
Header -
Body -
Response
4. Verify Sandbox Validation
Create Payment Sandbox Test
Execute Payment Sandbox Test
Success Output
5. Live Credentials
After doing all these, finally you will get the Live Credentials.
Step-3 : Setup the bkash credentials in your site
.ENV
Put the value in .env file -
First of all test your application by Sandbox. If all test ok then comment or hide the sandbox credentials and use the live credentials.
Try to run the package in your app
- Please type on the url
your-domain.com/payment/checkout
This is the bkash page. Click on the pay now button.
After Payment done -
Override
1. BkashController
After published, the BkashController
file will be copied in app/Https/Controllers
. You'll see two method
You can override the two methods. The bkashCallback()
indicates that when the payment done, it'll redirect back this method. This time you can customize your other bussiness logic what you want. You'll see a line which is in comment mode. Basically you should customize after this line.
2. routes/web.php
When you customize the controller, you need to use the route also. You can use only these line -
If you need to change the payment/bkash/callback
, you should also update the corresponding data in config/bkash.php
. However, it is recommended not to make these changes.
3. Blade files
You can customize it according to your choice. After publishing, you will find it in the resources/views/vendor/bkash
directory.
Demo
- Go to https://merchantdemo.sandbox.bka.sh/frontend/checkout/version/1.2.0-beta
- Wallet Number: 01770618575
- OTP: 123456
- Pin: 12121
Though you'll get Sandox details from Bkash, but you can try by using these in your app.
References
- Bkash Sandbox API Validation
- Bkash Developer Docs
- Structure follow from - spatie/package-skeleton-laravel
- Coding Style : Laravel Pint