asagiri-moe / xendit-wrapper
A Laravel Wrapper for Xendit Payment Gateway (ID/PH)
0.0.1
2022-06-24 11:30 UTC
Requires
- php: ^7.4|^8.0
- illuminate/support: ^8.0
- xendit/xendit-php: ^2.17
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-03-22 14:22:02 UTC
README
A Laravel Wrapper for Xendit Payment Gateway (ID/PH)
Installation
You can install the package via composer:
composer require asagiri-moe/xendit-wrapper
then publish the config file
php artisan vendor:publish --provider="AsagiriMoe\XenditWrapper\XenditWrapperServiceProvider"
in your .env
XENDIT_SECRET_KEY="" XENDIT_REDIRECT_URL="" XENDIT_CURRENCY=""
.env | Description | Accepted Value |
---|---|---|
XENDIT_SECRET_KEY="" |
Your Xendit Generated API Key. For guide how to generate API KEY: Click Here. | |
XENDIT_REDIRECT_URL="" |
Custom redirect url | |
XENDIT_CURRENCY="" |
Currency used for the transaction in ISO4217, Choose 1 which currency will you use in you apps | "IDR" ,"PHP" |
Usage
Example of usage
use AsagiriMoe\XenditWrapper\XenditWrapper; public function sendEWallet() { $xendit = new XenditWrapper; $callback = $xendit->createEWalletPayment($idPayment, $typeEWallet, $amount, $phoneNumber, $metadata); return $callback; }
Avaliable Methods and Example
E-Wallets
Create E-Wallet Charge
$callback = $xendit->createEWalletPayment($idPayment, $typeEWallet, $amount, $phoneNumber, $metadata);
QR Code (QRIS)
Create a QR Code (Currently only available in ID / Indonesia)
$callback = $xendit->createQRPayment($idPayment, $amount, $callbackUrl);
Testing
composer test
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 gfdioni@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.