@@ -31,8 +31,6 @@ public function __construct()
31
31
// Admin facing title and description.
32
32
$ this ->method_title = 'NoFrixion PISP ' ;
33
33
$ this ->method_description = __ ('NoFrixion gateway supporting all available PISP banks. ' , 'nofrixion-for-woocommerce ' );
34
-
35
- $ this ->pispProviders = $ this ->getPayByBankSettings ();
36
34
}
37
35
38
36
// Handles MoneyMoov API success webhook that confirms payments received.
@@ -75,6 +73,9 @@ public function getPayByBankSettings(): array
75
73
76
74
public function payment_fields ()
77
75
{
76
+ if (empty ($ this ->pispProviders )){
77
+ $ this ->pispProviders = $ this ->getPayByBankSettings ();
78
+ }
78
79
79
80
echo '<div class="nf-pisp-payment-options"> ' ;
80
81
foreach ($ this ->pispProviders as $ provider ) {
@@ -137,6 +138,9 @@ public function process_payment($orderId)
137
138
Logger::debug ('Selected pisp provider: ' . $ pispProviderId );
138
139
139
140
// Check for allowed pisp providers, store provider id to order.
141
+ if (empty ($ this ->pispProviders )){
142
+ $ this ->pispProviders = $ this ->getPayByBankSettings ();
143
+ }
140
144
$ allowedPispProviders = array_column ($ this ->pispProviders , 'personalInstitutionID ' );
141
145
if (!in_array ($ pispProviderId , $ allowedPispProviders )) {
142
146
$ msg_no_provider = __ ('No valid pisp provider found, aborting. ' , 'nofrixion-for-woocommerce ' );
0 commit comments