diff --git a/locale.xml b/locale.xml index aa93f33253574c990651413b8be70e4a59764ece..d136576b6a32bd9957f1d5ae302707822a0b433f 100644 --- a/locale.xml +++ b/locale.xml @@ -214,8 +214,8 @@ <en><![CDATA[Please provide your credit card information in the secure form and click <b>Authorize recurring payment</b> to start the payment process.]]></en> </locale> <locale name="payment.PaymentStep.title.SepaDebit"> - <de><![CDATA[Bezahlung mit SEPA-Lastschrift (über Stripe)]]></de> - <en><![CDATA[Payment with SEPA Direct Debit (via Stripe)]]></en> + <de><![CDATA[Bezahlung mit SEPA-Lastschrift]]></de> + <en><![CDATA[Payment with SEPA Direct Debit]]></en> </locale> <locale name="payment.PaymentStep.info.Card" html="true"> <de><![CDATA[Bitte geben Sie Ihre Kontodaten im sicheren Formular an und klicken auf <b>Jetzt bezahlen</b>, um den Zahlungsvorgang zu starten.]]></de> diff --git a/src/QUI/ERP/Payments/Stripe/PaymentMethods/Recurring/SepaDebit.php b/src/QUI/ERP/Payments/Stripe/PaymentMethods/Recurring/SepaDebit.php index 20cbb7101a33cbfc13ae60ff5ea784011465c895..da5b814359c5909e18f7c1e0c38e7f2066525fbc 100644 --- a/src/QUI/ERP/Payments/Stripe/PaymentMethods/Recurring/SepaDebit.php +++ b/src/QUI/ERP/Payments/Stripe/PaymentMethods/Recurring/SepaDebit.php @@ -146,6 +146,9 @@ protected function createPaymentIntentForOrder(AbstractOrder $Order, string $pay 'metadata' => [ 'orderUuid' => $Order->getUUID() ], + 'payment_method_types' => [ + PaymentMethod::TYPE_SEPA_DEBIT + ], 'mandate_data' => [ 'customer_acceptance' => [ 'type' => 'online', diff --git a/src/QUI/ERP/Payments/Stripe/PaymentMethods/SepaDebit.php b/src/QUI/ERP/Payments/Stripe/PaymentMethods/SepaDebit.php index 52cb75f016c5205989807f30d41929e67faf616f..0efd087643f360dbbe17f9451e78f6886d4b24c7 100644 --- a/src/QUI/ERP/Payments/Stripe/PaymentMethods/SepaDebit.php +++ b/src/QUI/ERP/Payments/Stripe/PaymentMethods/SepaDebit.php @@ -7,15 +7,14 @@ use QUI\ERP\Accounting\Invoice\Invoice; use QUI\ERP\Accounting\Invoice\InvoiceTemporary; use QUI\ERP\Accounting\Invoice\InvoiceView; -use QUI\ERP\Accounting\Payments\Payments; use QUI\ERP\Order\AbstractOrder; use QUI\ERP\Order\OrderInterface; use QUI\ERP\Payments\Stripe\AbstractBasePayment; +use QUI\ERP\Payments\Stripe\Provider; use QUI\ERP\Payments\Stripe\Utils; use Stripe\Exception\ApiErrorException; use Stripe\PaymentIntent as StripePaymentIntent; use Stripe\PaymentMethod; -use QUI\ERP\Payments\Stripe\Provider; /** * Stripe payment with SEPA Direct Debit @@ -65,7 +64,7 @@ public function getFrontendDescription(): string */ public function getPaymentStepTitle(): string { - return $this->getLocale()->get('quiqqer/payment-stripe', 'payment.PaymentStep.title.Card'); + return $this->getLocale()->get('quiqqer/payment-stripe', 'payment.PaymentStep.title.SepaDebit'); } /** @@ -75,7 +74,7 @@ public function getPaymentStepTitle(): string */ public function getPaymentStepInfo(): string { - return $this->getLocale()->get('quiqqer/payment-stripe', 'payment.PaymentStep.info.Card'); + return $this->getLocale()->get('quiqqer/payment-stripe', 'payment.PaymentStep.info.SepaDebit'); } // /** @@ -117,13 +116,11 @@ protected function createPaymentIntentForOrder(AbstractOrder $Order, string $pay 'payment_method' => $paymentMethodId, 'amount' => Utils::getCentAmount($Order), 'currency' => mb_strtolower($Order->getCurrency()->getCode()), -// 'confirmation_method' => 'manual', 'confirm' => true, 'description' => Utils::getPaymentDescriptionForOrder($Order), 'statement_descriptor' => Provider::getStatementDescriptor($Order), - 'automatic_payment_methods' => [ - 'enabled' => true, - 'allow_redirects' => 'never' + 'payment_method_types' => [ + PaymentMethod::TYPE_SEPA_DEBIT ], 'metadata' => [ 'orderUuid' => $Order->getUUID()