1. Go to this page and download the library: Download bpotmalnik/lunar-tpay library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Bpotmalnik\LunarTpay\Events\PaymentConfirmed;
use Bpotmalnik\LunarTpay\Events\PaymentFailed;
Event::listen(PaymentConfirmed::class, function (PaymentConfirmed $event) {
$event->order;
$event->tpayPayment;
});
use Bpotmalnik\LunarTpay\Contracts\TpayClientContract;
use Bpotmalnik\LunarTpay\Testing\FakeTpayClient;
$fake = new FakeTpayClient;
$this->app->instance(TpayClientContract::class, $fake);