http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14767
--- Comment #2 from Lari Taskula <[email protected]> --- Created attachment 42674 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42674&action=edit Bug 14767: SMS delivery notes from SMS Gateway provider's report Two-phase method to receive delivery notes from SMS Gateway provider. This is an example how to receive Gateway reports and most likely does not apply for your local provider. However, it should give you a good starting point to start receiving SMS delivery notes with REST API with your own provider. Example driver is SMS::Send::Labyrintti::Driver Phase ONE (POST to provider) -------------------------------- In phase ONE, as normally, we make a HTTP POST to our SMS Gateway provider and give them the details of SMS. They will instantly respond if the message was placed for delivery. If not, there must have been some error and we will throw a Koha::Exception::SMSDeliveryFailure. This will be caught by C4::Letters via C4::SMS. Message in the queue will be set as "failed" and the reason for failure will be added to delivery_note accordingly. If the delivery was succesful, we set the message as "sent" like before and continue to phase TWO. Phase TWO (provider to REST API) -------------------------------- In phase TWO, the message has been placed for delivery at our SMS Gateway provider. When the message has been processed and sent at their end, they will send us a POST request. We have added this into our Swagger definitions. If you want to limit the REST endpoint only to your provider, please see koha-httpd.conf where we will allow this endpoint to only certain IPs and block the rest. If the report says the message delivery was successful, we don't change anything. However, if the report says that the message delivery was failed, we will change the message status from "sent" to "failed" and add the reason of failure into delivery_note. Includes REST tests. Endpoints introduced in this patch: POST /api/v1/messages/{messagenumber}/report/labyrintti (for receiving the report) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
