I'm sharing on-list some of the guidance Ebenezer provided on extending the
notifications microservice he built to support some of the specific use
cases related to generating and responding to FCM notifications.

I believe we discussed back in June on how best we can implement a feature
like this but that all the same let's give it another try.  Firstly, the
fineract-cn-notification service is only designed to subscribe to the
topics in the message broker and respond accordingly. Whatever service that
works with the Mojaloop/Payment Hub must create a topic and push payment
events into it as they happen. If no service directly works with Mojaloop
then we can look at other alternatives. But assuming that is the case. Then
the notification service can subscribe to the "mojaloop events" assuming
the payload which comes has all the details required to trigger a push
notification.

[Ed]: @Ebenezer Graham <ebenezergraha...@gmail.com> AFAIK the Payment Hub
will be generating the necessary request to pay notification - @Istvan
Molnar <istvan.mol...@dpc.hu> @Józsa Kristóf <kristof.jo...@dpc.hu> is this
correct?

Secondly, the APIs are not designed to trigger notifications but only to
interface with the Web App for configuration purposes eg: setting FCM
configuration details as Fineract CN is a multi-tenant application. Having
Endpoints to trigger notifications is not the intended design. Every action
that requires a notification must come from one of the services in Fineract
CN eg: customer, portfolio etc.  It will be tedious to implement something
outside this design pattern and I wouldn't recommend it.

[Ed]: So for this use case of a merchant-initiated payment and a request to
pay to a customer - the notification would be coming/going to the customer
and/or deposit microservice?

Suppose we must implement an API just to trigger the FCM we will need to
discuss this with other experienced Fineract CN committers to assess the
best way to do this. And even if we're to go ahead with an API endpoint
approach, the notification service can only implement the Firebase API
required to send a push notification but each request must come with the
needed details i.e device token, message, data and Tenant ID to know which
FCM configuration to use.

Once we have a topic in the message broker which sends payment payloads
from mojaloop we can implement the FCM. Please let me know if something
like this exists.

@Istvan Molnar <istvan.mol...@dpc.hu> @Józsa Kristóf <kristof.jo...@dpc.hu> can
you address this question from Ebenezer?

Please let me know if this help.


On Fri, 31 Jul 2020 at 19:40, Ed Cable <edca...@mifos.org> wrote:

> Ebenezer,
>
> Just sending via email the same message I sent on Linkedin. One of the
> important use cases Garvit is trying to complete for his GSOC project on
> Mifos Mobile CN is being able to consume and respond to a request to pay
> notification that would come from Mojaloop/Payment Hub EE via Fineract CN.
>
> Garvit created the issue on JIRA at
> https://issues.apache.org/jira/browse/FINCN-231. Do you have time to look
> into this? If you don't, are you able to provide some more detail on the
> work involved and I'll try to recruit another contributor to work on it.
>
> Thanks,
>
> Ed
>
> --
> *Ed Cable*
> President/CEO, Mifos Initiative
> edca...@mifos.org | Skype: edcable | Mobile: +1.484.477.8649
>
> *Collectively Creating a World of 3 Billion Maries | *http://mifos.org
> <http://facebook.com/mifos>  <http://www.twitter.com/mifos>
>
>

-- 

*Best Regards,*

*Ebenezer Graham*


<http://www.pactmart.com/>
GitHub <https://ebenezergraham.me> | LinkedIn
<https://www.linkedin.com/in/ebenezer-graham/> | Personal Website
<https://ebenezergraham.me>
skype:
ebenezer.graham
| Phone:
+233 27 64123425 <+233+27+64123425>


*“Talk is cheap, show me the Code” *- *Linus Torvalds*



-- 
*Ed Cable*
President/CEO, Mifos Initiative
edca...@mifos.org | Skype: edcable | Mobile: +1.484.477.8649

*Collectively Creating a World of 3 Billion Maries | *http://mifos.org
<http://facebook.com/mifos>  <http://www.twitter.com/mifos>

Reply via email to