AdrianoLMRS / Website

Um site de aluguel de propriedade para um cliente
1 stars 0 forks source link

Payment data issues #2

Open AdrianoLMRS opened 5 days ago

AdrianoLMRS commented 5 days ago

Issue: Handle Reservation Form Data with Cache and MongoDB Integration

Description

After the user completes the reservation form in public/reserva.html, the following flow should be implemented:

  1. Cache Storage:

    • The form data needs to be stored in a cache after submission.
  2. Payment Confirmation:

    • If the payment is confirmed, the cached data should be stored in the Reservation collection in MongoDB.
  3. Payment Decline:

    • If the payment is declined, the cached data should remain stored.
  4. User Experience:

    • If the user revisits reserva.html, the form should automatically populate with the previously cached data.

Expected Behavior

Requirements

Tasks

  1. Implement a caching system to temporarily store the form data.
  2. Integrate with the payment gateway to handle confirmation/decline.
  3. Implement logic to move cached data to MongoDB upon payment confirmation.
  4. Ensure form pre-fill functionality using cached data.

Additional Notes

AdrianoLMRS commented 3 days ago

Site need user authentication first, maybe Cookies or WebAuthn sessions be the right choice

Issue : #3