@hachther/mesomb-browser
Version:
JS client for browser to perform mobile payment operation with MeSomb
24 lines (23 loc) • 624 B
JavaScript
import Transaction from "./Transaction";
export default class TransactionResponse {
success;
message;
redirect;
transaction;
reference;
status;
constructor(data) {
this.success = data['success'];
this.message = data['message'];
this.redirect = data['redirect'];
this.transaction = new Transaction(data['transaction']);
this.reference = data['reference'];
this.status = data['status'];
}
isOperationSuccess() {
return this.success;
}
isTransactionSuccess() {
return this.success && this.status === 'SUCCESS';
}
}