public function startOneTimeTransaction($amount, $email, $plan = '')
    {
        $oneTimeTransaction = OneTimeTransaction::make(
            $amount,
            $email,
            $plan instanceof Plan ? $plan->get('plan_code') : $plan
        );
        $oneTimeTransaction->setTransactionResource($this->getTransactionResource());
        $transaction = $oneTimeTransaction->initialize();

        if ($transaction instanceof \Exception) {
            throw $transaction;
        }

        return $transaction;
    }
public function startOneTimeTransaction($amount, $email, $plan = '')
    {
        $oneTimeTransaction = OneTimeTransaction::make(
            $amount,
            $email,
            $plan instanceof Plan ? $plan->get('plan_code') : $plan
        );
        $oneTimeTransaction->setTransactionResource($this->getTransactionResource());
        $transaction = $oneTimeTransaction->initialize();

        if ($transaction instanceof \Exception) {
            throw $transaction;
        }

        return $transaction;
    }
public function startOneTimeTransaction ( $ amount , $ email , $ plan = '' ) { $ oneTimeTransaction = OneTimeTransaction :: make ( $ amount , $ email , $ plan instanceof Plan ? $ plan -> get ( 'plan_code' ) : $ plan ) ; $ oneTimeTransaction -> setTransactionResource ( $ this -> getTransactionResource ( ) ) ; $ transaction = $ oneTimeTransaction -> initialize ( ) ; if ( $ transaction instanceof \ Exception ) { throw $ transaction ; } return $ transaction ; }
Init a one time transaction to get payment page url.

@param $amount
@param $email
@param string $plan

@throws \Exception|mixed|Exceptions\PaystackInvalidTransactionException

@return \Exception|mixed|Exceptions\PaystackInvalidTransactionException
Init a one time transaction to get payment page url .