Skip to content

Commit

Permalink
Bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roel van Hintum committed Oct 4, 2019
1 parent ac73c41 commit 4f40228
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use born05\commerce\buckaroo\gateways\CreditCardGateway;
use born05\commerce\buckaroo\gateways\IdealGateway;
use born05\commerce\buckaroo\gateways\PayPalGateway;
use born05\commerce\buckaroo\gateways\SepaDirectGateway;
use born05\commerce\buckaroo\gateways\SepaDirectDebitGateway;

use craft\commerce\services\Gateways;
use craft\events\RegisterComponentTypesEvent;
Expand All @@ -27,7 +27,7 @@ public function init()
$event->types[] = CreditCardGateway::class;
$event->types[] = IdealGateway::class;
$event->types[] = PayPalGateway::class;
$event->types[] = SepaDirectGateway::class;
$event->types[] = SepaDirectDebitGateway::class;
});
}
}
4 changes: 2 additions & 2 deletions src/gateways/BaseGateway.php → src/base/Gateway.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace born05\commerce\buckaroo\gateways;
namespace born05\commerce\buckaroo\base;

use born05\commerce\buckaroo\models\RequestResponse;
use born05\commerce\buckaroo\models\forms\OffsitePaymentForm;
Expand All @@ -12,7 +12,7 @@
use Omnipay\Omnipay;
use Omnipay\Buckaroo\Gateway as OmnipayGateway;

class Gateway extends OffsiteGateway
abstract class Gateway extends OffsiteGateway
{
// Properties
// =========================================================================
Expand Down
5 changes: 3 additions & 2 deletions src/gateways/CreditCardGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

namespace born05\commerce\buckaroo\gateways;

use born05\commerce\buckaroo\base\Gateway;
use born05\commerce\buckaroo\models\forms\CreditCardPaymentForm;

use Craft;
use craft\commerce\models\payments\BasePaymentForm;
use craft\web\View;
use Omnipay\Buckaroo\CreditCardGateway as OmniPayCreditCardGateway;

class CreditCardGateway extends BaseGateway
class CreditCardGateway extends Gateway
{
/**
* @inheritdoc
*/
public static function displayName(): string
{
return Craft::t('commerce', 'CreditCard');
return Craft::t('commerce', 'Buckaroo CreditCard');
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/gateways/IdealGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

namespace born05\commerce\buckaroo\gateways;

use born05\commerce\buckaroo\base\Gateway;
use born05\commerce\buckaroo\models\forms\IdealPaymentForm;

use Craft;
use craft\commerce\models\payments\BasePaymentForm;
use craft\web\View;
use Omnipay\Buckaroo\IdealGateway as OmniPayIdealGateway;

class IdealGateway extends BaseGateway
class IdealGateway extends Gateway
{
/**
* @inheritdoc
*/
public static function displayName(): string
{
return Craft::t('commerce', 'Ideal');
return Craft::t('commerce', 'Buckaroo Ideal');
}

/**
Expand Down
6 changes: 4 additions & 2 deletions src/gateways/PayPalGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

namespace born05\commerce\buckaroo\gateways;

use born05\commerce\buckaroo\base\Gateway;

use Craft;
use Omnipay\Buckaroo\PayPalGateway as OmniPayPayPalGateway;

class PayPalGateway extends BaseGateway
class PayPalGateway extends Gateway
{
/**
* @inheritdoc
*/
public static function displayName(): string
{
return Craft::t('commerce', 'PayPal');
return Craft::t('commerce', 'Buckaroo PayPal');
}

// Protected Methods
Expand Down
6 changes: 4 additions & 2 deletions src/gateways/SepaDirectDebitGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

namespace born05\commerce\buckaroo\gateways;

use born05\commerce\buckaroo\base\Gateway;

use Craft;
use Omnipay\Buckaroo\SepaDirectGateway as OmniPaySepaDirectGateway;

class SepaDirectDebitGateway extends BaseGateway
class SepaDirectDebitGateway extends Gateway
{
/**
* @inheritdoc
*/
public static function displayName(): string
{
return Craft::t('commerce', 'SepaDirectDebit');
return Craft::t('commerce', 'Buckaroo SepaDirectDebit');
}

// Protected Methods
Expand Down
13 changes: 13 additions & 0 deletions src/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/templates/creditCardPaymentForm.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="buckaroo-form">
<select name="paymentMethod">
{% for method in paymentMethods %}
<option value="{{ method.id }}">{{ method.name }}</option>
{% for id, name in paymentMethods %}
<option value="{{ id }}">{{ name }}</option>
{% endfor %}
</select>
</div>
4 changes: 2 additions & 2 deletions src/templates/idealPaymentForm.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="buckaroo-form">
<select name="issuer">
{% for issuer in issuers %}
<option value="{{ issuer.id }}">{{ issuer.name }} - {{ issuer.paymentMethod }}</option>
{% for id, name in issuers %}
<option value="{{ id }}">{{ name }}</option>
{% endfor %}
</select>
</div>

0 comments on commit 4f40228

Please sign in to comment.