<?php

require_once __DIR__ . "/MTNMoMo.php";


class MTNPayment
{

    private MTNMoMo $momo;


    public function __construct()
    {
        $this->momo = new MTNMoMo();
    }


    /**
     * Send MTN Payment Request
     */
    public function pay(
        string $phone,
        float $amount,
        string $message = "SmartPrint Payment"
    ): array
    {

        return $this->momo->requestToPay(

            $phone,
            $amount,
            "",
            $message,
            "SmartPrint Printing Service"

        );

    }



    /**
     * Check Payment
     */
    public function status(string $referenceId): array
    {

        return $this->momo->checkPaymentStatus(
            $referenceId
        );

    }


}