<?php

namespace Planaday\Payment\Interfaces;

use Planaday\Entities\Booking\DTO\Booking;
use Planaday\Entities\Booking\DTO\Transaction;

interface PaymentHandler {
	public function connectPaymentProvider();
	public function getAndUpdateTransactionStatus(string $transactionId): ?Transaction;
	public function getTransaction(string $transactionId): ?Transaction;

	/**
	 * @param float $cost
	 * @param Booking $booking
	 * @param string $redirectURL
	 *
	 * @return Transaction
	 * @throws TransactionCreationFailedException
	 */
	public function getNewTransaction(float $cost, Booking $booking, string $redirectURL): Transaction;

	public function getDetailsLink(string $transactionId): string;
}