File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,11 @@ public function getOrderFlow()
130130 return self ::AUTHORIZATION_FLOW ;
131131 }
132132
133+ public function getPaymentMethodNetTerm ($ method )
134+ {
135+ return $ this ->config ->getValue ($ method . '_net_term ' );
136+ }
137+
133138 public static function getInstance () {
134139 $ cls = static ::class;
135140 if (!isset (self ::$ instances [$ cls ])) {
Original file line number Diff line number Diff line change @@ -62,13 +62,27 @@ private function filterPaymentMethods(): void
6262 $ paymentMethods = $ this ->smarty ->getTemplateVars ('Zahlungsarten ' );
6363 $ monduPaymentMethods = [];
6464
65+ $ allowedNetTerms = $ this ->getAllowedNetTerms ();
66+
6567 foreach ($ paymentMethods as $ key => $ method ) {
6668 if ($ method ->cAnbieter == 'Mondu ' ) {
6769 $ paymentMethodType = $ this ->configService ->getPaymentMethodByKPlugin ($ method ->cModulId );
6870 $ monduPaymentMethods [$ method ->kZahlungsart ] = $ method ->cModulId ;
6971
7072 if (!in_array ($ paymentMethodType , $ allowedPaymentMethods )){
7173 unset($ paymentMethods [$ key ]);
74+ continue ;
75+ }
76+
77+ $ netTerm = (int ) $ this ->configService ->getPaymentMethodNetTerm ($ method ->cModulId );
78+
79+ // Installments
80+ if (!$ netTerm ) {
81+ continue ;
82+ }
83+
84+ if (!in_array ($ netTerm , $ allowedNetTerms )) {
85+ unset($ paymentMethods [$ key ]);
7286 }
7387 }
7488 }
Original file line number Diff line number Diff line change 77 <PluginID >MonduPayment</PluginID >
88 <XMLVersion >100</XMLVersion >
99 <ShopVersion >5.0.0</ShopVersion >
10- <Version >3.0.3 </Version >
10+ <Version >3.0.4 </Version >
1111 <CreateDate >2022-06-07</CreateDate >
1212 <Install >
1313 <Hooks >
You can’t perform that action at this time.
0 commit comments