diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-10-09 02:08:17 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-10-09 02:08:17 +0200 |
| commit | d74b4518052066446e2a1975a91ce53c745ca75a (patch) | |
| tree | c08180f88a512d15e37fbec628931f02b3825f65 /addons/payment_stripe | |
| parent | ec162dd0cb5622ab6e56db1a63dab5f531a96f4a (diff) | |
| parent | f4105eb9c7010f8693e5d2fd20c0bd9d9cc2e483 (diff) | |
[MERGE] forward port branch 13.0 up to f4105eb9c70
Diffstat (limited to 'addons/payment_stripe')
32 files changed, 550 insertions, 396 deletions
diff --git a/addons/payment_stripe/__manifest__.py b/addons/payment_stripe/__manifest__.py index 247fe74859b..85586ef94e9 100644 --- a/addons/payment_stripe/__manifest__.py +++ b/addons/payment_stripe/__manifest__.py @@ -2,7 +2,7 @@ { 'name': 'Stripe Payment Acquirer', - 'category': 'Hidden', + 'category': 'Accounting/Payment', 'summary': 'Payment Acquirer: Stripe Implementation', 'version': '1.0', 'description': """Stripe Payment Acquirer""", diff --git a/addons/payment_stripe/controllers/main.py b/addons/payment_stripe/controllers/main.py index d506621e5a3..5b5d70bcf6d 100644 --- a/addons/payment_stripe/controllers/main.py +++ b/addons/payment_stripe/controllers/main.py @@ -48,3 +48,7 @@ class StripeController(http.Controller): acquirer = request.env['payment.acquirer'].browse(int(acquirer_id)) res = acquirer._create_setup_intent(kwargs) return res.get('client_secret') + + @http.route('/payment/stripe/s2s/process_payment_intent', type='json', auth='public', csrf=False) + def stripe_s2s_process_payment_intent(self, **post): + return request.env['payment.transaction'].sudo().form_feedback(post, 'stripe') diff --git a/addons/payment_stripe/i18n/ar.po b/addons/payment_stripe/i18n/ar.po index caa7ad5f22f..654c01e1914 100644 --- a/addons/payment_stripe/i18n/ar.po +++ b/addons/payment_stripe/i18n/ar.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Yihya Hugirat <hugirat@gmail.com>, 2019\n" "Language-Team: Arabic (https://www.transifex.com/odoo/teams/41243/ar/)\n" @@ -145,6 +145,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: لم يُعثر على طلبات لرقم الإشارة %s" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/cs.po b/addons/payment_stripe/i18n/cs.po index 894d48dd951..e22f92cad8b 100644 --- a/addons/payment_stripe/i18n/cs.po +++ b/addons/payment_stripe/i18n/cs.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: trendspotter <j.podhorecky@volny.cz>, 2019\n" "Language-Team: Czech (https://www.transifex.com/odoo/teams/41243/cs/)\n" @@ -140,6 +140,14 @@ msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/da.po b/addons/payment_stripe/i18n/da.po index 35e209e3fe8..9b005ca378d 100644 --- a/addons/payment_stripe/i18n/da.po +++ b/addons/payment_stripe/i18n/da.po @@ -1,19 +1,20 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * payment_stripe +# * payment_stripe # # Translators: -# Martin Trigaux, 2018 -# Pernille Kristensen <pernillekristensen1994@gmail.com>, 2018 -# Sanne Kristensen <sanne@vkdata.dk>, 2018 -# lhmflexerp <lhm@flexerp.dk>, 2018 +# Martin Trigaux, 2019 +# Pernille Kristensen <pernillekristensen1994@gmail.com>, 2019 +# Sanne Kristensen <sanne@vkdata.dk>, 2019 +# lhmflexerp <lhm@flexerp.dk>, 2019 +# msgid "" msgstr "" -"Project-Id-Version: Odoo Server saas~11.5\n" +"Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-21 13:17+0000\n" -"PO-Revision-Date: 2018-09-21 13:17+0000\n" -"Last-Translator: lhmflexerp <lhm@flexerp.dk>, 2018\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" +"PO-Revision-Date: 2019-08-26 09:12+0000\n" +"Last-Translator: lhmflexerp <lhm@flexerp.dk>, 2019\n" "Language-Team: Danish (https://www.transifex.com/odoo/teams/41243/da/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,7 +24,7 @@ msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:9 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "×" msgstr "&timer;" @@ -37,87 +38,42 @@ msgid "" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Adyen" -msgstr "Adyen" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Authorize.Net" -msgstr "Authorize.Net" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Buckaroo" -msgstr "Buckaroo" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "CVC" -msgstr "" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Card number" -msgstr "Kort nummer" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Cardholder name" -msgstr "Kortholders navn" - -#. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_acquirer__stripe_image_url msgid "Checkout Image URL" msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:15 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "Close" msgstr "Luk" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:8 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "Error" msgstr "Fejl" #. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Expires (MM / YY)" -msgstr "Udløber (MM / ÅÅ)" - -#. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/js/stripe.js:33 +#: code:addons/payment_stripe/static/src/js/stripe.js:0 #, python-format -msgid "Just one more second, confirming your payment..." +msgid "Just one more second, We are redirecting you to Stripe..." msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Manual Configuration" -msgstr "Manuel konfiguration" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Ogone" -msgstr "Ogone" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "PayUmoney" -msgstr "PayUmoney" - -#. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_acquirer msgid "Payment Acquirer" msgstr "Betalingsindløser" #. module: payment_stripe +#: model:ir.model.fields,field_description:payment_stripe.field_payment_token__stripe_payment_method +msgid "Payment Method ID" +msgstr "" + +#. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_token msgid "Payment Token" msgstr "Betalingstoken" @@ -125,22 +81,17 @@ msgstr "Betalingstoken" #. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_transaction msgid "Payment Transaction" -msgstr "Betalings transaktion" +msgstr "Betalingstransaktion" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/js/stripe.js:59 +#: code:addons/payment_stripe/static/src/js/stripe.js:0 #, python-format msgid "Payment error" msgstr "Betalingsfejl" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Paypal" -msgstr "Paypal" - -#. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:174 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "" "Perhaps the problem can be solved by double-checking your credit card " @@ -153,16 +104,16 @@ msgid "Provider" msgstr "Udbyder" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Sips" -msgstr "Sips" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 +#: model:ir.model.fields.selection,name:payment_stripe.selection__payment_acquirer__provider__stripe msgid "Stripe" msgstr "Stribe" #. module: payment_stripe +#: model:ir.model.fields,field_description:payment_stripe.field_payment_transaction__stripe_payment_intent +msgid "Stripe Payment Intent ID" +msgstr "" + +#. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_acquirer__stripe_publishable_key msgid "Stripe Publishable Key" msgstr "" @@ -173,30 +124,47 @@ msgid "Stripe Secret Key" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:172 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe gave us the following info about the problem: '%s'" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:184 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe: %s orders found for reference %s" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:180 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:170 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format -msgid "We're sorry to report that the transaction has failed." -msgstr "Vi beklager at måtte meddele at transaktionen mislykkedes." +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe +#. openerp-web +#: code:addons/payment_stripe/static/src/js/payment_form.js:0 +#, python-format +msgid "Unable to save card" +msgstr "" + +#. module: payment_stripe +#. openerp-web +#: code:addons/payment_stripe/static/src/js/payment_form.js:0 +#, python-format +msgid "We are not able to add your payment method at the moment. " +msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Wire Transfer" -msgstr "Bankoverførsel" +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "We're sorry to report that the transaction has failed." +msgstr "Vi beklager at måtte meddele at transaktionen mislykkedes." diff --git a/addons/payment_stripe/i18n/de.po b/addons/payment_stripe/i18n/de.po index 7ba2277b539..40de6030fe0 100644 --- a/addons/payment_stripe/i18n/de.po +++ b/addons/payment_stripe/i18n/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Felix Schubert <felix.schubert@go-erp.com>, 2019\n" "Language-Team: German (https://www.transifex.com/odoo/teams/41243/de/)\n" @@ -145,6 +145,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: kein Auftrag für Referenz %s gefunden" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/es.po b/addons/payment_stripe/i18n/es.po index 161ff806853..37a489abd67 100644 --- a/addons/payment_stripe/i18n/es.po +++ b/addons/payment_stripe/i18n/es.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Martin Trigaux, 2019\n" "Language-Team: Spanish (https://www.transifex.com/odoo/teams/41243/es/)\n" @@ -144,6 +144,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: no se encontró una orden para la referencia %s" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/fr.po b/addons/payment_stripe/i18n/fr.po index a54c33efb62..f50cec6a769 100644 --- a/addons/payment_stripe/i18n/fr.po +++ b/addons/payment_stripe/i18n/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Martin Trigaux, 2019\n" "Language-Team: French (https://www.transifex.com/odoo/teams/41243/fr/)\n" @@ -145,6 +145,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe : aucune commande trouvée pour la référence %s" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/he.po b/addons/payment_stripe/i18n/he.po index a5b472e4bb3..8f40bdb600e 100644 --- a/addons/payment_stripe/i18n/he.po +++ b/addons/payment_stripe/i18n/he.po @@ -1,18 +1,19 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * payment_stripe +# * payment_stripe # # Translators: -# Martin Trigaux, 2018 -# ExcaliberX <excaliberx@gmail.com>, 2018 -# Yihya Hugirat <hugirat@gmail.com>, 2018 +# Martin Trigaux, 2019 +# ExcaliberX <excaliberx@gmail.com>, 2019 +# Yihya Hugirat <hugirat@gmail.com>, 2019 +# msgid "" msgstr "" -"Project-Id-Version: Odoo Server saas~11.5\n" +"Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-21 13:17+0000\n" -"PO-Revision-Date: 2018-09-21 13:17+0000\n" -"Last-Translator: Yihya Hugirat <hugirat@gmail.com>, 2018\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" +"PO-Revision-Date: 2019-08-26 09:12+0000\n" +"Last-Translator: Yihya Hugirat <hugirat@gmail.com>, 2019\n" "Language-Team: Hebrew (https://www.transifex.com/odoo/teams/41243/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,7 +23,7 @@ msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:9 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "×" msgstr "&פעמים;" @@ -36,79 +37,29 @@ msgid "" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Adyen" -msgstr "" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Authorize.Net" -msgstr "" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Buckaroo" -msgstr "" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "CVC" -msgstr "" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Card number" -msgstr "מספר הכרטיס" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Cardholder name" -msgstr "" - -#. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_acquirer__stripe_image_url msgid "Checkout Image URL" msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:15 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "Close" msgstr "סגור" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:8 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "Error" msgstr "שגיאה" #. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Expires (MM / YY)" -msgstr "" - -#. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/js/stripe.js:33 +#: code:addons/payment_stripe/static/src/js/stripe.js:0 #, python-format -msgid "Just one more second, confirming your payment..." -msgstr "" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Manual Configuration" -msgstr "" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Ogone" -msgstr "" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "PayUmoney" +msgid "Just one more second, We are redirecting you to Stripe..." msgstr "" #. module: payment_stripe @@ -117,6 +68,11 @@ msgid "Payment Acquirer" msgstr "תשלום נקלט" #. module: payment_stripe +#: model:ir.model.fields,field_description:payment_stripe.field_payment_token__stripe_payment_method +msgid "Payment Method ID" +msgstr "" + +#. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_token msgid "Payment Token" msgstr "" @@ -128,18 +84,13 @@ msgstr "עסקת תשלום" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/js/stripe.js:59 +#: code:addons/payment_stripe/static/src/js/stripe.js:0 #, python-format msgid "Payment error" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Paypal" -msgstr "" - -#. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:174 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "" "Perhaps the problem can be solved by double-checking your credit card " @@ -152,13 +103,13 @@ msgid "Provider" msgstr "ספק" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Sips" +#: model:ir.model.fields.selection,name:payment_stripe.selection__payment_acquirer__provider__stripe +msgid "Stripe" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Stripe" +#: model:ir.model.fields,field_description:payment_stripe.field_payment_transaction__stripe_payment_intent +msgid "Stripe Payment Intent ID" msgstr "" #. module: payment_stripe @@ -172,30 +123,47 @@ msgid "Stripe Secret Key" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:172 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe gave us the following info about the problem: '%s'" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:184 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe: %s orders found for reference %s" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:180 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:170 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format -msgid "We're sorry to report that the transaction has failed." +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Wire Transfer" +#. openerp-web +#: code:addons/payment_stripe/static/src/js/payment_form.js:0 +#, python-format +msgid "Unable to save card" +msgstr "" + +#. module: payment_stripe +#. openerp-web +#: code:addons/payment_stripe/static/src/js/payment_form.js:0 +#, python-format +msgid "We are not able to add your payment method at the moment. " +msgstr "" + +#. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "We're sorry to report that the transaction has failed." msgstr "" diff --git a/addons/payment_stripe/i18n/hr.po b/addons/payment_stripe/i18n/hr.po index e26f9f8b3f0..f3a7c5f7691 100644 --- a/addons/payment_stripe/i18n/hr.po +++ b/addons/payment_stripe/i18n/hr.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Tina Milas, 2019\n" "Language-Team: Croatian (https://www.transifex.com/odoo/teams/41243/hr/)\n" @@ -142,6 +142,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: nije pronađen nalog za referencu %s" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/hu.po b/addons/payment_stripe/i18n/hu.po index 8bc20637877..7bd48e3bda7 100644 --- a/addons/payment_stripe/i18n/hu.po +++ b/addons/payment_stripe/i18n/hu.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: gezza <geza.nagy@oregional.hu>, 2019\n" "Language-Team: Hungarian (https://www.transifex.com/odoo/teams/41243/hu/)\n" @@ -141,6 +141,14 @@ msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/it.po b/addons/payment_stripe/i18n/it.po index 2a8deac9e67..7b76ff2e8fe 100644 --- a/addons/payment_stripe/i18n/it.po +++ b/addons/payment_stripe/i18n/it.po @@ -4,16 +4,16 @@ # # Translators: # Paolo Valier, 2019 -# Sergio Zanchetta <primes2h@gmail.com>, 2019 # Luigia Cimmino Caserta <lcc@odoo.com>, 2019 +# Sergio Zanchetta <primes2h@gmail.com>, 2019 # msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" -"Last-Translator: Luigia Cimmino Caserta <lcc@odoo.com>, 2019\n" +"Last-Translator: Sergio Zanchetta <primes2h@gmail.com>, 2019\n" "Language-Team: Italian (https://www.transifex.com/odoo/teams/41243/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -63,7 +63,7 @@ msgstr "Errore" #: code:addons/payment_stripe/static/src/js/stripe.js:0 #, python-format msgid "Just one more second, We are redirecting you to Stripe..." -msgstr "Ancora qualche secondo, ti stiamo reindirizzando su Stripe" +msgstr "Ancora qualche secondo, reindirizzamento a Stripe..." #. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_acquirer @@ -146,6 +146,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: nessun ordine trovato con riferimento %s" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format @@ -157,7 +165,7 @@ msgstr "Impossibile salvare la carta" #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format msgid "We are not able to add your payment method at the moment. " -msgstr "Non ci è possibile aggiungere il tuo metodo di pagamento al momento." +msgstr "Impossibile, al momento, aggiungere il metodo di pagamento." #. module: payment_stripe #: code:addons/payment_stripe/models/payment.py:0 diff --git a/addons/payment_stripe/i18n/lb.po b/addons/payment_stripe/i18n/lb.po index 5364e189b06..37d3ccee593 100644 --- a/addons/payment_stripe/i18n/lb.po +++ b/addons/payment_stripe/i18n/lb.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Language-Team: Luxembourgish (https://www.transifex.com/odoo/teams/41243/lb/)\n" "MIME-Version: 1.0\n" @@ -135,6 +135,14 @@ msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/lt.po b/addons/payment_stripe/i18n/lt.po index 64aca577582..af5a6a33c29 100644 --- a/addons/payment_stripe/i18n/lt.po +++ b/addons/payment_stripe/i18n/lt.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Linas Versada <linaskrisiukenas@gmail.com>, 2019\n" "Language-Team: Lithuanian (https://www.transifex.com/odoo/teams/41243/lt/)\n" @@ -148,6 +148,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: numeriui %s nerasta užsakymų" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/mn.po b/addons/payment_stripe/i18n/mn.po index c6645c79cff..c0f0bcbc000 100644 --- a/addons/payment_stripe/i18n/mn.po +++ b/addons/payment_stripe/i18n/mn.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Martin Trigaux, 2019\n" "Language-Team: Mongolian (https://www.transifex.com/odoo/teams/41243/mn/)\n" @@ -143,6 +143,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: %s кодтой захиалга олдсонгүй" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/nb.po b/addons/payment_stripe/i18n/nb.po index c2a47cd4dfe..3d05daf649f 100644 --- a/addons/payment_stripe/i18n/nb.po +++ b/addons/payment_stripe/i18n/nb.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Martin Trigaux, 2019\n" "Language-Team: Norwegian Bokmål (https://www.transifex.com/odoo/teams/41243/nb/)\n" @@ -144,6 +144,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: Ingen ordre funnet for referansen %s" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/nl.po b/addons/payment_stripe/i18n/nl.po index 2934194ea19..c482139bb81 100644 --- a/addons/payment_stripe/i18n/nl.po +++ b/addons/payment_stripe/i18n/nl.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Yenthe Van Ginneken <yenthespam@gmail.com>, 2019\n" "Language-Team: Dutch (https://www.transifex.com/odoo/teams/41243/nl/)\n" @@ -147,6 +147,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: geen order gevonden voor referentie %s" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/payment_stripe.pot b/addons/payment_stripe/i18n/payment_stripe.pot index 25a93bc4e69..3b85d80b646 100644 --- a/addons/payment_stripe/i18n/payment_stripe.pot +++ b/addons/payment_stripe/i18n/payment_stripe.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server saas~12.5\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" -"PO-Revision-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-10-07 07:13+0000\n" +"PO-Revision-Date: 2019-10-07 07:13+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -107,6 +107,11 @@ msgid "Stripe Payment Intent ID" msgstr "" #. module: payment_stripe +#: model:ir.model.fields,field_description:payment_stripe.field_payment_transaction__stripe_payment_intent_secret +msgid "Stripe Payment Intent Secret" +msgstr "" + +#. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_acquirer__stripe_publishable_key msgid "Stripe Publishable Key" msgstr "" @@ -135,6 +140,14 @@ msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/pl.po b/addons/payment_stripe/i18n/pl.po index 70ba871e9f4..8bbea9a451c 100644 --- a/addons/payment_stripe/i18n/pl.po +++ b/addons/payment_stripe/i18n/pl.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Piotr Szlązak <szlazakpiotr@gmail.com>, 2019\n" "Language-Team: Polish (https://www.transifex.com/odoo/teams/41243/pl/)\n" @@ -141,6 +141,14 @@ msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/pt.po b/addons/payment_stripe/i18n/pt.po index 474f4b9c854..cee2e58904b 100644 --- a/addons/payment_stripe/i18n/pt.po +++ b/addons/payment_stripe/i18n/pt.po @@ -1,18 +1,13 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * payment_stripe +# * payment_stripe # -# Translators: -# Martin Trigaux, 2018 -# Ricardo Martins <ricardo.nbs.martins@gmail.com>, 2018 -# MS, 2018 msgid "" msgstr "" -"Project-Id-Version: Odoo Server saas~11.5\n" +"Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-21 13:17+0000\n" -"PO-Revision-Date: 2018-09-21 13:17+0000\n" -"Last-Translator: MS, 2018\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" +"PO-Revision-Date: 2019-08-26 09:12+0000\n" "Language-Team: Portuguese (https://www.transifex.com/odoo/teams/41243/pt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,10 +17,10 @@ msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:9 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "×" -msgstr "×" +msgstr "" #. module: payment_stripe #: model:ir.model.fields,help:payment_stripe.field_payment_acquirer__stripe_image_url @@ -36,87 +31,42 @@ msgid "" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Adyen" -msgstr "" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Authorize.Net" -msgstr "" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Buckaroo" -msgstr "" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "CVC" -msgstr "CVC" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Card number" -msgstr "Número do cartão" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Cardholder name" -msgstr "" - -#. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_acquirer__stripe_image_url msgid "Checkout Image URL" msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:15 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "Close" -msgstr "Fechar" +msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:8 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "Error" -msgstr "Erro" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Expires (MM / YY)" msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/js/stripe.js:33 +#: code:addons/payment_stripe/static/src/js/stripe.js:0 #, python-format -msgid "Just one more second, confirming your payment..." -msgstr "" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Manual Configuration" +msgid "Just one more second, We are redirecting you to Stripe..." msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Ogone" +#: model:ir.model,name:payment_stripe.model_payment_acquirer +msgid "Payment Acquirer" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "PayUmoney" +#: model:ir.model.fields,field_description:payment_stripe.field_payment_token__stripe_payment_method +msgid "Payment Method ID" msgstr "" #. module: payment_stripe -#: model:ir.model,name:payment_stripe.model_payment_acquirer -msgid "Payment Acquirer" -msgstr "Adquirente do Pagamento" - -#. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_token msgid "Payment Token" msgstr "" @@ -124,22 +74,17 @@ msgstr "" #. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_transaction msgid "Payment Transaction" -msgstr "Transação de Pagamento" +msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/js/stripe.js:59 +#: code:addons/payment_stripe/static/src/js/stripe.js:0 #, python-format msgid "Payment error" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Paypal" -msgstr "Paypal" - -#. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:174 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "" "Perhaps the problem can be solved by double-checking your credit card " @@ -149,16 +94,16 @@ msgstr "" #. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_acquirer__provider msgid "Provider" -msgstr "Provedor" +msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Sips" +#: model:ir.model.fields.selection,name:payment_stripe.selection__payment_acquirer__provider__stripe +msgid "Stripe" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Stripe" +#: model:ir.model.fields,field_description:payment_stripe.field_payment_transaction__stripe_payment_intent +msgid "Stripe Payment Intent ID" msgstr "" #. module: payment_stripe @@ -172,30 +117,47 @@ msgid "Stripe Secret Key" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:172 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe gave us the following info about the problem: '%s'" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:184 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe: %s orders found for reference %s" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:180 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:170 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format -msgid "We're sorry to report that the transaction has failed." +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Wire Transfer" +#. openerp-web +#: code:addons/payment_stripe/static/src/js/payment_form.js:0 +#, python-format +msgid "Unable to save card" +msgstr "" + +#. module: payment_stripe +#. openerp-web +#: code:addons/payment_stripe/static/src/js/payment_form.js:0 +#, python-format +msgid "We are not able to add your payment method at the moment. " +msgstr "" + +#. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "We're sorry to report that the transaction has failed." msgstr "" diff --git a/addons/payment_stripe/i18n/pt_BR.po b/addons/payment_stripe/i18n/pt_BR.po index 891bc79226c..c7ccc3d7ca0 100644 --- a/addons/payment_stripe/i18n/pt_BR.po +++ b/addons/payment_stripe/i18n/pt_BR.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Mateus Lopes <mateus1@gmail.com>, 2019\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/odoo/teams/41243/pt_BR/)\n" @@ -141,6 +141,14 @@ msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/ro.po b/addons/payment_stripe/i18n/ro.po index c86ac2cde15..5874af391bd 100644 --- a/addons/payment_stripe/i18n/ro.po +++ b/addons/payment_stripe/i18n/ro.po @@ -1,16 +1,13 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * payment_stripe +# * payment_stripe # -# Translators: -# Martin Trigaux, 2018 msgid "" msgstr "" -"Project-Id-Version: Odoo Server saas~11.5\n" +"Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-21 13:17+0000\n" -"PO-Revision-Date: 2018-09-21 13:17+0000\n" -"Last-Translator: Martin Trigaux, 2018\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" +"PO-Revision-Date: 2019-08-26 09:12+0000\n" "Language-Team: Romanian (https://www.transifex.com/odoo/teams/41243/ro/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,10 +17,10 @@ msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:9 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "×" -msgstr "×" +msgstr "" #. module: payment_stripe #: model:ir.model.fields,help:payment_stripe.field_payment_acquirer__stripe_image_url @@ -32,39 +29,6 @@ msgid "" "product. As defined in your Stripe profile. See: " "https://stripe.com/docs/checkout" msgstr "" -"O adresă URL relativă sau absolută care să indice o imagine pătratică a " -"mărcii sau a produsului dvs. După cum este definit în profilul dvs. Stripe. " -"Consultați: https://stripe.com/docs/checkout" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Adyen" -msgstr "Adyen" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Authorize.Net" -msgstr "Authorize.Net" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Buckaroo" -msgstr "Buckaroo" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "CVC" -msgstr "CVC" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Card number" -msgstr "Număr card" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Cardholder name" -msgstr "" #. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_acquirer__stripe_image_url @@ -73,49 +37,34 @@ msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:15 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "Close" -msgstr "Închide" +msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:8 +#: code:addons/payment_stripe/static/src/xml/stripe_templates.xml:0 #, python-format msgid "Error" -msgstr "Eroare" - -#. module: payment_stripe -#: model_terms:ir.ui.view,arch_db:payment_stripe.stripe_s2s_form -msgid "Expires (MM / YY)" msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/js/stripe.js:33 +#: code:addons/payment_stripe/static/src/js/stripe.js:0 #, python-format -msgid "Just one more second, confirming your payment..." +msgid "Just one more second, We are redirecting you to Stripe..." msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Manual Configuration" -msgstr "Configurare manuală" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Ogone" -msgstr "Ogone" - -#. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "PayUmoney" +#: model:ir.model,name:payment_stripe.model_payment_acquirer +msgid "Payment Acquirer" msgstr "" #. module: payment_stripe -#: model:ir.model,name:payment_stripe.model_payment_acquirer -msgid "Payment Acquirer" -msgstr "Colector plată" +#: model:ir.model.fields,field_description:payment_stripe.field_payment_token__stripe_payment_method +msgid "Payment Method ID" +msgstr "" #. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_token @@ -125,22 +74,17 @@ msgstr "" #. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_transaction msgid "Payment Transaction" -msgstr "Tranzacție plată" +msgstr "" #. module: payment_stripe #. openerp-web -#: code:addons/payment_stripe/static/src/js/stripe.js:59 +#: code:addons/payment_stripe/static/src/js/stripe.js:0 #, python-format msgid "Payment error" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Paypal" -msgstr "PayPal" - -#. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:174 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "" "Perhaps the problem can be solved by double-checking your credit card " @@ -150,16 +94,16 @@ msgstr "" #. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_acquirer__provider msgid "Provider" -msgstr "Furnizor" +msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Sips" +#: model:ir.model.fields.selection,name:payment_stripe.selection__payment_acquirer__provider__stripe +msgid "Stripe" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Stripe" +#: model:ir.model.fields,field_description:payment_stripe.field_payment_transaction__stripe_payment_intent +msgid "Stripe Payment Intent ID" msgstr "" #. module: payment_stripe @@ -173,30 +117,47 @@ msgid "Stripe Secret Key" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:172 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe gave us the following info about the problem: '%s'" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:184 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe: %s orders found for reference %s" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:180 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe -#: code:addons/payment_stripe/models/payment.py:170 +#: code:addons/payment_stripe/models/payment.py:0 #, python-format -msgid "We're sorry to report that the transaction has failed." +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" msgstr "" #. module: payment_stripe -#: selection:payment.acquirer,provider:0 -msgid "Wire Transfer" -msgstr "Transfer bancar" +#. openerp-web +#: code:addons/payment_stripe/static/src/js/payment_form.js:0 +#, python-format +msgid "Unable to save card" +msgstr "" + +#. module: payment_stripe +#. openerp-web +#: code:addons/payment_stripe/static/src/js/payment_form.js:0 +#, python-format +msgid "We are not able to add your payment method at the moment. " +msgstr "" + +#. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "We're sorry to report that the transaction has failed." +msgstr "" diff --git a/addons/payment_stripe/i18n/ru.po b/addons/payment_stripe/i18n/ru.po index fa75eca7ed5..ea56f0d73c3 100644 --- a/addons/payment_stripe/i18n/ru.po +++ b/addons/payment_stripe/i18n/ru.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Oleg Kuryan <oleg@ventor.tech>, 2019\n" "Language-Team: Russian (https://www.transifex.com/odoo/teams/41243/ru/)\n" @@ -144,6 +144,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: не найдены заказы для ссылки %s" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/tr.po b/addons/payment_stripe/i18n/tr.po index 7c49ba377e8..e96f4934f2a 100644 --- a/addons/payment_stripe/i18n/tr.po +++ b/addons/payment_stripe/i18n/tr.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Umur Akın <umura@projetgrup.com>, 2019\n" "Language-Team: Turkish (https://www.transifex.com/odoo/teams/41243/tr/)\n" @@ -148,6 +148,14 @@ msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/uk.po b/addons/payment_stripe/i18n/uk.po index f78ebbfec06..0fcf11d1177 100644 --- a/addons/payment_stripe/i18n/uk.po +++ b/addons/payment_stripe/i18n/uk.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Alina Lisnenko <alinasemeniuk1@gmail.com>, 2019\n" "Language-Team: Ukrainian (https://www.transifex.com/odoo/teams/41243/uk/)\n" @@ -35,7 +35,7 @@ msgid "" "https://stripe.com/docs/checkout" msgstr "" "Відносна або абсолютна URL-адреса, що вказує на квадратне зображення вашого " -"бренду або товару. Як визначено у вашому профілі Stripe. Переглянути: " +"бренду або товару. Як визначено у вашому профілі Stripe. Перегляньте: " "https://stripe.com/docs/checkout" #. module: payment_stripe @@ -62,7 +62,7 @@ msgstr "Помилка" #: code:addons/payment_stripe/static/src/js/stripe.js:0 #, python-format msgid "Just one more second, We are redirecting you to Stripe..." -msgstr "" +msgstr "Ще одну секунду, ми перенаправляємо вас на Stripe..." #. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_acquirer @@ -72,7 +72,7 @@ msgstr "Платіжний еквайєр" #. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_token__stripe_payment_method msgid "Payment Method ID" -msgstr "" +msgstr "ID способу оплати" #. module: payment_stripe #: model:ir.model,name:payment_stripe.model_payment_token @@ -114,7 +114,7 @@ msgstr "Stripe" #. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_transaction__stripe_payment_intent msgid "Stripe Payment Intent ID" -msgstr "" +msgstr "ID призначення платежу Stripe" #. module: payment_stripe #: model:ir.model.fields,field_description:payment_stripe.field_payment_acquirer__stripe_publishable_key @@ -145,18 +145,28 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe: замовлення не знайдено для довідки %s" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" +"Неможливо конвертувати клієнта Stripe для сумісності з SCA. Чи є принаймні " +"одна картка для цього клієнта на бекенді Stripe?" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format msgid "Unable to save card" -msgstr "" +msgstr "Не вдається зберегти картку" #. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format msgid "We are not able to add your payment method at the moment. " -msgstr "" +msgstr "Ми не можемо додати ваш спосіб оплати на даний момент." #. module: payment_stripe #: code:addons/payment_stripe/models/payment.py:0 diff --git a/addons/payment_stripe/i18n/vi.po b/addons/payment_stripe/i18n/vi.po index 2db823117c9..98a43618813 100644 --- a/addons/payment_stripe/i18n/vi.po +++ b/addons/payment_stripe/i18n/vi.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: Dung Nguyen Thi <dungnt@trobz.com>, 2019\n" "Language-Team: Vietnamese (https://www.transifex.com/odoo/teams/41243/vi/)\n" @@ -143,6 +143,14 @@ msgid "Stripe: no order found for reference %s" msgstr "" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/zh_CN.po b/addons/payment_stripe/i18n/zh_CN.po index d08a0cf5d2b..532cde3f6e5 100644 --- a/addons/payment_stripe/i18n/zh_CN.po +++ b/addons/payment_stripe/i18n/zh_CN.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: inspur qiuguodong <qiuguodong@inspur.com>, 2019\n" "Language-Team: Chinese (China) (https://www.transifex.com/odoo/teams/41243/zh_CN/)\n" @@ -142,6 +142,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe:未找到可用于参考 %s 的订单" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/i18n/zh_TW.po b/addons/payment_stripe/i18n/zh_TW.po index dc58ebd3660..8cb598b9801 100644 --- a/addons/payment_stripe/i18n/zh_TW.po +++ b/addons/payment_stripe/i18n/zh_TW.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~12.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-08-26 08:16+0000\n" +"POT-Creation-Date: 2019-09-27 09:11+0000\n" "PO-Revision-Date: 2019-08-26 09:12+0000\n" "Last-Translator: 敬雲 林 <chingyun@yuanchih-consult.com>, 2019\n" "Language-Team: Chinese (Taiwan) (https://www.transifex.com/odoo/teams/41243/zh_TW/)\n" @@ -141,6 +141,14 @@ msgid "Stripe: no order found for reference %s" msgstr "Stripe:未找到參考 %s 的訂單" #. module: payment_stripe +#: code:addons/payment_stripe/models/payment.py:0 +#, python-format +msgid "" +"Unable to convert Stripe customer for SCA compatibility. Is there at least " +"one card for this customer in the Stripe backend?" +msgstr "" + +#. module: payment_stripe #. openerp-web #: code:addons/payment_stripe/static/src/js/payment_form.js:0 #, python-format diff --git a/addons/payment_stripe/models/payment.py b/addons/payment_stripe/models/payment.py index 4e68d122bc1..ce9ff886777 100644 --- a/addons/payment_stripe/models/payment.py +++ b/addons/payment_stripe/models/payment.py @@ -3,6 +3,7 @@ import logging import requests import pprint +from requests.exceptions import HTTPError from werkzeug import urls from odoo import api, fields, models, _ @@ -35,7 +36,7 @@ class PaymentAcquirerStripe(models.Model): def stripe_form_generate_values(self, tx_values): self.ensure_one() - base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url') + base_url = self.get_base_url() stripe_session_data = { 'payment_method_types[]': 'card', 'line_items[][amount]': int(tx_values['amount'] if tx_values['currency'].name in INT_CURRENCIES else float_round(tx_values['amount'] * 100, 2)), @@ -61,8 +62,12 @@ class PaymentAcquirerStripe(models.Model): resp = requests.request(method, url, data=data, headers=headers) try: resp.raise_for_status() - except: - _logger.error(resp.text) + except HTTPError: + _logger.error("Here are some more information for the " + "following HTTP error on %s:\n" + "Request data:\n%s\n" + "Response body:\n%s", + url, pprint.pformat(data), resp.text) raise return resp.json() @@ -127,6 +132,19 @@ class PaymentTransactionStripe(models.Model): _inherit = 'payment.transaction' stripe_payment_intent = fields.Char(string='Stripe Payment Intent ID', readonly=True) + stripe_payment_intent_secret = fields.Char(string='Stripe Payment Intent Secret', readonly=True) + + + def _get_processing_info(self): + res = super()._get_processing_info() + if self.acquirer_id.provider == 'stripe': + stripe_info = { + 'stripe_payment_intent': self.stripe_payment_intent, + 'stripe_payment_intent_secret': self.stripe_payment_intent_secret, + 'stripe_publishable_key': self.acquirer_id.stripe_publishable_key, + } + res.update(stripe_info) + return res def form_feedback(self, data, acquirer_name): if data.get('reference') and acquirer_name == 'stripe': @@ -142,14 +160,21 @@ class PaymentTransactionStripe(models.Model): return super(PaymentTransactionStripe, self).form_feedback(data, acquirer_name) def _stripe_create_payment_intent(self, acquirer_ref=None, email=None): + if not self.payment_token_id.stripe_payment_method: + # old token before using sca, need to fetch data from the api + self.payment_token_id._stripe_sca_migrate_customer() + charge_params = { 'amount': int(self.amount if self.currency_id.name in INT_CURRENCIES else float_round(self.amount * 100, 2)), 'currency': self.currency_id.name.lower(), - 'setup_future_usage': 'off_session', + 'off_session': True, 'confirm': True, 'payment_method': self.payment_token_id.stripe_payment_method, 'customer': self.payment_token_id.acquirer_ref, + "description": self.reference, } + if not self.env.context.get('off_session'): + charge_params.update(setup_future_usage='off_session', off_session=False) _logger.info('_stripe_create_payment_intent: Sending values to stripe, values:\n%s', pprint.pformat(charge_params)) res = self.acquirer_id._stripe_request('payment_intents', charge_params) @@ -213,15 +238,18 @@ class PaymentTransactionStripe(models.Model): def _stripe_s2s_validate_tree(self, tree): self.ensure_one() - if self.state != 'draft': + if self.state not in ("draft", "pending"): _logger.info('Stripe: trying to validate an already validated tx (ref %s)', self.reference) return True status = tree.get('status') tx_id = tree.get('id') + tx_secret = tree.get("client_secret") vals = { - 'date': fields.datetime.now(), - 'acquirer_reference': tx_id, + "date": fields.datetime.now(), + "acquirer_reference": tx_id, + "stripe_payment_intent": tx_id, + "stripe_payment_intent_secret": tx_secret } if status == 'succeeded': self.write(vals) @@ -293,3 +321,39 @@ class PaymentTokenStripe(models.Model): 'acquirer_ref': cust_resp['id'], } return values + + def _stripe_sca_migrate_customer(self): + """Migrate a token from the old implementation of Stripe to the SCA one. + + In the old implementation, it was possible to create a valid charge just by + giving the customer ref to ask Stripe to use the default source (= default + card). Since we have a one-to-one matching between a saved card, this used to + work well - but now we need to specify the payment method for each call and so + we have to contact stripe to get the default source for the customer and save it + in the payment token. + This conversion will happen once per token, the first time it gets used following + the installation of the module.""" + self.ensure_one() + url = "customers/%s" % (self.acquirer_ref) + data = self.acquirer_id._stripe_request(url, method="GET") + sources = data.get('sources', {}).get('data', []) + pm_ref = False + if sources: + if len(sources) > 1: + _logger.warning('stripe sca customer conversion: there should be a single saved source per customer!') + pm_ref = sources[0].get('id') + else: + url = 'payment_methods' + params = { + 'type': 'card', + 'customer': self.acquirer_ref, + } + payment_methods = self.acquirer_id._stripe_request(url, params, method='GET') + cards = payment_methods.get('data', []) + if len(cards) > 1: + _logger.warning('stripe sca customer conversion: there should be a single saved source per customer!') + pm_ref = cards and cards[0].get('id') + if not pm_ref: + raise ValidationError(_('Unable to convert Stripe customer for SCA compatibility. Is there at least one card for this customer in the Stripe backend?')) + self.stripe_payment_method = pm_ref + _logger.info('converted old customer ref to sca-compatible record for payment token %s', self.id) diff --git a/addons/payment_stripe/static/src/js/payment_processing.js b/addons/payment_stripe/static/src/js/payment_processing.js new file mode 100644 index 00000000000..f98cd05a8c7 --- /dev/null +++ b/addons/payment_stripe/static/src/js/payment_processing.js @@ -0,0 +1,48 @@ +odoo.define('payment_stripe.processing', function (require) { +'use strict'; + +var ajax = require('web.ajax'); +var rpc = require('web.rpc') +var publicWidget = require('web.public.widget'); + +var PaymentProcessing = publicWidget.registry.PaymentProcessing; + +return PaymentProcessing.include({ + init: function () { + this._super.apply(this, arguments); + this._authInProgress = false; + }, + willStart: function () { + return this._super.apply(this, arguments).then(function () { + return ajax.loadJS("https://js.stripe.com/v3/"); + }) + }, + _stripeAuthenticate: function (tx) { + var stripe = Stripe(tx.stripe_publishable_key); + return stripe.handleCardPayment(tx.stripe_payment_intent_secret) + .then(function(result) { + if (result.error) { + return Promise.reject({"message": {"data": { "message": result.error.message}}}); + } + return rpc.query({ + route: '/payment/stripe/s2s/process_payment_intent', + params: _.extend({}, result.paymentIntent, {reference: tx.reference}), + }); + }).then(function() { + window.location = '/payment/process'; + }).guardedCatch(function () { + this._authInProgress = false; + }); + }, + processPolledData: function(transactions) { + this._super.apply(this, arguments); + for (var itx=0; itx < transactions.length; itx++) { + var tx = transactions[itx]; + if (tx.acquirer_provider === 'stripe' && tx.state === 'pending' && tx.stripe_payment_intent_secret && !this._authInProgress) { + this._authInProgress = true; + this._stripeAuthenticate(tx); + } + } + }, +}); +});
\ No newline at end of file diff --git a/addons/payment_stripe/tests/test_stripe.py b/addons/payment_stripe/tests/test_stripe.py index 4a7c0764bca..10523d13590 100644 --- a/addons/payment_stripe/tests/test_stripe.py +++ b/addons/payment_stripe/tests/test_stripe.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import unittest import odoo from odoo import fields from odoo.addons.payment.tests.common import PaymentAcquirerCommon @@ -11,8 +12,8 @@ class StripeCommon(PaymentAcquirerCommon): super(StripeCommon, self).setUp() self.stripe = self.env.ref('payment.payment_acquirer_stripe') self.stripe.write({ - 'stripe_secret_key': 'dummy', - 'stripe_publishable_key': 'dummy', + 'stripe_secret_key': 'sk_test_KJtHgNwt2KS3xM7QJPr4O5E8', + 'stripe_publishable_key': 'pk_test_QSPnimmb4ZhtkEy3Uhdm4S6J', 'state': 'test', }) @@ -20,15 +21,10 @@ class StripeCommon(PaymentAcquirerCommon): @odoo.tests.tagged('post_install', '-at_install', '-standard', 'external') class StripeTest(StripeCommon): + @unittest.skip("demonstrating skipping") def test_10_stripe_s2s(self): self.assertEqual(self.stripe.state, 'test', 'test without test environment') - # Add Stripe credentials - self.stripe.write({ - 'stripe_secret_key': 'sk_test_bldAlqh1U24L5HtRF9mBFpK7', - 'stripe_publishable_key': 'pk_test_0TKSyYSZS9AcS4keZ2cxQQCW', - }) - # Create payment meethod for Stripe payment_token = self.env['payment.token'].create({ 'acquirer_id': self.stripe.id, @@ -63,16 +59,14 @@ class StripeTest(StripeCommon): # ---------------------------------------- # render the button - res = self.stripe.render('SO404', 320.0, self.currency_euro.id, values=self.buyer_values).decode('utf-8') - # Generated and received - self.assertIn(self.buyer_values.get('partner_email'), res, 'Stripe: email input not found in rendered template') + self.stripe.render('SO404', 320.0, self.currency_euro.id, values=self.buyer_values).decode('utf-8') def test_30_stripe_form_management(self): self.assertEqual(self.stripe.state, 'test', 'test without test environment') # typical data posted by Stripe after client has successfully paid stripe_post_data = { - u'amount': 4700, + u'amount': 470000, u'amount_refunded': 0, u'application_fee': None, u'balance_transaction': u'txn_172xfnGMfVJxozLwssrsQZyT', @@ -128,7 +122,7 @@ class StripeTest(StripeCommon): u'status': u'succeeded'} tx = self.env['payment.transaction'].create({ - 'amount': 4700, + 'amount': 4700.0, 'acquirer_id': self.stripe.id, 'currency_id': self.currency_euro.id, 'reference': 'SO100-1', diff --git a/addons/payment_stripe/views/payment_stripe_templates.xml b/addons/payment_stripe/views/payment_stripe_templates.xml index a980edbc33c..95443d7e6e3 100644 --- a/addons/payment_stripe/views/payment_stripe_templates.xml +++ b/addons/payment_stripe/views/payment_stripe_templates.xml @@ -30,6 +30,8 @@ <template id="assets_frontend" inherit_id="web.assets_frontend"> <xpath expr="script[last()]" position="after"> <script type="text/javascript" src="/payment_stripe/static/src/js/payment_form.js"></script> + <script type="text/javascript" src="/payment_stripe/static/src/js/payment_processing.js"></script> + </xpath> </template> </data> |
