-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PPI-1056 - Refactor payment handlers to AbstractPaymentHandlers
- Loading branch information
1 parent
6a415fd
commit b4f8e97
Showing
73 changed files
with
908 additions
and
3,304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php declare(strict_types=1); | ||
/* | ||
* (c) shopware AG <[email protected]> | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Swag\PayPal\Checkout\Exception; | ||
|
||
use Shopware\Core\Checkout\Payment\Cart\PaymentHandler\AbstractPaymentHandler; | ||
use Shopware\Core\Checkout\Payment\PaymentException; | ||
use Shopware\Core\Framework\Log\Package; | ||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
#[Package('checkout')] | ||
class CheckoutException extends PaymentException | ||
{ | ||
public const PREPARED_ORDER_REQUIRED = 'PREPARED_ORDER_REQUIRED'; | ||
|
||
/** | ||
* @param class-string<AbstractPaymentHandler> $paymentHandler | ||
*/ | ||
public static function preparedOrderRequired(string $paymentHandler): self | ||
{ | ||
return new self( | ||
Response::HTTP_BAD_REQUEST, | ||
self::PREPARED_ORDER_REQUIRED, | ||
'PayPal Order ID does not exist in the request. The payment method {{ paymentHandler }} requires a prepared PayPal order.', | ||
['paymentHandler' => $paymentHandler], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.