Download the PHP package m74asoud/paymenter without Composer
On this page you can find all versions of the php package m74asoud/paymenter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download m74asoud/paymenter
More information about m74asoud/paymenter
Files in m74asoud/paymenter
Package paymenter
Short Description handle all user payment by wallet and onlinePay
License MIT
Informations about the package paymenter
Paymenter
- handle user payment
- create wallet for user
- prepare online payment by multi bank portal (by default ZarinPal)
Installation
usage
Step 1 : add trait PaymenterAble to User model .
PaymenterAble includes below methods:
-
$user->balance() : Money
balance method return the latest inventory of the user's wallet
-
$user->hasMoney(Money $money): bool
does user hasMoney in wallet
-
$user->getPaymenterTypes(): array
return existing payment method example : wallet - online , ...
-
$user->getOnlinePaymentPortals(): array
return all active bank portals
- $user->pay( PaymenterTDO $paymenterTDO, PaymenterTypeInterface $paymenter_type = null ): bill
- $user->recharge( PaymenterTDO $paymenterTDO, PaymenterTypeInterface $paymenter_type = null ): bill
Step 2 : create a custom class any where and implement PaymenterControllerInterface like below
Step 3 : in your project AppServiceProvider Bind PaymenterControllerInterface to your Custom Class