diff --git a/application/translations/de/fcPayOne_lang.php b/application/translations/de/fcPayOne_lang.php index 1c190dfa..a28819dd 100755 --- a/application/translations/de/fcPayOne_lang.php +++ b/application/translations/de/fcPayOne_lang.php @@ -178,6 +178,7 @@ 'FCPO_AMAZON_ERROR_900' => 'Entschuldigung, die Transaktion mit Amazon Pay war nicht erfolgreich. Bitte wählen Sie eine andere Zahlart.', 'FCPO_AMAZON_LOGIN' => 'Mit Amazon einloggen.', 'FCPO_SECINVOICE_BIRTHDATE' => 'Geburtsdatum', + 'FCPO_SECINVOICE_BIRTHDATE_B2B' => 'Geburtsdatum des Bestellers', 'FCPO_SECINVOICE_USTID' => 'Umsatzsteueridentifiationsnummer', 'FCPO_SECINVOICE_NO_COMPANY' => 'Keine Firma? Klicken Sie hier um Ihre Addresse zu ändern.', 'FCPO_NOT_ADULT' => 'Sie sind aufgrund Ihres Alters leider nicht berechtigt die gewählte Zahlart zu verwenden. Bitte wählen Sie eine andere Zahlart.', @@ -201,6 +202,7 @@ 'FCPO_BNPL_TNC_DATAPROTECTION_NOTICE' => 'Mit Abschluss dieser Bestellung erkläre ich mich mit den ergänzenden Zahlungsbedingungen und der Durchführung einer Risikoprüfung für die ausgewählte Zahlungsart einverstanden. Den ergänzenden Datenschutzhinweis habe ich zur Kenntnis genommen.', 'FCPO_BNPL_FON' => 'Telefonnummer', + 'FCPO_BNPL_FON_B2B' => 'Telefonnummer des Bestellers', 'FCPO_BNPL_IBAN' => 'IBAN', 'FCPO_BNPL_SECINSTALLMENT_UNAVAILABLE' => 'Gesicherter Ratenkauf wird für Ihren aktuellen Warenkorb nicht unterstützt. Bitte wählen Sie eine andere Zahlart.', 'FCPO_BNPL_SECINSTALLMENT_SELECTION' => 'Anzahl von Raten', @@ -213,6 +215,8 @@ 'FCPO_BNPL_SECINSTALLMENT_OVW_MONTHLYRATE' => 'Monatliche Rate', 'FCPO_BNPL_SECINSTALLMENT_OVW_DL_CREDINFO' => '> Ratenkauf Informationen herunterladen', 'FCPO_BNPL_SECINSTALLMENT_PLAN_INVALID' => 'Bitte wählen Sie Ihre gewünschte Anzahl von Raten', + 'FCPO_BNPL_USTID' => 'Umsatzsteueridentifiationsnummer', + 'FCPO_BNPL_NO_COMPANY' => 'Keine Firma? Klicken Sie hier um Ihre Addresse zu ändern.', 'FCPO_CONFIG_GROUP_APPLE_PAY' => "Apple Pay", 'FCPO_HELP_APPLE_PAY_MERCHANT_ID' => "Merchant ID", diff --git a/application/translations/en/fcPayOne_lang.php b/application/translations/en/fcPayOne_lang.php index b2800018..05267d79 100755 --- a/application/translations/en/fcPayOne_lang.php +++ b/application/translations/en/fcPayOne_lang.php @@ -188,6 +188,7 @@ 'FCPO_AMAZON_ERROR_SHIPPING_ADDRESS_NOT_SET' => 'Please choose an address', 'FCPO_AMAZON_ERROR_900' => 'Please choose another payment method.', 'FCPO_SECINVOICE_BIRTHDATE' => 'Please enter your birthday', +'FCPO_SECINVOICE_BIRTHDATE_B2B' => 'Date of birth of the subscriber', 'FCPO_SECINVOICE_USTID' => 'Tax Identification Number', 'FCPO_SECINVOICE_NO_COMPANY' => 'Not a company? Click here for changing your address.', 'FCPO_NOT_ADULT' => 'Due to your age you are not allowed to use this payment. Please select another payment method', @@ -212,6 +213,7 @@ 'FCPO_BNPL_TNC_DATAPROTECTION_NOTICE' => 'By placing this order, I agree to the supplementary payment terms and the performance of a risk assessment for the selected payment method. I am aware of the supplementary data protection notice.', 'FCPO_BNPL_FON' => 'Phone', +'FCPO_BNPL_FON_B2B' => 'Phone number of the subscriber', 'FCPO_BNPL_IBAN' => 'IBAN', 'FCPO_BNPL_SECINSTALLMENT_UNAVAILABLE' => 'Safe installment is not available for your current basket. Please choose another payment method.', 'FCPO_BNPL_SECINSTALLMENT_SELECTION' => 'Desired installment plan', @@ -224,6 +226,8 @@ 'FCPO_BNPL_SECINSTALLMENT_OVW_MONTHLYRATE' => 'Monthly amount', 'FCPO_BNPL_SECINSTALLMENT_OVW_DL_CREDINFO' => '> Download Installment information', 'FCPO_BNPL_SECINSTALLMENT_PLAN_INVALID' => 'Please select the desired installment plan', +'FCPO_BNPL_USTID' => 'Tax Identification Number', +'FCPO_BNPL_NO_COMPANY' => 'Not a company? Click here for changing your address.', 'FCPO_CONFIG_GROUP_APPLE_PAY' => "Apple Pay", 'FCPO_HELP_APPLE_PAY_MERCHANT_ID' => "Merchant ID", diff --git a/application/views/admin/de/fcPayOne_lang.php b/application/views/admin/de/fcPayOne_lang.php index ab28cf61..eba32a9f 100755 --- a/application/views/admin/de/fcPayOne_lang.php +++ b/application/views/admin/de/fcPayOne_lang.php @@ -375,12 +375,13 @@ 'FCPO_AMAZONPAY_LOGINMODE_POPUP' => 'Popup (Funktioniert nur mit SSL)', 'FCPO_AMAZONPAY_LOGINMODE_REDIRECT' => 'Redirect', 'FCPO_CONFIG_GROUP_SECINVOICE' => 'Gesicherter Rechnungskauf (rec/POV)', - 'FCPO_CONFIG_GROUP_BNPL' => 'BNPL Zahlarten (fnc/PIV, fnc/PIN)', + 'FCPO_CONFIG_GROUP_BNPL' => 'BNPL Zahlarten (fnc/PIV, fnc/PIN, fnc/PDD)', 'FCPO_SECINVOICE_PORTAL_ID' => 'PAYONE Portal ID (für Zahlart Gesicherter Rechnungskauf)', 'FCPO_BNPL_PORTAL_ID' => 'PAYONE Portal ID (für Zahlart BNPL)', 'FCPO_SECINVOICE_PORTAL_KEY' => 'PAYONE Portal Key (für Zahlart Gesicherter Rechnungskauf)', 'FCPO_BNPL_PORTAL_KEY' => 'PAYONE Portal Key (für Zahlart BNPL)', 'FCPO_BNPL_ALLOW_DIFF_ADDRESS' => 'Abweichende Lieferadresse zulassen', + 'FCPO_HELP_BNPL_ALLOW_DIFF_ADDRESS' => 'Muss im PAYONE-Konto freigeschaltet sein!', 'FCPO_BNPL_ADMIN_DEBIT_REASON_TITLE' => 'Stornierungsgrund', 'FCPO_BNPL_CANCELLATION_REASON_CRQ' => 'Der Verbraucher hat eine Stornierung der Bestellung beantragt', 'FCPO_BNPL_CANCELLATION_REASON_DUP' => 'Die Bestellung wurde versehentlich zweimal erstellt', diff --git a/application/views/admin/en/fcPayOne_lang.php b/application/views/admin/en/fcPayOne_lang.php index 8744e682..32729888 100644 --- a/application/views/admin/en/fcPayOne_lang.php +++ b/application/views/admin/en/fcPayOne_lang.php @@ -384,12 +384,13 @@ 'FCPO_CC_USE_CVC' => 'Use CVC as mandatory field', 'FCPO_CONFIG_DEBIT_BIC_MANDATORY' => 'Entering BIC is mandatory', 'FCPO_CONFIG_GROUP_SECINVOICE' => 'Secure Invoice (rec/POV)', - 'FCPO_CONFIG_GROUP_BNPL' => 'BNPL Zahlarten (fnc/PIV, fnc/PIN)', + 'FCPO_CONFIG_GROUP_BNPL' => 'BNPL Zahlarten (fnc/PIV, fnc/PIN, fnc/PDD)', 'FCPO_SECINVOICE_PORTAL_ID' => 'PAYONE Portal ID (for payment Secure Invoice)', 'FCPO_BNPL_PORTAL_ID' => 'PAYONE Portal ID (for payment BNPL)', 'FCPO_SECINVOICE_PORTAL_KEY' => 'PAYONE Portal Key (for payment Secure Invoice)', 'FCPO_BNPL_PORTAL_KEY' => 'PAYONE Portal Key (for payment BNPL)', 'FCPO_BNPL_ALLOW_DIFF_ADDRESS' => 'Allow different shipping address', + 'FCPO_HELP_BNPL_ALLOW_DIFF_ADDRESS' => 'Attention: has to be enabled in the PAYONE account', 'FCPO_BNPL_ADMIN_DEBIT_REASON_TITLE' => 'Cancellation reason', 'FCPO_BNPL_CANCELLATION_REASON_CRQ' => 'The consumer requested a cancellation of the Order', 'FCPO_BNPL_CANCELLATION_REASON_DUP' => 'The Order was created twice accidentally', diff --git a/application/views/admin/tpl/fcpayone_main.tpl b/application/views/admin/tpl/fcpayone_main.tpl index 366b0c0f..b4f2e723 100755 --- a/application/views/admin/tpl/fcpayone_main.tpl +++ b/application/views/admin/tpl/fcpayone_main.tpl @@ -899,12 +899,10 @@
- -
+
- - + [{oxinputhelp ident="FCPO_HELP_BNPL_ALLOW_DIFF_ADDRESS"}]
diff --git a/application/views/frontend/tpl/azure/fcpo_payment_bnpl_secdebitnote.tpl b/application/views/frontend/tpl/azure/fcpo_payment_bnpl_secdebitnote.tpl index 337b9780..dc9259f9 100644 --- a/application/views/frontend/tpl/azure/fcpo_payment_bnpl_secdebitnote.tpl +++ b/application/views/frontend/tpl/azure/fcpo_payment_bnpl_secdebitnote.tpl @@ -8,7 +8,7 @@
    [{if $oView->fcpoBNPLShowBirthdate()}] -
  • +
    • [{if $oView->fcpoBNPLShowBirthdate()}] -
    • - - -   - -   - +
    • + [{if $oView->fcpoIsB2BPov()}] + + [{else}] + + [{/if}] +   + +   + +   +
    • [{/if}] - [{if $oView->fcpoBNPLShowFon()}] + [{if $oView->fcpoBNPLShowFon($sPaymentID)}]
    • + [{if $oView->fcpoIsB2BPov()}] + + [{else}] + [{/if}]
    • [{/if}] + + [{if $oView->fcpoIsB2BPov()}] + [{if ! $oView->fcpoGetUserValue('oxustid')}] +
    • + +
      + +
      +
    • +
    • +

      + [{oxmultilang ident="FCPO_BNPL_NO_COMPANY"}] +

      +
    • + [{/if}] + [{/if}] +
    [{oxid_include_dynamic file=$oViewConf->fcpoGetAbsModuleTemplateFrontendPath('fcpo_payment_bnpl_snippet.tpl')}] diff --git a/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secdebitnote.tpl b/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secdebitnote.tpl index 2f6ed132..6c2179ef 100644 --- a/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secdebitnote.tpl +++ b/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secdebitnote.tpl @@ -31,7 +31,7 @@ [{/if}] - [{if $oView->fcpoBNPLShowFon()}] + [{if $oView->fcpoBNPLShowFon($sPaymentID)}]
    diff --git a/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secinstallment.tpl b/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secinstallment.tpl index f3230e67..431ae4df 100644 --- a/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secinstallment.tpl +++ b/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secinstallment.tpl @@ -49,7 +49,7 @@
    [{/if}] - [{if $oView->fcpoBNPLShowFon()}] + [{if $oView->fcpoBNPLShowFon($sPaymentID)}]
    diff --git a/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secinvoice.tpl b/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secinvoice.tpl index 1f1b917f..a7f03770 100644 --- a/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secinvoice.tpl +++ b/application/views/frontend/tpl/flow/fcpo_payment_bnpl_secinvoice.tpl @@ -7,7 +7,11 @@ [{if $oView->fcpoBNPLShowBirthdate()}]
    + [{if $oView->fcpoIsB2BPov()}] + + [{else}] + [{/if}]
    -
    + [{if $oView->fcpoBNPLShowFon($sPaymentID)}] +
    + [{if $oView->fcpoIsB2BPov()}] + + [{else}] + + [{/if}] +
    +
    +
    + [{/if}] + + [{if $oView->fcpoIsB2BPov()}] + [{if ! $oView->fcpoGetUserValue('oxustid')}] +
    + +
    + +
    + +
    + [{/if}] [{/if}] [{oxid_include_dynamic file=$oViewConf->fcpoGetAbsModuleTemplateFrontendPath('fcpo_payment_bnpl_snippet.tpl')}] diff --git a/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secdebitnote.tpl b/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secdebitnote.tpl index ccf7aaca..8ac37ea4 100644 --- a/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secdebitnote.tpl +++ b/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secdebitnote.tpl @@ -1,45 +1,45 @@
    -
    -
    - getCheckedPaymentId() == $paymentmethod->oxpayments__oxid->value}]checked[{/if}]> - -
    -
    - - - [{if $oView->fcpoBNPLShowBirthdate()}] -
    - -
    +
    +
    + getCheckedPaymentId() == $paymentmethod->oxpayments__oxid->value}]checked[{/if}]> + +
    +
    + + + [{if $oView->fcpoBNPLShowBirthdate()}] +
    + +
    -   + [{foreach from=$oView->fcpoGetDayRange() item='sDay'}] + + [{/foreach}] + +   -   + [{foreach from=$oView->fcpoGetMonthRange() item='sMonth'}] + + [{/foreach}] + +   -
    -
    - [{/if}] + [{foreach from=$oView->fcpoGetYearRange() item='sYear'}] + + [{/foreach}] + +
    +
    + [{/if}] - [{if $oView->fcpoBNPLShowFon()}] -
    - -
    - -
    -
    - [{/if}] + [{if $oView->fcpoBNPLShowFon($sPaymentID)}] +
    + +
    + +
    +
    + [{/if}]
    @@ -52,20 +52,20 @@
    - [{oxid_include_dynamic file=$oViewConf->fcpoGetAbsModuleTemplateFrontendPath('fcpo_payment_bnpl_snippet.tpl')}] - [{block name="checkout_payment_longdesc"}] - [{if $paymentmethod->oxpayments__oxlongdesc->value}] -
    - [{$paymentmethod->oxpayments__oxlongdesc->getRawValue()}] -
    - [{/if}] - [{/block}] + [{oxid_include_dynamic file=$oViewConf->fcpoGetAbsModuleTemplateFrontendPath('fcpo_payment_bnpl_snippet.tpl')}] + [{block name="checkout_payment_longdesc"}] + [{if $paymentmethod->oxpayments__oxlongdesc->value}] +
    + [{$paymentmethod->oxpayments__oxlongdesc->getRawValue()}] +
    + [{/if}] + [{/block}] -
    - [{oxmultilang ident='FCPO_BNPL_TNC_DATAPROTECTION_NOTICE'}] -
    +
    + [{oxmultilang ident='FCPO_BNPL_TNC_DATAPROTECTION_NOTICE'}] +
    -
-
+ +
diff --git a/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secinstallment.tpl b/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secinstallment.tpl index deab1891..b1a03e25 100644 --- a/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secinstallment.tpl +++ b/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secinstallment.tpl @@ -50,7 +50,7 @@ [{/if}] - [{if $oView->fcpoBNPLShowFon()}] + [{if $oView->fcpoBNPLShowFon($sPaymentID)}]
diff --git a/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secinvoice.tpl b/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secinvoice.tpl index 0512e2af..87364383 100644 --- a/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secinvoice.tpl +++ b/application/views/frontend/tpl/wave/fcpo_payment_bnpl_secinvoice.tpl @@ -1,59 +1,81 @@
-
-
- getCheckedPaymentId() == $paymentmethod->oxpayments__oxid->value}]checked[{/if}]> - -
-
- - [{if $oView->fcpoBNPLShowBirthdate()}] -
- -
- -   - -   - -
-
- [{/if}] +
+
+ getCheckedPaymentId() == $paymentmethod->oxpayments__oxid->value}]checked[{/if}]> + +
+
+ + [{if $oView->fcpoBNPLShowBirthdate()}] +
+ [{if $oView->fcpoIsB2BPov()}] + + [{else}] + + [{/if}] +
+ +   + +   + +
+
+ [{/if}] - [{if $oView->fcpoBNPLShowFon()}] -
- -
- -
-
- [{/if}] + [{if $oView->fcpoBNPLShowFon($sPaymentID)}] +
+ [{if $oView->fcpoIsB2BPov()}] + + [{else}] + + [{/if}] +
+ +
+
+ [{/if}] - [{oxid_include_dynamic file=$oViewConf->fcpoGetAbsModuleTemplateFrontendPath('fcpo_payment_bnpl_snippet.tpl')}] - [{block name="checkout_payment_longdesc"}] - [{if $paymentmethod->oxpayments__oxlongdesc->value}] -
- [{$paymentmethod->oxpayments__oxlongdesc->getRawValue()}] -
- [{/if}] - [{/block}] + [{if $oView->fcpoIsB2BPov()}] + [{if ! $oView->fcpoGetUserValue('oxustid')}] +
+ +
+ +
+ +
+ [{/if}] + [{/if}] -
- [{oxmultilang ident='FCPO_BNPL_TNC_DATAPROTECTION_NOTICE'}] -
+ [{oxid_include_dynamic file=$oViewConf->fcpoGetAbsModuleTemplateFrontendPath('fcpo_payment_bnpl_snippet.tpl')}] + [{block name="checkout_payment_longdesc"}] + [{if $paymentmethod->oxpayments__oxlongdesc->value}] +
+ [{$paymentmethod->oxpayments__oxlongdesc->getRawValue()}] +
+ [{/if}] + [{/block}] -
-
+
+ [{oxmultilang ident='FCPO_BNPL_TNC_DATAPROTECTION_NOTICE'}] +
+ +
+
diff --git a/extend/application/controllers/fcPayOnePaymentView.php b/extend/application/controllers/fcPayOnePaymentView.php index ad7371e0..72b847a5 100755 --- a/extend/application/controllers/fcPayOnePaymentView.php +++ b/extend/application/controllers/fcPayOnePaymentView.php @@ -1555,10 +1555,13 @@ protected function _fcpoCheckBNPLRemoval() $blshowshipaddress = $this->_oFcpoHelper->fcpoGetSessionVariable('blshowshipaddress'); $blDiffShippingAllowed = $this->_oFcpoHelper->fcpoGetConfig()->getConfigParam('blFCPOPLAllowDiffAddress'); - if ((!$blDiffShippingAllowed && $blshowshipaddress == 1) || $blIsB2B) { + if ((!$blDiffShippingAllowed && $blshowshipaddress == 1)) { $this->_fcpoRemovePaymentFromFrontend('fcpopl_secinvoice'); $this->_fcpoRemovePaymentFromFrontend('fcpopl_secinstallment'); $this->_fcpoRemovePaymentFromFrontend('fcpopl_secdebitnote'); + } elseif ($blIsB2B) { + $this->_fcpoRemovePaymentFromFrontend('fcpopl_secinstallment'); + $this->_fcpoRemovePaymentFromFrontend('fcpopl_secdebitnote'); } } @@ -1779,7 +1782,7 @@ protected function _fcpoUserIsAdult() { * @return bool */ protected function _fcpoAdultCheckRequired($sPaymentId) { - $aAffectedPaymentTypes = array('fcpo_secinvoice'); + $aAffectedPaymentTypes = array('fcpo_secinvoice', 'fcpopl_secinvoice', 'fcpopl_secinstallment', 'fcpopl_secdebitnote'); $blReturn = false; if (in_array($sPaymentId, $aAffectedPaymentTypes)) { $blReturn = true; @@ -2552,6 +2555,8 @@ public function _fcpoBNPLSaveRequestedValues($mReturn, $sPaymentId) } } + $this->_fcpoSaveUserData($sPaymentId,'oxustid'); + return ($blBirthdayCheckPassed && $blInstallmentPlanCheckPassed) ? $mReturn : false; } @@ -2730,7 +2735,7 @@ protected function _fcpoValidateBirthdayData($sPaymentId, $aRequestedValues) $blFieldPresence = isset($aRequestedValues['fcpopl_secinvoice_birthdate_day']) && isset($aRequestedValues['fcpopl_secinvoice_birthdate_month']) && isset($aRequestedValues['fcpopl_secinvoice_birthdate_year']); - $blBirthdayRequired = $blB2CMode && $blFieldPresence; + $blBirthdayRequired = ($blB2CMode || $sPaymentId == 'fcpopl_secinvoice') && $blFieldPresence; $blValidBirthdateData = $this->_fcpoValidateSecInvoiceBirthdayData($sPaymentId, $aRequestedValues); break; } @@ -2815,6 +2820,10 @@ protected function _fcpoGetRequestedValue($sPaymentId, $sDbFieldName) { $mReturn = (string) $aRequestedValues['fcpo_secinvoice_ustid']; } + if (isset($aRequestedValues['fcpopl_secinvoice_ustid'])) { + $mReturn = (string) $aRequestedValues['fcpopl_secinvoice_ustid']; + } + return $mReturn; } @@ -3943,12 +3952,15 @@ public function fcpoAplCertificateCheck() * @param void * @return bool */ - public function fcpoBNPLShowFon() + public function fcpoBNPLShowFon($sPaymentID = '') { $oUser = $this->getUser(); $blIsB2B = $oUser->oxuser__oxcompany->value != ''; - return (!$blIsB2B && $oUser->oxuser__oxfon->value == ''); + return ( + (!$blIsB2B || $sPaymentID == 'fcpopl_secinvoice') + && $oUser->oxuser__oxfon->value == '' + ); } /** @@ -3960,8 +3972,6 @@ public function fcpoBNPLShowFon() public function fcpoBNPLShowBirthdate() { $oUser = $this->getUser(); - $blIsB2B = $oUser->oxuser__oxcompany->value != ''; - - return (!$blIsB2B && (is_null($oUser->oxuser__oxbirthdate->value) || $oUser->oxuser__oxbirthdate->value == '0000-00-00')); + return ((is_null($oUser->oxuser__oxbirthdate->value) || $oUser->oxuser__oxbirthdate->value == '0000-00-00')); } }