- fix handle if callback message is null

This commit is contained in:
Fadli 2022-08-05 14:57:02 +07:00
parent be0dd93a09
commit a33c685d65

View File

@ -1222,11 +1222,13 @@ export class TransactionService {
dataTransaction.callback_json = callback; dataTransaction.callback_json = callback;
dataTransaction.failed_reason = `Trx ${product.code} ke ${dataTransaction.destination} gagal`; dataTransaction.failed_reason = `Trx ${product.code} ke ${dataTransaction.destination} gagal`;
if(callback['message']) {
if (callback['message'].includes('METRO')) { if (callback['message'].includes('METRO')) {
if (callback['price'] != dataTransaction.product_price.price) { if (callback['price'] != dataTransaction.product_price.price) {
dataTransaction.product_price.price = callback['price'] dataTransaction.product_price.price = callback['price']
} }
} }
}
//GET COA //GET COA
const coaAccount = await this.coaService.findByUser( const coaAccount = await this.coaService.findByUser(