Skip to content

Enable Automatic Sms delivery support for successful Payment Transactions#1282

Merged
beesaferoot merged 8 commits intomainfrom
send-token-sms-type
Mar 4, 2026
Merged

Enable Automatic Sms delivery support for successful Payment Transactions#1282
beesaferoot merged 8 commits intomainfrom
send-token-sms-type

Conversation

@beesaferoot
Copy link
Copy Markdown
Contributor

@beesaferoot beesaferoot commented Jan 30, 2026

Makes progress on #1243

Brief summary of the change made

This PR introduces key refactors that enable automatic SMS delivery after a successful payment. The main changes are outlined below:

  • Centralized SMS dispatch after successful transactions by introducing SendTransactionConfirmationSmsListener, which is triggered by TransactionSuccessfulEvent.

  • Simplified transaction confirmation SMS logic into three clear categories:

    • Smart Meter (token-based)
    • SHS (token-based)
    • Non-token transactions (e.g. non-PAYGo appliances/devices)
  • Streamlined SMS templates: only the transaction confirmation message body now needs to be configured, making messages clearer and easier for customers to understand. Previous templates are still used for other SMS types but are no longer active for transaction confirmations.

  • End-to-end automation: with these changes, and once an SMS gateway is configured, tokens are automatically sent to customers upon payment.

Are there any other side effects of this change that we should be aware of?

Describe how you tested your changes?

Pull Request checklist

Please confirm you have completed any of the necessary steps below.

  • Meaningful Pull Request title and description
  • Changes tested as described above
  • Added appropriate documentation for the change.
  • Created GitHub issues for any relevant followup/future enhancements if appropriate.

@dmohns
Copy link
Copy Markdown
Member

dmohns commented Feb 23, 2026

Now, that the transaction refactor PR is merged, can you rebase this? So, it's easier to review 🙏

@beesaferoot beesaferoot force-pushed the send-token-sms-type branch 2 times, most recently from ceb7e3c to 72bb79e Compare February 26, 2026 23:27
Copy link
Copy Markdown
Member

@dmohns dmohns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good. I have one more (feature) requests which I would like to have for this PR.

Could we have some way for the user to control whether or not automatic transaction SMS is enable for their tenant?

For example, we already have a SMS section in settings, and a sub-section for Transaction. Could we add a main switch (and boolean) setting to control whether or not this feature is enabled?

Comment thread src/frontend/src/modules/Client/Appliances/SoldApplianceDetail.vue Outdated
@beesaferoot beesaferoot force-pushed the send-token-sms-type branch from 1082ebb to 3f18f54 Compare March 3, 2026 10:07
@beesaferoot beesaferoot requested a review from dmohns March 3, 2026 10:09
@beesaferoot
Copy link
Copy Markdown
Contributor Author

Screenshot 2026-03-03 at 10 01 37 AM

Added a toggle to enable or disable sms delivery for transactions. Ready for your review @dmohns

This commit include key refactors that let us make automatic sms delivery after payment process. They key refactors are as follows;
- Consolidate sms push after a successfull transaction using `SmsTransactionConfirmationSmsListener` - this is trigger with `TransactionSuccessculEvent`.
- Simplifying Transaction Confirmation Sms into three types respectively; Smart Meter (token based), SHS (token based) and No token transaction i.e Non-paygo appliance/device.
- Simplifying SMS template; we now only need to configure the transaction confirmation body which makes it easier for users to understand.  Previous templates are still in use by other forms of sms but aren't active.

With this changes, coupled with a configured sms gateway. Tokens are automatically sent to customers.
@beesaferoot beesaferoot force-pushed the send-token-sms-type branch from 3f18f54 to 3b04be1 Compare March 3, 2026 13:10
Copy link
Copy Markdown
Member

@dmohns dmohns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Tested it with a TextBee + Spark setup, seems to working fine. Let's create a stand alone release for this feature!!

@beesaferoot beesaferoot merged commit b2a7937 into main Mar 4, 2026
16 checks passed
@beesaferoot beesaferoot deleted the send-token-sms-type branch March 4, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants