The \SumUp\Services\Checkouts service is responsible for managing the checkouts - creating, listing, processing, deactivating.
$checkoutService = new \SumUp\Services\Checkouts(
\SumUp\HttpClients\SumUpHttpClientInterface $client,
\SumUp\Authentication\AccessToken $accessToken
);
Creates a new checkout.
public function create(
float $amount,
string $currency,
string $checkoutRef,
string $merchantCode,
string $description = '',
string $payFromEmail = null,
string $returnURL = null,
string $redirectURL = null
): \SumUp\HttpClients\Response
Returns a \SumUp\HttpClients\Response or throws an exception.
Searches for a checkout with particular id.
public function findById(string $checkoutId): \SumUp\HttpClients\Response
Returns a \SumUp\HttpClients\Response or throws an exception.
Searches for a checkout with particular checkout_reference.
public function findByReferenceId(string $referenceId): \SumUp\HttpClients\Response
Returns a \SumUp\HttpClients\Response or throws an exception.
Deactivates a checkout with particular checkout id.
public function delete(string $checkoutId): \SumUp\HttpClients\Response
Returns a \SumUp\HttpClients\Response or throws an exception.
Processes a checkout with tokenized card for a customer.
Note: this is not the only way to process a checkout. For more information read this guide.
public function pay(
string $checkoutId,
string $customerId,
string $cardToken,
int $installments = 1
): \SumUp\HttpClients\Response
Returns a \SumUp\HttpClients\Response or throws an exception.
How can I help you explore Laravel packages today?