Skip to content

$returnURL sometimes called twice by SumUp #44

@purplespider

Description

@purplespider

I use the following to perform a checkout on my site:

        try {
            $sumup = $this->sumUpInstance();
            $checkoutService = $sumup->getCheckoutService();
            $checkoutResponse = $checkoutService->create($amount, $currency, $checkoutRef, $payToEmail, $description, $payFromEmail, $returnURL);
            $checkoutId = $checkoutResponse->getBody()->id;
            //  pass the $chekoutId to the front-end to be processed
        } catch (\SumUp\Exceptions\SumUpAuthenticationException $e) {
            echo 'Authentication error: ' . $e->getMessage();
        } catch (\SumUp\Exceptions\SumUpResponseException $e) {
            echo 'Response error: ' . $e->getMessage();
        } catch (\SumUp\Exceptions\SumUpSDKException $e) {
            echo 'SumUp SDK error: ' . $e->getMessage();
        }

When the provided $returnURL is accessed, the booking is marked as "Paid" and a confirmation email is sent.

However, it seems that sometimes SumUp will access this URL twice, at basically the same time, resulting in the customer receiving two confirmation emails (despite a check on if it's already been marked as paid).

Is this an issue on SumUp's side that is causing this duplicate callback to the $returnURL?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions