Russian  English  All projects

Refactoring the WhatsApp Business API chatbot script (PHP Laravel)



The script automates the sending of notifications to customers of the beauty salon via WhatsApp Business.

The basic logic is as follows:

Webhook from CRM Yclients - WABA Integrator - notification to the client depending on the type of event.

In addition, among the components of the script are involved:

- SMS aggregator, to deliver notifications to customers without WhatsApp

- Internet acquiring module for remote acceptance of prepayment

- Logging bot actions in Telegram

- Admin panel with bot settings

The script is deployed on the VPS

Now there are 2 versions of the script.

Version 1. It works at the moment, the quality of work is completely satisfied, but it is practically not amenable to modification due to confusing code.

Version 2. Code with refactoring performed. The contractor refactored the script of the first version. But during testing, an emergency situation arose, which led to a mass mailing of messages.

Task:

Audit the code of the second version to understand what caused the conflict between the first and second versions. Test and run the script of the second version so that it successfully passes the test.
29.12.2022 12:08



 Answers freelancers