diff --git a/Changelog.md b/Changelog.md index 36441a5..acd9336 100644 --- a/Changelog.md +++ b/Changelog.md @@ -20,6 +20,7 @@ - `isOffline()` - BC: Added the `getTransactionAmount()` method to the `PaymentResponse` interface - BC: Added the `transactionHandler()` method to the `PaymentGateway` interface (experimental feature) +- BC: Added the `svgIcon()` static method to the `PaymentGateway` interface - BC: Changed the `PaymentMethod` interface into Configurable - Deprecated the `PaymentMethod::getConfiguration()` in favor of `configuration()` - Deprecated the `PaymentResponse::getAmountPaid()` method in favor of `getTransactionAmount()` diff --git a/Contracts/PaymentGateway.php b/Contracts/PaymentGateway.php index 09bd761..e3fe495 100644 --- a/Contracts/PaymentGateway.php +++ b/Contracts/PaymentGateway.php @@ -21,6 +21,8 @@ interface PaymentGateway { public static function getName(): string; + public static function svgIcon(): string; + public function createPaymentRequest( Payment $payment, Address $shippingAddress = null, diff --git a/Gateways/NullGateway.php b/Gateways/NullGateway.php index 08ba045..6ae4ab4 100644 --- a/Gateways/NullGateway.php +++ b/Gateways/NullGateway.php @@ -31,6 +31,11 @@ public static function getName(): string return __('Offline'); } + public static function svgIcon(): string + { + return ''; + } + public function createPaymentRequest( Payment $payment, Address $shippingAddress = null, diff --git a/Tests/Examples/PlasticPayments.php b/Tests/Examples/PlasticPayments.php index b26b880..900e514 100644 --- a/Tests/Examples/PlasticPayments.php +++ b/Tests/Examples/PlasticPayments.php @@ -31,6 +31,11 @@ public static function getName(): string return 'Plastic Payments'; } + public static function svgIcon(): string + { + return ''; + } + public function createPaymentRequest( Payment $payment, Address $shippingAddress = null, diff --git a/Tests/Examples/UnorthodoxGateway.php b/Tests/Examples/UnorthodoxGateway.php index 646281a..6c52851 100644 --- a/Tests/Examples/UnorthodoxGateway.php +++ b/Tests/Examples/UnorthodoxGateway.php @@ -31,6 +31,11 @@ public static function getName(): string return 'Unorthodox Payments'; } + public static function svgIcon(): string + { + return ''; + } + public function createPaymentRequest( Payment $payment, Address $shippingAddress = null,