This repository was archived by the owner on Jan 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,9 @@ async function createPayment(payment) {
79
79
const connection = await helper . getInformixConnection ( )
80
80
await connection . beginTransactionAsync ( )
81
81
82
- const paymentExists = await paymentExists ( payment , connection )
83
- logger . debug ( `Payment Exists Response: ${ JSON . stringify ( paymentExists ) } ` )
84
- if ( ! paymentExists || paymentExists . length === 0 ) {
82
+ const existing = await paymentExists ( payment , connection )
83
+ logger . debug ( `Payment Exists Response: ${ JSON . stringify ( existing ) } ` )
84
+ if ( ! existing || existing . length === 0 ) {
85
85
const paymentDetailId = await paymentDetailIdGen . getNextId ( )
86
86
const paymentId = await paymentIdGen . getNextId ( )
87
87
const insertDetail = await prepare ( connection , INSERT_PAYMENT_DETAIL )
@@ -95,7 +95,7 @@ async function createPayment(payment) {
95
95
logger . info ( `Payment ${ paymentId } with detail ${ paymentDetailId } has been inserted` )
96
96
await connection . commitTransactionAsync ( )
97
97
} else {
98
- logger . error ( `Payment Exists for ${ payment . v5ChallengeId } , skipping - ${ JSON . stringify ( paymentExists ) } ` )
98
+ logger . error ( `Payment Exists for ${ payment . v5ChallengeId } , skipping - ${ JSON . stringify ( existing ) } ` )
99
99
await connection . commitTransactionAsync ( )
100
100
}
101
101
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments