Files
odoo_source/addons/payment_custom/static/src/js/post_processing.js
T
Horacio Tellez f7b8f07501 [IMP] payment: rename of acquirer to provider
Changing the name of model payment.acquirer to payment.provider
and everything that it touches. It is technically incorrect to
use the term "acquirer" for systems that only provide a service
of payment.
After this commit the model payment.acquirer and all related to
it will be renamed to payment.provider.

Task - 2842088

closes odoo/odoo#90899

Related: odoo/upgrade#3542
Related: odoo/documentation#1981
Related: odoo/enterprise#27131
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-09 13:38:08 +02:00

26 lines
1.1 KiB
JavaScript

odoo.define('payment_custom.post_processing', require => {
'use strict';
const paymentPostProcessing = require('payment.post_processing');
paymentPostProcessing.include({
/**
* Don't wait for the transaction to be confirmed before redirecting customers to the
* landing route because custom transactions remain in the state 'pending' forever.
*
* @override method from `payment.post_processing`
* @param {Object} display_values_list - The post-processing values of the transactions
*/
processPolledData: function (display_values_list) {
// In almost every case, there will be a single transaction to display. If there are
// more than one transaction, the last one will most likely be the one that counts. We
// use that one to redirect the user to the landing page.
if (display_values_list.length > 0 && display_values_list[0].provider_code === 'custom') {
window.location = display_values_list[0].landing_route;
} else {
return this._super(...arguments);
}
}
});
});