You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if there is payment failure, then we shouldt proceed with reservation
apps/reservations/src/reservations.service.ts
lines create charge doesnt checks for failure
const payemntResponse = await lastValueFrom(this.paymentService.send('create-charge', { ...createReservationDto.charge, email: user.email }))
@SuhailAhmed2 you right, i haven't check this repo in a while i should've added validation & check for payment failure i guess throw some exception and rollback transaction.
if there is payment failure, then we shouldt proceed with reservation
apps/reservations/src/reservations.service.ts
lines create charge doesnt checks for failure
const payemntResponse = await lastValueFrom(this.paymentService.send('create-charge', { ...createReservationDto.charge, email: user.email }))
similarly in payemnt service
createCharge({ card, amount, email }: PaymentsCreateChargeDto) {
const paymentIntent = await this.stripe.paymentIntents.create({
amount: amount * 100,
payment_method_types: ['card'],
currency: 'usd',
});
The text was updated successfully, but these errors were encountered: