reactmore-tech / mayar-php-sdk
About [unofficial] Mayar.id Payment API Client for PHP | https://mayar.id
Fund package maintenance!
reactmore
react-more-78458.myr.id/support
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.0.1
- psr/http-message: ~1.0
Requires (Dev)
- kint-php/kint: ^5.0
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.7.2
This package is auto-updated.
Last update: 2025-02-21 15:57:47 UTC
README
Account
You need api key to used this API register in Mayar.id
Installation
composer require reactmore-tech/mayar-php-sdk
Usage
require 'vendor/autoload.php'; $mayarId = new \ReactMoreTech\MayarHeadlessAPI\MayarProvider(); $mayarId->setProduction(false); $mayarId->apiToken("xxxx"); $mayarId->webhookToken("xxxxxx");
OR
$mayarId = new \ReactMoreTech\MayarHeadlessAPI\MayarProvider([ 'apiToken' => "xxxxxxxxxxxxx", 'webhookToken' => "xxxxxxxxxxx", 'isProduction' => false, ]);
Mayar Headless API Example Method in WIKI
See Example on WIKI:
- Product
- Invoice
- Request Payment
- Installment
- Discount & Coupon
- Cart
- Customer
- Transaction
- Webhook
- Software License Code
- SaaS Membership License
Note that this repository is currently under development, additional classes and endpoints being actively added.
Contributions
We welcome community contributions to this repository. Please refer to the contribution guidelines to get started.
Licensing
Licensed under the MIT license. See the LICENSE file for details.