App\Ninja\PaymentDrivers\CheckoutComPaymentDriver::createTransactionToken PHP Method

createTransactionToken() public method

    public function createTransactionToken()
    {
        $response = $this->gateway()->purchase(['amount' => $this->invoice()->getRequestedAmount(), 'currency' => $this->client()->getCurrencyCode()])->send();
        if ($response->isRedirect()) {
            $token = $response->getTransactionReference();
            $this->invitation->transaction_reference = $token;
            $this->invitation->save();
            return $token;
        }
        return false;
    }