From 15b6acd37fc0ff62f4249fa5c5656dae97d7c6ee Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 24 Jan 2021 16:22:49 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/societe/paymentmodes.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 40f7932b9fb..8956a80d0d8 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -958,20 +958,20 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' try { if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage $paymentmethodobjsA = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "card")); - $paymentmethodobjsB = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "sepa_debit")); + $paymentmethodobjsB = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "sepa_debit")); } else { $paymentmethodobjsA = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "card"), array("stripe_account" => $stripeacc)); - $paymentmethodobjsB = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "sepa_debit"), array("stripe_account" => $stripeacc)); + $paymentmethodobjsB = \Stripe\PaymentMethod::all(array("customer" => $customerstripe->id, "type" => "sepa_debit"), array("stripe_account" => $stripeacc)); } - if ($paymentmethodobjsA->data != null && $paymentmethodobjsB->data != null) { $listofsources = array_merge((array) $paymentmethodobjsA->data, (array) $paymentmethodobjsB->data); - } elseif ($paymentmethodobjsB->data != null) { $listofsources = $paymentmethodobjsB->data; } - else { $listofsources = $paymentmethodobjsA->data; } + if ($paymentmethodobjsA->data != null && $paymentmethodobjsB->data != null) { $listofsources = array_merge((array) $paymentmethodobjsA->data, (array) $paymentmethodobjsB->data); + } elseif ($paymentmethodobjsB->data != null) { $listofsources = $paymentmethodobjsB->data; } + else { $listofsources = $paymentmethodobjsA->data; } } catch (Exception $e) { $error++; setEventMessages($e->getMessage(), null, 'errors'); - } + } } } } catch (Exception $e) @@ -1202,7 +1202,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print getCountry($src->card->country, 1); } else print img_warning().' '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).''; } elseif ($src->object == 'payment_method' && $src->type == 'sepa_debit') { - print ''.$src->billing_details->name.'
....'.$src->sepa_debit->last4; + print ''.$src->billing_details->name.'
....'.$src->sepa_debit->last4; print ''; if ($src->sepa_debit->country) { $img = picto_from_langcode($src->sepa_debit->country);