import ngModule from '../module';
import Section from 'salix/components/section';
import './style.scss';
class Controller extends Section {
confirm(transaction) {
const path = 'Clients/confirmTransaction';
let data = {id: transaction.id};
this.$http.post(path, data).then(res => {
this.$.model.refresh();
});
}
getFormattedMessage(transaction) {
const errorMessage = transaction.errorMessage ? transaction.errorMessage : '';
const separator = transaction.errorMessage && transaction.responseMessage ? '
' : '';
const responseMessage = transaction.responseMessage ? transaction.responseMessage : '';
return `${errorMessage}`
+ separator
+ `${responseMessage}`;
}
}
ngModule.vnComponent('vnClientWebPayment', {
template: require('./index.html'),
controller: Controller
});