Closed maheshsattala closed 3 weeks ago
The changes enhance the WhatsApp message handling system by introducing support for payment messages and refining the processing of status data. This includes updates to method signatures to accommodate new parameters, the addition of new logic for payment handling, and expanded test coverage to ensure accurate logging and processing of payment-related interactions.
Files | Change Summary |
---|---|
kairon/chat/handlers/channels/whatsapp.py |
Added handling for payment messages in the message function and modified the __handle_meta_payload method to process payment status data. |
kairon/shared/chat/processor.py |
Updated save_whatsapp_audit_log method to include a new recipient parameter for enhanced logging of WhatsApp interactions. |
tests/integration_test/chat_service_test.py |
Introduced test_whatsapp_payment_message_request to validate payment message handling and updated assertions to ensure recipient information is logged correctly. |
sequenceDiagram
participant User
participant WhatsAppHandler
participant Processor
participant Logger
User->>WhatsAppHandler: Send Payment Message
WhatsAppHandler->>Processor: Process Payment Details
Processor->>Logger: Log Payment Information
Logger-->>Processor: Confirm Log
Processor-->>WhatsAppHandler: Payment Processed
WhatsAppHandler-->>User: Acknowledge Payment
🐇 In the meadow, a rabbit hops with glee,
New payments in WhatsApp, oh what a spree!
With logs and slots, we dance in delight,
Processing payments, everything feels right!
Hooray for the changes, let's celebrate,
In the world of code, we elevate! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Added code for handling the webhook event after completing payment and added test cases.
Summary by CodeRabbit
New Features
Bug Fixes
Tests