asagiri-moe/xendit-wrapper

A Laravel Wrapper for Xendit Payment Gateway (ID/PH)

0.0.1 2022-06-24 11:30 UTC

This package is auto-updated.

Last update: 2024-11-22 13:35:38 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

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=""

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.