Skip to content

Commit

Permalink
Merge remote-tracking branch 'arcadant/klarna-one' into PISYL-210
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasimovic3 committed Feb 27, 2024
2 parents 4061bdb + 8eba70f commit efd77dd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Payments/Methods/KlarnaOne.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace SyliusMolliePlugin\Payments\Methods;

use Mollie\Api\Types\PaymentMethod;

final class KlarnaOne extends AbstractMethod
{
public function getMethodId(): string
{
return PaymentMethod::KLARNA_ONE;
}

public function getPaymentType(): string
{
return self::ORDER_API;
}
}
2 changes: 2 additions & 0 deletions src/Payments/MethodsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use SyliusMolliePlugin\Payments\Methods\Ideal;
use SyliusMolliePlugin\Payments\Methods\In3;
use SyliusMolliePlugin\Payments\Methods\Kbc;
use SyliusMolliePlugin\Payments\Methods\KlarnaOne;
use SyliusMolliePlugin\Payments\Methods\Klarnapaylater;
use SyliusMolliePlugin\Payments\Methods\KlarnaPayNow;
use SyliusMolliePlugin\Payments\Methods\Klarnasliceit;
Expand All @@ -43,6 +44,7 @@ interface MethodsInterface
Giropay::class,
Ideal::class,
Kbc::class,
KlarnaOne::class,
Klarnapaylater::class,
Klarnasliceit::class,
KlarnaPayNow::class,
Expand Down
1 change: 1 addition & 0 deletions src/Payments/PaymentTerms/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public static function getLogLevels(): array
public static function getOnlyOrderAPIMethods(): array
{
return [
PaymentMethod::KLARNA_ONE,
PaymentMethod::KLARNA_PAY_NOW,
PaymentMethod::KLARNA_PAY_LATER,
PaymentMethod::KLARNA_SLICE_IT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% set mealvouchersId = constant('SyliusMolliePlugin\\Payments\\Methods\\MealVoucher::MEAL_VOUCHERS') %}
{% set applePay = constant('Mollie\\Api\\Types\\PaymentMethod::APPLEPAY') %}
{% set klarnaOne = constant('Mollie\\Api\\Types\\PaymentMethod::KLARNA_ONE') %}
{% set klarnaPayLater = constant('Mollie\\Api\\Types\\PaymentMethod::KLARNA_PAY_LATER') %}
{% set klarnaSliceIt = constant('Mollie\\Api\\Types\\PaymentMethod::KLARNA_SLICE_IT') %}
{% set billie = constant('Mollie\\Api\\Types\\PaymentMethod::BILLIE') %}
Expand Down Expand Up @@ -133,6 +134,7 @@
<div class="twelve wide field">
{% if
methodForm.vars.value.methodId == mealvouchersId or
methodForm.vars.value.methodId == klarnaOne or
methodForm.vars.value.methodId == klarnaPayLater or
methodForm.vars.value.methodId == klarnaSliceIt or
methodForm.vars.value.methodId == billie or
Expand Down

0 comments on commit efd77dd

Please sign in to comment.