Merge branch 'devops-staging' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend
This commit is contained in:
commit
e4d6983298
|
@ -1107,27 +1107,27 @@ export class TransactionService {
|
||||||
|
|
||||||
async checkCallbackOrderFailed(supplier_trx_id: string, callback: any) {
|
async checkCallbackOrderFailed(supplier_trx_id: string, callback: any) {
|
||||||
|
|
||||||
const transactionData = await this.findDataTransactionBySupplierTrxId(
|
// const transactionData = await this.findDataTransactionBySupplierTrxId(
|
||||||
supplier_trx_id
|
// supplier_trx_id
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
if (transactionData.status == statusTransaction.FAILED) {
|
// if (transactionData.status == statusTransaction.FAILED) {
|
||||||
throw new HttpException(
|
// throw new HttpException(
|
||||||
{
|
// {
|
||||||
statusCode: HttpStatus.BAD_REQUEST,
|
// statusCode: HttpStatus.BAD_REQUEST,
|
||||||
error: 'failed to update, the transaction already failed',
|
// error: 'failed to update, the transaction already failed',
|
||||||
},
|
// },
|
||||||
HttpStatus.BAD_REQUEST,
|
// HttpStatus.BAD_REQUEST,
|
||||||
);
|
// );
|
||||||
} else if (transactionData.status == statusTransaction.SUCCESS) {
|
// } else if (transactionData.status == statusTransaction.SUCCESS) {
|
||||||
throw new HttpException(
|
// throw new HttpException(
|
||||||
{
|
// {
|
||||||
statusCode: HttpStatus.BAD_REQUEST,
|
// statusCode: HttpStatus.BAD_REQUEST,
|
||||||
error: 'failed to update, the transaction already success',
|
// error: 'failed to update, the transaction already success',
|
||||||
},
|
// },
|
||||||
HttpStatus.BAD_REQUEST,
|
// HttpStatus.BAD_REQUEST,
|
||||||
);
|
// );
|
||||||
} else {
|
// } else {
|
||||||
const updateTransaction = await this.callbackOrderFailed(
|
const updateTransaction = await this.callbackOrderFailed(
|
||||||
supplier_trx_id,
|
supplier_trx_id,
|
||||||
callback,
|
callback,
|
||||||
|
@ -1142,7 +1142,7 @@ export class TransactionService {
|
||||||
HttpStatus.BAD_REQUEST,
|
HttpStatus.BAD_REQUEST,
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1229,10 +1229,6 @@ export class TransactionService {
|
||||||
// const dataMsg = callback.msg;
|
// const dataMsg = callback.msg;
|
||||||
// const failedReason = dataMsg.split('.');
|
// const failedReason = dataMsg.split('.');
|
||||||
|
|
||||||
// dataTransaction.status = statusTransaction.FAILED;
|
|
||||||
// dataTransaction.callback_json = callback;
|
|
||||||
// dataTransaction.failed_reason = `Trx ${product.code} ke ${dataTransaction.destination} gagal`;
|
|
||||||
|
|
||||||
const userData = await this.userService.findExist(dataTransaction.user);
|
const userData = await this.userService.findExist(dataTransaction.user);
|
||||||
|
|
||||||
const product_price = await this.productHistoryPriceService.findById(
|
const product_price = await this.productHistoryPriceService.findById(
|
||||||
|
@ -1243,10 +1239,6 @@ export class TransactionService {
|
||||||
product_price.product.id,
|
product_price.product.id,
|
||||||
);
|
);
|
||||||
|
|
||||||
dataTransaction.status = statusTransaction.FAILED;
|
|
||||||
dataTransaction.callback_json = callback;
|
|
||||||
dataTransaction.failed_reason = `Trx ${product.code} ke ${dataTransaction.destination} gagal`;
|
|
||||||
|
|
||||||
console.log("inipricetable", dataTransaction.product_price.price)
|
console.log("inipricetable", dataTransaction.product_price.price)
|
||||||
console.log("inipricecallback", callback['price'])
|
console.log("inipricecallback", callback['price'])
|
||||||
if(callback['message']) {
|
if(callback['message']) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user