Merge branch 'development' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into devops-staging
This commit is contained in:
commit
0650ab5f9a
|
@ -157,9 +157,8 @@ export class PpobCallbackController {
|
|||
@Post('/digiflazz')
|
||||
async getDigiflazz(@Req() request: FastifyRequest) {
|
||||
const response = request.body;
|
||||
console.log('responsehemat', response);
|
||||
console.log('responsehemat2', request.body);
|
||||
if (response['msg'] != 'Transaksi Sukses') {
|
||||
console.log('responsedigiflazz', response);
|
||||
if (response['data']['message'] != 'Transaksi Sukses') {
|
||||
//TODO: UPDATE GAGAL
|
||||
await this.transactionService.checkCallbackOrderFailed(
|
||||
response['data']['ref_id'],
|
||||
|
|
|
@ -690,6 +690,7 @@ export class TransactionService {
|
|||
if (product.type == 'prepaid') {
|
||||
newHitSupplier= {
|
||||
success: hitSupplier.status.includes('Pending') || hitSupplier.status.includes('Sukses'),
|
||||
sn: hitSupplier.sn,
|
||||
harga: hitSupplier.price,
|
||||
msg: hitSupplier.message,
|
||||
};
|
||||
|
@ -785,13 +786,17 @@ export class TransactionService {
|
|||
} else {
|
||||
transactionData.balance_remaining =
|
||||
coaAccount.amount - product_price.mark_up_price - costInventory;
|
||||
if (hitSupplier.sn == '') {
|
||||
transactionData.status = statusTransaction.PENDING;
|
||||
status = statusTransaction[transactionData.status];
|
||||
} else {
|
||||
if (
|
||||
hitSupplier.sn != null ||
|
||||
hitSupplier.sn != '' ||
|
||||
hitSupplier.sn != undefined
|
||||
) {
|
||||
transactionData.seri_number = hitSupplier.sn;
|
||||
transactionData.status = statusTransaction.SUCCESS;
|
||||
status = statusTransaction[transactionData.status];
|
||||
} else {
|
||||
transactionData.status = statusTransaction.PENDING;
|
||||
status = statusTransaction[transactionData.status];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user