Skip to content

Commit

Permalink
Added IPaymentButton interface
Browse files Browse the repository at this point in the history
  • Loading branch information
matak authored and hrach committed Oct 17, 2014
1 parent b763f0d commit 997ef90
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
23 changes: 23 additions & 0 deletions Gopay/IPaymentButton.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

/**
* Markette - payment methods integration for Nette Framework
*
* @license New BSD
* @package Markette
* @author Vojtěch Dobeš
*/

namespace Markette\Gopay;


interface IPaymentButton
{

/**
* Returns name (title) of payment channel.
* @return string
*/
function getChannel();

}
9 changes: 1 addition & 8 deletions Gopay/ImagePaymentButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
*
* @property-read $channel
*/
class ImagePaymentButton extends ImageButton
class ImagePaymentButton extends ImageButton implements IPaymentButton
{

/** @var string */
private $channel;



/**
* @param string
* @param string|NULL
Expand All @@ -42,12 +41,6 @@ public function __construct($channel, $src = NULL, $alt = NULL)
}



/**
* Returns name of payment channel
*
* @return string
*/
public function getChannel()
{
return $this->channel;
Expand Down
9 changes: 1 addition & 8 deletions Gopay/PaymentButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
*
* @property-read $channel
*/
class PaymentButton extends SubmitButton
class PaymentButton extends SubmitButton implements IPaymentButton
{

/** @var string */
private $channel;



/**
* @param string
* @param string|NULL
Expand All @@ -40,12 +39,6 @@ public function __construct($channel, $caption = NULL)
}



/**
* Returns name of payment channel
*
* @return string
*/
public function getChannel()
{
return $this->channel;
Expand Down

0 comments on commit 997ef90

Please sign in to comment.