diff --git a/Application/Model/Request/PaymentIntent.php b/Application/Model/Request/PaymentIntent.php index f92f7d6..77fd8b9 100644 --- a/Application/Model/Request/PaymentIntent.php +++ b/Application/Model/Request/PaymentIntent.php @@ -6,6 +6,7 @@ namespace OxidSolutionCatalysts\Stripe\Application\Model\Request; +use OxidEsales\EshopCommunity\Core\Registry; use OxidSolutionCatalysts\Stripe\Application\Helper\Order as OrderHelper; use OxidSolutionCatalysts\Stripe\Application\Helper\Payment as PaymentHelper; use OxidSolutionCatalysts\Stripe\Application\Helper\User as UserHelper; @@ -48,7 +49,10 @@ public function addRequestParameters(CoreOrder $oOrder, $dAmount, $sReturnUrl, $ $this->addParameter('customer', $sStripeCustomerId); } - $this->addParameter('receipt_email', $this->getCustomerEmail($oCoreUser)); + //task STRIP-47, overriding customer email only if module setting is enabled + if (Registry::getConfig()->getShopConfVar('blStripeProvideCustomerEmailAddress')) { + $this->addParameter('receipt_email', $this->getCustomerEmail($oCoreUser)); + } if ($oPaymentModel->isRedirectUrlNeeded($oOrder) === true) { $this->addParameter('return_url', $sReturnUrl); diff --git a/Application/views/admin/de/stripe_lang.php b/Application/views/admin/de/stripe_lang.php index ebdf445..27a2360 100644 --- a/Application/views/admin/de/stripe_lang.php +++ b/Application/views/admin/de/stripe_lang.php @@ -38,6 +38,7 @@ 'SHOP_MODULE_sStripeCronSecureKey' => 'Cronjob Sicherheits-Schlüssel', 'SHOP_MODULE_GROUP_STRIPE_WEBHOOKS' => 'Webhooks', 'SHOP_MODULE_sStripeWebhookEndpoint' => 'Webhook Endpoint', + 'SHOP_MODULE_blStripeProvideCustomerEmailAddress' => 'Kunden-E-Mail-Adresse an Stripe senden', 'HELP_SHOP_MODULE_sStripeTestKey' => 'Geben Sie Ihren persönlichen privaten TEST-API-Schlüssel ein, der zum Einrichten des Webhook-Endpunkts verwendet wird.', 'HELP_SHOP_MODULE_sStripeLiveKey' => 'Geben Sie Ihren persönlichen privaten LIVE-API-Schlüssel ein, der zum Einrichten des Webhook-Endpunkts verwendet wird.', @@ -52,6 +53,7 @@ 'HELP_SHOP_MODULE_sStripeCronSecondChanceActive' => 'Damit dieser Cronjob arbeitet, müssen Sie zusätzlich zu dieser Checkbox noch sicherstellen dass der Stripe Cronjob eingerichtet ist. Mehr dazu erfahren Sie in der README.md Datei des Moduls.', 'HELP_SHOP_MODULE_sStripeCronOrderShipmentActive' => 'Dieser Cronjob ist nur notwendig, wenn der Versandstatus in Ihrem Shop über ein externes System gesetzt wird und NICHT über den "Jetzt versenden" Button im Oxid-Admin. Damit dieser Cronjob arbeitet, müssen Sie zusätzlich zu dieser Checkbox noch sicherstellen dass der Stripe Cronjob eingerichtet ist. Mehr dazu erfahren Sie in der README.md Datei des Moduls.', 'HELP_SHOP_MODULE_sStripeCronSecureKey' => 'Diese Option benötigen Sie nur, wenn Sie den Cronjob per URL aufrufen müssen anstelle von dem Aufruf über die php cli. Konfigurieren Sie hier einen Sicherheitsschlüssel, den Sie über den GET-Parameter "secureKey" an den Aufruf des Cronjobs anfügen. Bsp.: https://YOUR-SHOP-URL-HERE/modules/fc/stripe/cron.php?secureKey=YOUR-SECURE-KEY', + 'HELP_SHOP_MODULE_blStripeProvideCustomerEmailAddress' => 'Ist diese Option aktiviert so, wird bei einer Stripe-Bestellung die Kunden-EMailadresse ebenfalls übergeben. Das überschreibt die Standard-E-Mail-Einstellungen im Stripe-Account für diese Bestellung. Somit werden die Benachrichtigungen zu dieser Bestellung an die Kunden-EMail-Adresse gesendet, statt an die Stripe-Account-EMail-Adresse.', 'STRIPE_YES' => 'Ja', 'STRIPE_NO' => 'Nein', diff --git a/Application/views/admin/en/stripe_lang.php b/Application/views/admin/en/stripe_lang.php index afecaf5..26e17ca 100644 --- a/Application/views/admin/en/stripe_lang.php +++ b/Application/views/admin/en/stripe_lang.php @@ -38,6 +38,7 @@ 'SHOP_MODULE_sStripeCronSecureKey' => 'Cronjob secure key', 'SHOP_MODULE_GROUP_STRIPE_WEBHOOKS' => 'Webhooks', 'SHOP_MODULE_sStripeWebhookEndpoint' => 'Webhook Endpoint', + 'SHOP_MODULE_blStripeProvideCustomerEmailAddress' => 'Send customer email address to Stripe', 'HELP_SHOP_MODULE_sStripeTestKey' => 'Fill in your personal TEST private API key that will be used to set up the webhook endpoint.', 'HELP_SHOP_MODULE_sStripeLiveKey' => 'Fill in your personal LIVE private API key that will be used to set up the webhook endpoint.', @@ -52,6 +53,7 @@ 'HELP_SHOP_MODULE_sStripeCronSecondChanceActive' => 'For this cronjob to work, in addition to this checkbox you have to ensure that the Stripe cronjob is set up properly. You can find information on how to set up the cronjob in the README.md of this module.', 'HELP_SHOP_MODULE_sStripeCronOrderShipmentActive' => 'This cronjob is only needed if the shipping status in your shop is set by an external service and NOT by the "Ship Now" button. For this cronjob to work, in addition to this checkbox you have to ensure that the Stripe cronjob is set up properly. You can find information on how to set up the cronjob in the README.md of this module.', 'HELP_SHOP_MODULE_sStripeCronSecureKey' => 'This option is only needed if you have to call the cronjob via URL instead of the php cli. Configure your secure key here, which you have to add to the cronjob call as the GET parameter "secureKey". Example: https://YOUR-SHOP-URL-HERE/modules/fc/stripe/cron.php?secureKey=YOUR-SECURE-KEY', + 'HELP_SHOP_MODULE_blStripeProvideCustomerEmailAddress' => 'If this option is activated, the customer email address will also be passed on for a Stripe order. This overwrites the standard email settings in the Stripe account for this order. This means that notifications for this order are sent to the customer email address instead of to the Stripe account email address.', 'STRIPE_YES' => 'Yes', 'STRIPE_NO' => 'No', diff --git a/CHANGELOG.md b/CHANGELOG.md index cce649a..dff519b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - [0007731](https://bugs.oxid-esales.com/view.php?id=7731): More Errorcodes +- Submitting the customer email address is optional ## [1.0.6] - 2024-11-15 diff --git a/metadata.php b/metadata.php index dfd1f66..c9a8442 100644 --- a/metadata.php +++ b/metadata.php @@ -57,7 +57,7 @@ 'en' => 'This module integrates STRIPE as payment provider in your OXID Shop.', ], 'thumbnail' => 'stripe_logo.png', - 'version' => '1.0.7-rc2', + 'version' => '1.0.7-rc3', 'author' => 'OXID eSales AG', 'url' => 'https://www.oxid-esales.com', 'email' => 'info@oxid-esales.com', @@ -118,6 +118,7 @@ ['group' => 'STRIPE_GENERAL', 'name' => 'blStripeLogTransactionInfo', 'type' => 'bool', 'value' => '1', 'position' => 34], ['group' => 'STRIPE_GENERAL', 'name' => 'blStripeRemoveByBillingCountry', 'type' => 'bool', 'value' => '1', 'position' => 35], ['group' => 'STRIPE_GENERAL', 'name' => 'blStripeRemoveByBasketCurrency', 'type' => 'bool', 'value' => '1', 'position' => 36], + ['group' => 'STRIPE_GENERAL', 'name' => 'blStripeProvideCustomerEmailAddress','type' => 'bool', 'value' => '0', 'position' => 37], ['group' => 'STRIPE_STATUS_MAPPING', 'name' => 'sStripeStatusPending', 'type' => 'select', 'value' => '', 'position' => 50], ['group' => 'STRIPE_STATUS_MAPPING', 'name' => 'sStripeStatusProcessing', 'type' => 'select', 'value' => '', 'position' => 60], ['group' => 'STRIPE_STATUS_MAPPING', 'name' => 'sStripeStatusCancelled', 'type' => 'select', 'value' => '', 'position' => 70],