Skip to content

Commit 0da84e1

Browse files
authored
Merge pull request #7 from paynl/feature/PLUG-3739
PLUG-3739 - Add in3 Business
2 parents ebff0f9 + fd54958 commit 0da84e1

File tree

7 files changed

+335
-3
lines changed

7 files changed

+335
-3
lines changed

app/code/community/Pay/Payment/Block/Form/Abstract.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ protected function _construct()
4141
->setIconSizeWidth('')
4242
->setIconSizeHeight('');
4343

44-
if ($this->paymentMethodId == 1813) {
44+
$differentIconArray = array(1813, 3144, 3183, 3192, 2856);
45+
46+
if (in_array($this->paymentMethodId, $differentIconArray)) {
4547
$iconSize = explode("x", $iconSize);
4648

4749
$mark->setTemplate('pay/payment/mark.phtml')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
class Pay_Payment_Block_Form_In3business extends Pay_Payment_Block_Form_Abstract {
4+
5+
protected $paymentMethodId = Pay_Payment_Model_Paymentmethod_In3business::OPTION_ID;
6+
protected $paymentMethodName = 'In3 Business';
7+
protected $methodCode = 'pay_payment_in3business';
8+
protected $template = 'pay/payment/form/default.phtml';
9+
}

app/code/community/Pay/Payment/Helper/Data.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,9 @@ private function _saveOptions($paymentMethods, $store = null)
405405
foreach ($paymentMethods as $paymentMethod) {
406406
$image = 'https://static.pay.nl/payment_profiles/20x20/' . $paymentMethod['id'] . '.png';
407407

408-
if ($paymentMethod['id'] == 1813) {
408+
$differentIconArray = array(1813, 3144, 3183, 3192, 2856);
409+
410+
if (in_array($paymentMethod['id'], $differentIconArray)) {
409411
$image = 'https://static.pay.nl/payment_profiles/100x100/' . $paymentMethod['id'] . '.svg';
410412
}
411413

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
class Pay_Payment_Model_Paymentmethod_In3business extends Pay_Payment_Model_Paymentmethod {
3+
const OPTION_ID = 3192;
4+
protected $_paymentOptionId = 3192;
5+
protected $_code = 'pay_payment_in3business';
6+
protected $_formBlockType = 'pay_payment/form_in3business';
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
class Pay_Payment_Model_Source_Paymentmethod_In3business_Active extends Pay_Payment_Model_Source_Paymentmethod_Active{
3+
protected $_option_id = Pay_Payment_Model_Paymentmethod_In3business::OPTION_ID;
4+
}

app/code/community/Pay/Payment/etc/config.xml

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<config>
33
<modules>
44
<Pay_Payment>
5-
<version>3.16.2</version>
5+
<version>3.17.0</version>
66
</Pay_Payment>
77
</modules>
88
<global>
@@ -437,6 +437,18 @@
437437
<send_mail>success</send_mail>
438438
<limit_shipping>0</limit_shipping>
439439
</pay_payment_overboeking>
440+
<pay_payment_in3business>
441+
<active>0</active>
442+
<invoice_email>1</invoice_email>
443+
<model>pay_payment/Paymentmethod_In3business</model>
444+
<title>In3 Business</title>
445+
<payment_action>authorize</payment_action>
446+
<order_status>pending_payment</order_status>
447+
<order_status_success>processing</order_status_success>
448+
<order_status_verify>pending_payment</order_status_verify>
449+
<send_mail>success</send_mail>
450+
<limit_shipping>0</limit_shipping>
451+
</pay_payment_in3business>
440452
<pay_payment_incasso>
441453
<active>0</active>
442454
<invoice_email>1</invoice_email>

app/code/community/Pay/Payment/etc/system.xml

+296
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)