Skip to content

Commit

Permalink
BP-3512 Remove logo selection for In3 & iDEAL In3 (#157)
Browse files Browse the repository at this point in the history
* BP-3512 Remove logo selection for In3 & iDEAL In3

* rebuild js

---------

Co-authored-by: Ivascu Madalin <[email protected]>
  • Loading branch information
harli91 and Ivascu Madalin authored Mar 28, 2024
1 parent e09f74d commit a6d6a42
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 107 deletions.
9 changes: 1 addition & 8 deletions classes/CapayableIn3.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
class CapayableIn3
{
protected $apiVersion;
protected $paymentLogo;
public const VERSION_V2 = 'V2';
public const LOGO_IN3_IDEAL = 'in3_ideal';
public const LOGO_IN3_IDEAL_FILENAME = 'In3_ideal.svg?v1';
Expand All @@ -33,7 +32,6 @@ class CapayableIn3
public function __construct($buckarooConfigService)
{
$this->apiVersion = $buckarooConfigService->getConfigValue('in3', 'version');
$this->paymentLogo = $buckarooConfigService->getConfigValue('in3', 'payment_logo');
}

public function isV3(): bool
Expand All @@ -46,12 +44,7 @@ public function getLogo(): string
if (!$this->isV3()) {
return self::LOGO_DEFAULT;
}

if ($this->paymentLogo === self::LOGO_IN3_IDEAL) {
return self::LOGO_IN3_IDEAL_FILENAME;
}

return self::LOGO_DEFAULT;
return self::LOGO_IN3_IDEAL_FILENAME;
}

public function getMethod(): string
Expand Down
1 change: 0 additions & 1 deletion dev/lang/php_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"dashboard.pages.payments.in3.version.label": "In3-Version",
"dashboard.pages.payments.in3.version.v2": "V2 (Capayable/In3)",
"dashboard.pages.payments.in3.version.v3": "V3 (iDEAL In3)",
"dashboard.pages.payments.logo": "Zahlungslogo",
"dashboard.pages.payments.max_order_amount_b2c": "Maximaler B2B-Bestellbetrag",
"dashboard.pages.payments.maximum_order_amount": "Maximaler Bestellwert",
"dashboard.pages.payments.min_order_amount_b2b": "Mindestbestellwert für B2B",
Expand Down
1 change: 0 additions & 1 deletion dev/lang/php_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"dashboard.pages.payments.in3.version.label": "In3 version",
"dashboard.pages.payments.in3.version.v2": "V2 (Capayable/In3)",
"dashboard.pages.payments.in3.version.v3": "V3 (iDEAL In3)",
"dashboard.pages.payments.logo": "Payment logo",
"dashboard.pages.payments.max_order_amount_b2c": "Maximum B2B order amount",
"dashboard.pages.payments.maximum_order_amount": "Maximum order amount",
"dashboard.pages.payments.min_order_amount_b2b": "Minimum B2B order amount",
Expand Down
1 change: 0 additions & 1 deletion dev/lang/php_fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"dashboard.pages.payments.in3.version.label": "Version In3",
"dashboard.pages.payments.in3.version.v2": "V2 (capacité/In3)",
"dashboard.pages.payments.in3.version.v3": "V3 (iDEAL In3)",
"dashboard.pages.payments.logo": "Logo de paiement",
"dashboard.pages.payments.max_order_amount_b2c": "Montant maximum de la commande B2B",
"dashboard.pages.payments.maximum_order_amount": "Montant maximum de la commande",
"dashboard.pages.payments.min_order_amount_b2b": "Montant minimum de la commande B2B",
Expand Down
1 change: 0 additions & 1 deletion dev/lang/php_nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"dashboard.pages.payments.in3.version.label": "In3 versie",
"dashboard.pages.payments.in3.version.v2": "V2 (Capayable/In3)",
"dashboard.pages.payments.in3.version.v3": "V3 (iDEAL In3)",
"dashboard.pages.payments.logo": "Betaalmethode logo",
"dashboard.pages.payments.max_order_amount_b2c": "Maximale B2B bestelbedrag",
"dashboard.pages.payments.maximum_order_amount": "Maximaal toegestane bestelbedrag",
"dashboard.pages.payments.min_order_amount_b2b": "Minimale B2B bestelbedrag",
Expand Down
35 changes: 2 additions & 33 deletions dev/src/components/payments/In3PaymentConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@
</label>
</div>
</div>

<div class="p-5 space-y-5" v-if="config.version === 'V3'">
<h2 class="font-semibold text-sm">{{ $t(`dashboard.pages.payments.logo`) }}</h2>
<div class="flex space-x-4">
<div v-for="option in paymentLogoOptions" :key="option.value" class="radio-image-wrapper">
<input type="radio" :id="option.value" v-model="config.payment_logo" :value="option.value" class="hidden-radio">
<label :for="option.value" class="flex flex-col items-center cursor-pointer">
<img :src="option.image" alt="option.text">
{{ option.text }}
</label>
</div>
</div>
</div>
</div>
<FinancialWarning/>
</template>
Expand All @@ -42,28 +29,10 @@ export default {
components: {
FinancialWarning
},
setup(props) {
setup() {
const config = inject('config')
const baseUrl = inject('baseUrl');
const url = baseUrl + '/modules/buckaroo3/views/img/buckaroo/Payment methods/SVG/';
const paymentLogoOptions = [
{
value: 'in3_ideal',
text: 'iDEAL In3',
image: url + 'In3_ideal.svg'
},
{
value: 'in3',
text: 'IN3',
image: url + 'In3.svg'
}
];
return {
config,
paymentLogoOptions,
config
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion views/css/buckaroo3.vue.css

Large diffs are not rendered by default.

121 changes: 60 additions & 61 deletions views/js/buckaroo.vue.js

Large diffs are not rendered by default.

0 comments on commit a6d6a42

Please sign in to comment.