2018-09-28 13:00:12 +00:00
|
|
|
import ngModule from '../module';
|
2020-03-17 10:17:50 +00:00
|
|
|
import Section from 'salix/components/section';
|
2018-12-10 14:34:48 +00:00
|
|
|
import './style.scss';
|
2018-09-28 13:00:12 +00:00
|
|
|
|
2020-03-17 10:17:50 +00:00
|
|
|
class Controller extends Section {
|
2018-09-28 13:00:12 +00:00
|
|
|
confirm(transaction) {
|
2019-10-24 22:53:53 +00:00
|
|
|
const path = 'Clients/confirmTransaction';
|
2018-09-28 13:00:12 +00:00
|
|
|
let data = {id: transaction.id};
|
|
|
|
this.$http.post(path, data).then(res => {
|
2020-03-17 10:17:50 +00:00
|
|
|
this.$.model.refresh();
|
2018-09-28 13:00:12 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
getFormattedMessage(transaction) {
|
|
|
|
const errorMessage = transaction.errorMessage ? transaction.errorMessage : '';
|
|
|
|
const separator = transaction.errorMessage && transaction.responseMessage ? '<br/>' : '';
|
|
|
|
const responseMessage = transaction.responseMessage ? transaction.responseMessage : '';
|
|
|
|
return `<strong style="font-size:13px">${errorMessage}</strong>`
|
|
|
|
+ separator
|
|
|
|
+ `<span style="font-size:13px">${responseMessage}</span>`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnClientWebPayment', {
|
2018-09-28 13:00:12 +00:00
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|