getTransactionStatus function
Implementation
TransactionStatus getTransactionStatus(String status) {
switch (status) {
case 'NEW':
return TransactionStatus.new_;
case 'PENDING':
return TransactionStatus.pending;
case 'COMPLETED':
return TransactionStatus.completed;
case 'EXPIRED':
return TransactionStatus.expired;
case 'UNRESOLVED':
return TransactionStatus.unresolved;
case 'RESOLVED':
return TransactionStatus.resolved;
case 'CANCELED':
return TransactionStatus.canceled;
case 'REFUND PENDING':
return TransactionStatus.refund_pending;
case 'REFUNDED':
return TransactionStatus.refunded;
default:
return TransactionStatus.new_;
}
}