Skip to content

Commit

Permalink
Change exception returned by AppleAppstoreGateway->checkExpire()
Browse files Browse the repository at this point in the history
From `\Exception()` to `Omnipay\Common\Exception\InvalidRequestException`
which is used by all our gateways if `checkExpire()` is missing.
  • Loading branch information
markoph committed Sep 16, 2021
1 parent c2c11fe commit 8936192
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gateway/AppleAppstoreGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Nette\Application\LinkGenerator;
use Nette\Http\Response;
use Nette\Localization\ITranslator;
use Omnipay\Common\Exception\InvalidRequestException;
use ReceiptValidator\iTunes\PurchaseItem;
use ReceiptValidator\iTunes\ResponseInterface;
use Tracy\Debugger;
Expand Down Expand Up @@ -121,7 +122,7 @@ public function checkValid($originalTransactionID)

public function checkExpire($recurrentPayments)
{
throw new \Exception("AppleAppstore recurrent gateway doesn't support receipt expiration checking (it should never expire)");
throw new InvalidRequestException(self::GATEWAY_CODE . " gateway doesn't support token expiration checking (it should never expire)");
}

/**
Expand Down

0 comments on commit 8936192

Please sign in to comment.