summaryrefslogtreecommitdiff
path: root/addons/payment/static/src
AgeCommit message (Collapse)Author
2021-05-17[FIX] payment: enable pay button when clicking back buttonNasreddin (bon)
Issue Use Safari (or equivalent) browser - Install e-commerce - Go to Website -> Configuration -> Payment Acquirers - Activate Ingenico in test mode (write aaa in required fields) - Go to shop, and add product to card - Go to checkout - Select Ingenico payment mode - Click on Pay button - When on the ingenico page, press back The page is blocked and the button is disabled. Cause When clicking on Pay button, the page is locked and the button is disabled. With Chrome, when coming back to previous page, this one is regenerated and therefore adapt the button. In Safari, it is not the case. Solution On `pageshow` event, if event have `persisted` attribute set to to true, meaning using cache, then reload page. Fixes https://github.com/odoo/odoo/issues/69453 opw-2510281 closes odoo/odoo#70834 X-original-commit: f2eb6d3ce8b31d3f14f45482060d4ef5c362e7c3 Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com> Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com> Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-04-09[FIX] payment: fix ecommerce blinking "Pay now" buttonNicolas Lempereur
Missing line in forward-port of 12.0 #41860 (88b37c2b1). If a server error happen when we try to pay (eg. there is not enoug quantity of a product), the page is forever freezed and the user only option is to refresh which is not user friendly. opw-2438379 closes odoo/odoo#69062 X-original-commit: 38fb1c2e3f4dd48fc177b1b2b37a2eba4bd27018 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-03-23[IMP] payment: allow overriding the redirect form HTTP methodPetar Najman
closes odoo/odoo#68250 X-original-commit: 923eaae31b0993d8a7e653b334471f7b6289450f Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-03-04[FIX] payment: link transaction to invoice with payment linknie
Steps: - Install account,payment - Go to Invoicing - Create an invoice - Click Actions > Generate a Payment Link - Follow the generated link - Pay Bug: The transaction is not linked to the sale order in the link table `account_invoice_transaction_rel` Explanation: This fix is broadly mimicking the behavior of the sales module regarding the link of an order to a transaction, adding `invoice_id`s where they are needed throughout the payment process in order to link the transaction to the invoice. opw:2451534 closes odoo/odoo#67289 X-original-commit: 7c6d06fa5858f79f3b22cdeaf74cdc26a642742f Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-11-17[IMP] payment, payment_test: missing payment token identifierBenoit Socias
Before this commit payment tokens had no name for Test Payment Acquirer After this commit tokens generated by Test Payment Acquirer have a name that combines the last 4 digits of the card number and the card account holder name https://github.com/odoo/odoo/issues/50965 closes odoo/odoo#61844 X-original-commit: e20f0650acbd1a7a918375a70ec5c89606523a7b Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-13[FIX] payment: prevent changing checkout optionsIEL
STEPS: * install website_sale * setup few delivery options * setup online payment (e.g. paypal) * at website add products to cart and proceed to checkout page * slow down internet speed * click "Pay now" BEFORE: while it's loading, you can change delivery option. So, you have SO changed, while in payment page you see old total amount AFTER: it's not possible to change delivery options through UI Note that it is not possible to pay less that what you should at anyway. opw-2324543 closes odoo/odoo#61721 X-original-commit: eb3ed89f8440050fc32f9a7b29fb2b6ab8fd6b59 Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com> Co-authored-by: Romain Derie <rde@odoo.com>
2020-10-20[FIX] payment: User can pay without selecting a delivery methodNasreddin (bon)
Issue - Install "eCommerce" and "Inventoy" - Activate "Fedex" delivery connector in settings - Publish "Free Delivery" and "Fedex US" delivery method - Put the "FedEx" one above the "Free Delivery" - Go to shop and add an item to cart - Set an adress with no ZIP code and checkout - Select a payment methode and pay Order is generated without selecting a delivery method Same behavior happend when using only "Fedex" as delivery method. Cause The flow make the `payment.payment_form` trigger start after `website_sale_delivery.checkout` JS module. In 'start' function of `payment.payment_form`, the `disabled` attribut is removed from button if no checkbox_cgv is present and therefore break the `disabling` managemet since `disabledReasons` payButton data are not sync anymore. Solution Remove 'disabled' attribut only if has `disabledReasons` data on payButton (checkbox_cgv feature alter `disabledReasons`). opw-2355407 opw-2357605 closes odoo/odoo#60355 X-original-commit: 04e589e80b3ef48640f275cb20d31c17c2126c69 Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-08-12[FIX] payment: Pay button always enabled with Term & ConditionsGoffin Simon
Steps to reproduce: - Go to the website shop - Add a product in the cart - Add your address and click on checkout - On the checkout, enable Terms & conditions Bug: The button was always enabled even if the check box with the terms & conditions were not checked. opw:2313437 closes odoo/odoo#55821 X-original-commit: 0415da51960819ec9c989e15a9229bd6d583ba1b Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-07-06[FIX] payment: fix portal can click pay when js not loadedjvm-odoo
Issue - Go to Accounting / Customers / Invoices - Pick any invoice not paid - Action: Generate a Payment Link - Open the link - Refresh the page having Javascript disabled - Click the Pay Now button Traceback Cause If JS is not loaded, the values in the form fields are not bound as expected. It can also happen with slow connections and fast click on the button at the loading. Before the JS is entirely loaded (as it is lazy-loaded). Solution Button disabled by default, wait the page to be loaded and then activate the button OPW-2255760 closes odoo/odoo#54128 X-original-commit: 0e7071f249e69c5cca519ec66120530eb0f97153 Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-01-21[IMP] *: remove 'remove me in master'Victor Feyens
2020-01-06[FIX] payment: authorized payment should redirect automaticallyDamien Bouvy
From the PoV of the customer, there is no difference between an authorized payment and a captured payment; they should get redirected to the confirmation page in both cases. closes odoo/odoo#42780 X-original-commit: 452676737dd657a5d31a88fa89cc136cbe69b96a Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-12-16[FIX] payment: fix ecommerce blinking "Pay now" buttonJason Van Malder
Issue - Install e-commerce - Add stripe as payment acquirer - Go in website > shop - Add something in your cart and process checkout - In developer tools > network set online to slow 3g - Spam the pay now button - Go in Website > Configuration > Ecommerce > Payment Transactions Multiple transactions have been created for your order. Cause The pay now button doesn't stay disabled during the payment process. Solution Disable the button and enable it only when the process is done. OPW-2148899 closes odoo/odoo#41910 X-original-commit: 76a0e4fea0d9a15b3d193e00dd473c4488d18640 Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
2019-12-09[REV] web: reverts update to fontawesome 5.11.2Kevin Baptiste
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e. closes odoo/odoo#41480 X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc Related: odoo/enterprise#7110 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28[IMP] web: update to fontawesome 4.7.0 to 5.11.2Kevin Baptiste
FontAwesome 5 introduced new names for some icons as described on https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes This commit replaces the old names to the new ones. closes odoo/odoo#35826 Taskid: 2050241 Related: odoo/enterprise#5180 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-30[FIX] payment: prevent rpc fail eventNikunj Ladava
before this commit it shows error dialog when rpc fail after this commit, error dialog will not be shown to user, instead we have already shown error in payment form task- 2045189 closes odoo/odoo#39571 X-original-commit: e3644c6b59271c521abc151d3c533331836fdc90 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-10[IMP] payment: uniform translatable messagesMartin Trigaux
Avoid trailing space: In translation content, these tends to be skipped during translation, making the message inconsistent. There is already a translation for the term without the space so can reuse it. Merge "setup" Use the same writing to avoid having two similar messages Remove unnecessary comma Merge PayPal and Paypal Courtesy of Primesh on Transifex closes odoo/odoo#38348 X-original-commit: c1fb136cc684eba0cdeec302f27268ccda7fa5d2 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-24[FIX] payment: fix issue with s2s error icon positionNikunj Ladava
before this commit: the icon was not there in proper position after this commit: the icon is at proper position task- 2074108 closes odoo/odoo#37352 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-20[MERGE] forward port branch saas-12.4 up to 4a1321bc99dChristophe Simonis
closes odoo/odoo#37127 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-17[MERGE] forward port branch saas-12.3 up to d8ce75466e4Christophe Simonis
2019-09-13[IMP] payment: sca-readynessDamien Bouvy
- allow acquirers to arbitrarily include info about the tx in the processing page - pending is now a valid state that could require customer action in the payment processing page - don't blindly redirect to the return url of another tx if a pending transaction is there This latest change might mean that customers with many tx attempts might have a sub-par experience as they may need to click manually on the redirect url of a successful tx while before they were redirected immediately.
2019-08-26[FIX] payment: fix error management in payment formThibault Delavallée
PURPOSE Test frontend and UI tools of eLearning. SPECIFICATIONS Recent commit 5193f0d010f5cd3bf4ccc5c7e39aff3fdacdd111 introduced a tool method to parse errors and ease their management. A variable typo was done by mistake, fixed in this commit. LINKS Task ID 1937768 closes odoo/odoo#36085 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-16[IMP] payment*: better handling of error messageDamien Bouvy
Sometimes there's a title + content, sometimes not; reading the message itself usually yields a None somewhere which is fugly.
2019-08-16[IMP] payment: allow hiding the error messag in payment_formDamien Bouvy
2019-08-16[IMP] payment: support SEPA Direct Debit acquirerJohan Demaret Rivarola
The purpose of this commit is to expose SEPA Direct Debit acquirer to the Odoo community edition. The dedicated module, though, is restricted to the enterprise edition. Minor changes in following modules: - base: added ir.module.module record - payment: - added data to expose the new payment acquirer. - added 'to_buy' field to track whether the payment acquirer is restricted to enterprise users. - allow multi word payment acquirer name. It was breaking on the first underscore. task-1870363 closes odoo/odoo#26427
2019-08-12[IMP] payment: UI/flowVictor Feyens
2019-08-06[REV] delivery,payment: revert 98a92dc1aa14e2Martin Trigaux
The widget no longer exists, we can clean this closes odoo/odoo#35496 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-26[MERGE] forward port branch saas-12.3 up to 40e8b67179fChristophe Simonis
2019-07-24[MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c28baMartin Trigaux
closes odoo/odoo#35119 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-23[MERGE] Forward port of 12.0 to saas-12.2 up to 5e4c1b370123deeMartin Trigaux
2019-07-22[MERGE] Forward port of saas-11.3 to 12.0 up to 06f8f046991Martin Trigaux
closes odoo/odoo#35064 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-22[MERGE] Forward port of 11.0 to saas-11.3 up to eb4700f17f5Martin Trigaux
closes odoo/odoo#35054 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-18[FXI] delivery,payment: translate boolean button termsMartin Trigaux
The terminology of the boolean_button is translated with _t(opt_terms.string_true) which can work only if the variable content is already present in the translation map. This commit adds js files that do nothing but add the terms in the translation map. This way it will be exported by babel js export and the translation will be loaded by the web client Closes odoo/odoo#34774 closes odoo/odoo#34954 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-06-06[MERGE] forward port branch saas-12.3 up to 409679866b2Christophe Simonis
2019-06-03[FIX] *: correct some javascript errorsChristophe Simonis
Oversight of previous forward-port.
2019-06-03[MERGE] forward port branch saas-12.2 up to 995aa1685eeChristophe Simonis
2019-05-31[MERGE] forward port branch 12.0 up to 8f21148e1a8Christophe Simonis
2019-06-04[REF] *: handle inline scripts preparing for frontend JS lazy loadingqsm-odoo
* payment, im_livechat Inline scripts using `odoo.define` cannot work anymore as the boot.js file loading will be deferred. Most of features which used an inline script should probably be entirely refactored. This commit focuses on removing the inline scripts with a minimal diff (or at least tried to). Note: for the website livechat, the inline script was kept as it seems to be a longer refactoring to get rid of it (even though it is clearly possible). The inline script was however adapted to make sure it works with lazy loaded JS in the frontend. Part of https://github.com/odoo/odoo/pull/32181 task-1961045
2019-07-29[MERGE] forward port branch saas-12.4 up to cda4f3c308cChristophe Simonis
2019-07-18[IMP] payment_stripe: flow changesDamien Bouvy
The previous commit introduced some changes for SCA/PSD2 but some things were missing; most notably, registering payment cards in a s2s flow used the old Charge API that is not SCA-ready. This commit uses the SetupIntent API instead, allowing to register the card prior to payment. The global flow is described in the Stripe documentation in more details: https://stripe.com/docs/payments/cards/saving-cards Unfortunately, given the complete flow of payments, it is not possible to use the PaymentIntents API since this would require having the reference of the transaction before it gets created (the TX is created after the form submission, but the token must already exist at that point). Since this is meant to be backported, this changes are kept minimal in this feature branch. The PaymentIntents API would have been better since registering a card during a payment makes it more likely that future off-session transactions will not require an authentication step. We'll have to live with that for now; it's difficult to know exactly how this will affect customers before PSD2 goes into effect on september 14. Another branch might completely change the flow soon-ish to a more asynchroneous model, although it may miss the v13 freeze date -_-
2019-07-18[IMP] payment: small code improvementsDamien Bouvy
- treat s2s transactions as such - don't filter out tokens saved on acquirers that are not set for full s2s mode, as tokens might get created through a form and still be usable - detect the submit event as well as the click on the 'Pay Now' button to avoid completely wrecking the payment flow by pressing the return key - correct start override in JS should chain promises
2019-05-08[MERGE] forward port branch 11.0 up to d01db480872Christophe Simonis
2019-05-07[FIX] payment: prevent duplicate payments with payment tokensJoren Van Onder
When paying an eCommerce order with an acquirer which doesn't redirect (payment_flow: s2s) the "Pay Now" button is correctly disabled after clicking it. This prevents a user from clicking it multiple times and being charged multiple times. When paying with an existing payment token however the button was not disabled and the user gets no feedback his request is being processed. Charging an existing payment token takes a while (~5 seconds with Authorize) and so it's possible users will hit the button multiple times. This disables the button when reusing an existing payment token. Additionally it now uses the correct font awesome icon (fa-lock instead of fa-plus-circle). opw-1981064 closes odoo/odoo#33196 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-13[MERGE] forward port branch saas-12.2 up to 243a4ae5cbcChristophe Simonis
2019-05-10[MERGE] forward port branch saas-12.1 up to 330b99f60c0Christophe Simonis
2019-05-09[MERGE] forward port branch saas-11.3 up to 825fee2626cChristophe Simonis
2019-05-13[MERGE] forward port branch saas-12.3 up to 60e71302a38Christophe Simonis
2019-05-08[FIX] payment: fix error msg displayNikunj Ladava
when we get an error while making the payment, it should be shown to the user. But the message is not getting from proper dict, so it will break every time. closes - https://github.com/odoo/odoo/pull/33231 closes odoo/odoo#33231 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-05-17[FIX] payment: do not display postgres operational errorsToufik Ben Jaa
- When processing payments on the payments processing page, `psycopg2.OperationalError` can be raised. We do not want those exceptions to be displayed to the customers, instead we want the polling page to try to process the payments again. This commit hides the display of psycopg2 operational errors. - This commit also fixes the "processing your payments" message being hidden after the first polling, no matter if the processing has succeeded or not. closes odoo/odoo#33462 Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-04-24[IMP] payment : make s2s card validation transaction optionalJinal Patel
Currently, when some add token for s2s payment, dummy transaction of 1 unit was performed and it was frautrating for customer. So added option on acquirer's settings that check if you want's to validate the transaction or not. If 'verify Card validity' is ticked on payment acquirer then and then it will verify with dummy transaction otherwise it will not going to verify the card details. Task-1903170 closes odoo/odoo#29595 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-03-21[MERGE] forward port branch saas-12.1 up to 6878c9f3424Christophe Simonis