From 11d35a3dd3d8040ababfe59d8388cb8ff5e2e57f Mon Sep 17 00:00:00 2001 From: Mario Lorenz Date: Tue, 9 Jul 2024 17:20:27 +0200 Subject: [PATCH] fix showing errormessage new card --- .../views/frontend/tpl/stripecreditcard.tpl | 2 +- CHANGELOG.md | 6 ++ metadata.php | 73 ++++++++++++++----- 3 files changed, 60 insertions(+), 21 deletions(-) diff --git a/Application/views/frontend/tpl/stripecreditcard.tpl b/Application/views/frontend/tpl/stripecreditcard.tpl index 8aa658e..79bd8aa 100644 --- a/Application/views/frontend/tpl/stripecreditcard.tpl +++ b/Application/views/frontend/tpl/stripecreditcard.tpl @@ -100,7 +100,7 @@ stripe.createToken(cardElement, {name: holder}) .then(function(result) { - if (result.error) { + if (result.error && (!stripeUsedCard || stripeUsedCard === 'new')) { displayError.textContent = result.error.message; displayErrorBox.style.display = 'block'; } else { diff --git a/CHANGELOG.md b/CHANGELOG.md index eaa21dc..a2e41a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.0.4] - 2024-07-09 + +### Fixed + +- [0007692](https://bugs.oxid-esales.com/view.php?id=7692): When switching to the OXID summary page (OrderController), a message appears briefly: Card number incomplete + ## [1.0.3] - 2024-06-27 ### NEW diff --git a/metadata.php b/metadata.php index d5643cf..3a6f9e9 100644 --- a/metadata.php +++ b/metadata.php @@ -7,6 +7,39 @@ /** * Metadata version */ + +use OxidEsales\Eshop\Application\Model\PaymentGateway as OxPaymentGateway; +use OxidEsales\Eshop\Application\Model\Order as OxOrder; +use OxidEsales\Eshop\Application\Model\OrderArticle as OxOrderArticle; +use OxidEsales\Eshop\Application\Model\Payment as OxPayment; +use OxidEsales\Eshop\Application\Controller\Admin\ModuleConfiguration as OxModuleConfiguration; +use OxidEsales\Eshop\Application\Controller\Admin\ModuleMain as OxModuleMain; +use OxidEsales\Eshop\Application\Controller\Admin\PaymentMain as OxPaymentMain; +use OxidEsales\Eshop\Application\Controller\Admin\OrderMain as OxOrderMain; +use OxidEsales\Eshop\Application\Controller\Admin\OrderOverview as OxOrderOverView; +use OxidEsales\Eshop\Application\Controller\PaymentController as OxPaymentController; +use OxidEsales\Eshop\Application\Controller\OrderController as OxOrderController; +use OxidEsales\Eshop\Core\Email as OxEmail; +use OxidEsales\Eshop\Core\Session as OxSession; +use OxidSolutionCatalysts\Stripe\Application\Controller\StripeWebhook; +use OxidSolutionCatalysts\Stripe\Application\Controller\StripeFinishPayment; +use OxidSolutionCatalysts\Stripe\Application\Controller\Admin\OrderRefund; +use OxidSolutionCatalysts\Stripe\Application\Controller\Admin\StripeConnect; +use OxidSolutionCatalysts\Stripe\Core\Events; +use OxidSolutionCatalysts\Stripe\extend\Application\Model\PaymentGateway; +use OxidSolutionCatalysts\Stripe\extend\Application\Model\Order; +use OxidSolutionCatalysts\Stripe\extend\Application\Model\OrderArticle; +use OxidSolutionCatalysts\Stripe\extend\Application\Model\Payment; +use OxidSolutionCatalysts\Stripe\extend\Application\Controller\Admin\ModuleConfiguration; +use OxidSolutionCatalysts\Stripe\extend\Application\Controller\Admin\ModuleMain; +use OxidSolutionCatalysts\Stripe\extend\Application\Controller\Admin\PaymentMain; +use OxidSolutionCatalysts\Stripe\extend\Application\Controller\Admin\OrderMain; +use OxidSolutionCatalysts\Stripe\extend\Application\Controller\Admin\OrderOverview; +use OxidSolutionCatalysts\Stripe\extend\Application\Controller\PaymentController; +use OxidSolutionCatalysts\Stripe\extend\Application\Controller\OrderController; +use OxidSolutionCatalysts\Stripe\extend\Core\Email; +use OxidSolutionCatalysts\Stripe\extend\Core\Session; + $sMetadataVersion = '2.1'; /** @@ -24,30 +57,30 @@ 'en' => 'This module integrates STRIPE as payment provider in your OXID Shop.', ], 'thumbnail' => 'stripe_logo.png', - 'version' => '1.0.3', + 'version' => '1.0.4', 'author' => 'OXID eSales AG', 'url' => 'https://www.oxid-esales.com', 'email' => 'info@oxid-esales.com', 'extend' => [ - \OxidEsales\Eshop\Application\Model\PaymentGateway::class => OxidSolutionCatalysts\Stripe\extend\Application\Model\PaymentGateway::class, - \OxidEsales\Eshop\Application\Model\Order::class => OxidSolutionCatalysts\Stripe\extend\Application\Model\Order::class, - \OxidEsales\Eshop\Application\Model\OrderArticle::class => OxidSolutionCatalysts\Stripe\extend\Application\Model\OrderArticle::class, - \OxidEsales\Eshop\Application\Model\Payment::class => OxidSolutionCatalysts\Stripe\extend\Application\Model\Payment::class, - \OxidEsales\Eshop\Application\Controller\Admin\ModuleConfiguration::class => OxidSolutionCatalysts\Stripe\extend\Application\Controller\Admin\ModuleConfiguration::class, - \OxidEsales\Eshop\Application\Controller\Admin\ModuleMain::class => OxidSolutionCatalysts\Stripe\extend\Application\Controller\Admin\ModuleMain::class, - \OxidEsales\Eshop\Application\Controller\Admin\PaymentMain::class => OxidSolutionCatalysts\Stripe\extend\Application\Controller\Admin\PaymentMain::class, - \OxidEsales\Eshop\Application\Controller\Admin\OrderMain::class => OxidSolutionCatalysts\Stripe\extend\Application\Controller\Admin\OrderMain::class, - \OxidEsales\Eshop\Application\Controller\Admin\OrderOverview::class => OxidSolutionCatalysts\Stripe\extend\Application\Controller\Admin\OrderOverview::class, - \OxidEsales\Eshop\Application\Controller\PaymentController::class => OxidSolutionCatalysts\Stripe\extend\Application\Controller\PaymentController::class, - \OxidEsales\Eshop\Application\Controller\OrderController::class => OxidSolutionCatalysts\Stripe\extend\Application\Controller\OrderController::class, - \OxidEsales\Eshop\Core\Email::class => OxidSolutionCatalysts\Stripe\extend\Core\Email::class, - \OxidEsales\Eshop\Core\Session::class => OxidSolutionCatalysts\Stripe\extend\Core\Session::class, + OxPaymentGateway::class => PaymentGateway::class, + OxOrder::class => Order::class, + OxOrderArticle::class => OrderArticle::class, + OxPayment::class => Payment::class, + OxModuleConfiguration::class => ModuleConfiguration::class, + OxModuleMain::class => ModuleMain::class, + OxPaymentMain::class => PaymentMain::class, + OxOrderMain::class => OrderMain::class, + OxOrderOverView::class => OrderOverview::class, + OxPaymentController::class => PaymentController::class, + OxOrderController::class => OrderController::class, + OxEmail::class => Email::class, + OxSession::class => Session::class, ], 'controllers' => [ - 'StripeWebhook' => OxidSolutionCatalysts\Stripe\Application\Controller\StripeWebhook::class, - 'StripeFinishPayment' => OxidSolutionCatalysts\Stripe\Application\Controller\StripeFinishPayment::class, - 'stripe_order_refund' => OxidSolutionCatalysts\Stripe\Application\Controller\Admin\OrderRefund::class, - 'StripeConnect' => \OxidSolutionCatalysts\Stripe\Application\Controller\Admin\StripeConnect::class, + 'StripeWebhook' => StripeWebhook::class, + 'StripeFinishPayment' => StripeFinishPayment::class, + 'stripe_order_refund' => OrderRefund::class, + 'StripeConnect' => StripeConnect::class, ], 'templates' => [ 'stripewebhook.tpl' => 'osc/stripe/Application/views/hook/tpl/stripewebhook.tpl', @@ -63,8 +96,8 @@ 'stripe_connect.tpl' => 'osc/stripe/Application/views/admin/tpl/stripe_connect.tpl', ], 'events' => [ - 'onActivate' => \OxidSolutionCatalysts\Stripe\Core\Events::class.'::onActivate', - 'onDeactivate' => \OxidSolutionCatalysts\Stripe\Core\Events::class.'::onDeactivate', + 'onActivate' => Events::class.'::onActivate', + 'onDeactivate' => Events::class.'::onDeactivate', ], 'blocks' => [ ['template' => 'module_config.tpl', 'block' => 'admin_module_config_var', 'file' => 'stripe_module_config_var.tpl'],