See it live at: https://pineapplepay.moja-lab.live/#/dashboard
contrib-pisp-demo-ui was developed to demonstrate the ability of Mojaloop to make end to end transfers. It's a payment initiation app, which allows people to send money to one another. The basic features of the app are:
- Login/Authentication
- Account Linking
- Dashboard
- Third Party Initiated Transfers
For more information about Mojaloop and PISP with Mojaloop, see:
- See it live at: https://pineapplepay.moja-lab.live/#/dashboard
- View a video introduction here
Full documentation can be found here
- The linking sequence diagrams are here
This project is written in Dart, and uses Google's Cross-platform Flutter library.
- Clone this repository.
- Install the flutter sdk.
- Install Android Studio.
- Install flutter and dart plugin on android studio. Go to
File->Settings->Plugins
(Windows) orAndroid Studio -> Preferences->Plugins(Mac)
and install the flutter plugin. - Clone the repository and open the root directory from Android Studio
- Go to
Settings -> Flutter
(Windows)Android Studio -> Preferences -> Languages & Frameworks -> Flutter
(Mac) and add the path to flutter SDK if not already present. - Get your google-services.json from firebase. Follow the steps here This is necessary to build the app successfully.
- Connect device/ emulator and run the app.
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
- Make sure you enter the app's SHA-1 fingerprint under the Settings page of your Firebase console as this is required to ensure that Google sign-in functions properly. You can get the app's debug SHA-1 fingerprint by running this command:
keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
. - Connect device/ emulator and run the app.
- Make sure you have flutter web enabled. See this guide for steps
- Ensure that
flutter devices
outputs the following:
1 connected device:
Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.182
git clone git@github.com:mojaloop/pisp-demo-app-flutter.git
cd pisp-demo-app-flutter
flutter run -d chrome --web-port 42181
Note: We only deploy the web version of this project at the moment.
First, we need to set up firebase (only once)
# release to the firebase project
npm install -g firebase-tools
firebase login
firebase init
# select the following options:
# - existing project
# - mojapay-dev
# - build/web
# - rewrite - Yes
# - automatic builds - No
# - overwrite web/index.html - No
# Then, make sure we have the correct fido2_client
cd ..
git clone https://github.com/mojaloop/fido2-client-plugin fido2_client
cd pisp_demo_app_flutter
flutter build web
firebase deploy
Now go to https://mojapay-dev.web.app to see it live!
To generate the files that handle JSON encoding/decoding for model objects (e.g. consent.g.dart), run flutter pub run build_runner build
in the project directory.
# upgrade dependencies
flutter pub upgrade
# rebuild generated files
flutter pub run build_runner build --delete-conflicting-outputs
# specify a flutter version to use
flutter version v1.9.1+hotfix.3
deriving challenge from consent: {id: clLx3Jpm0fr8BRW96BSq, consentId: 9886a031-4386-4f92-9344-56f88275e1b5, party: {partyIdInfo: {partyIdType: OPAQUE, partyIdentifier: asd, fspId:
applebank}}, status: CONSENT_GRANTED, userId: VQLEyvz9zYVucLbjJMErpwSFCVD2, consentRequestId: c51ec534-ee48-4575-b6a9-ead2955b8069, accounts: [{id: 5cb34058-401a-4454-be61-e1152455616d,
currency: TZS}, {id: d2f1f253-ce12-4bf7-86da-e33d1dd5ecfa, currency: TZS}], authChannels: [OTP], authToken: 123, initiatorId: pispa, participantId: applebank, scopes: [{actions:
[accounts.getBalance, accounts.transfer], accountId: 6223a090-b87d-423b-85a5-1883272826fe}, {actions: [accounts.getBalance], accountId: fe6a6cfc-83bd-4805-b4d2-88e7e796712d}]}
calling window.navigator.credentials.get with options:
{"challenge":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":1,"14":2,"15":3},"allowCredentials":[{"id":{"0":227,"1":151,"2":62,"3":78,"4":71,"5":228,"
6":141,"7":10,"8":47,"9":65,"10":224,"11":22,"12":152,"13":236,"14":190,"15":68,"16":176,"17":71,"18":16,"19":159,"20":222,"21":226,"22":54,"23":51,"24":65,"25":136,"26":3,"27":241,"28":87,"
29":91,"30":145,"31":227,"32":224,"33":51,"34":151,"35":125,"36":240,"37":22,"38":128,"39":105,"40":214,"41":157,"42":53,"43":138,"44":228,"45":159,"46":24,"47":7,"48":210,"49":52,"50":4,"51
":56,"52":223,"53":51,"54":7,"55":39,"56":75,"57":130,"58":29,"59":68,"60":170,"61":128,"62":189,"63":12},"type":"public-key"}],"timeout":60000}
⚠️ main - Signed credential is: {id: 45c-TkfkjQovQeAWmOy-RLBHEJ_e4jYzQYgD8VdbkePgM5d98BaAadadNYrknxgH0jQEON8zBydLgh1EqoC9DA, rawId: [227, 151, 62, 78, 71, 228, 141, 10, 47, 65, 224, 22, 152,
236, 190, 68, 176, 71, 16, 159, 222, 226, 54, 51, 65, 136, 3, 241, 87, 91, 145, 227, 224, 51, 151, 125, 240, 22, 128, 105, 214, 157, 53, 138, 228, 159, 24, 7, 210, 52, 4, 56, 223, 51, 7, 39,
75, 130, 29, 68, 170, 128, 189, 12], response: {authenticatorData: [73, 150, 13, 229, 136, 14, 140, 104, 116, 52, 23, 15, 100, 118, 96, 91, 143, 228, 174, 185, 162, 134, 50, 199, 153, 92,
243, 186, 131, 29, 151, 99, 1, 0, 0, 0, 8], clientDataJSON: [123, 34, 116, 121, 112, 101, 34, 58, 34, 119, 101, 98, 97, 117, 116, 104, 110, 46, 103, 101, 116, 34, 44, 34, 99, 104, 97, 108,
108, 101, 110, 103, 101, 34, 58, 34, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 69, 67, 65, 119, 34, 44, 34, 111, 114, 105, 103, 105, 110, 34, 58, 34, 104, 116,
116, 112, 58, 47, 47, 108, 111, 99, 97, 108, 104, 111, 115, 116, 58, 52, 50, 49, 56, 49, 34, 44, 34, 99, 114, 111, 115, 115, 79, 114, 105, 103, 105, 110, 34, 58, 102, 97, 108, 115, 101, 44,
34, 111, 116, 104, 101, 114, 95, 107, 101, 121, 115, 95, 99, 97, 110, 95, 98, 101, 95, 97, 100, 100, 101, 100, 95, 104, 101, 114, 101, 34, 58, 34, 100, 111, 32, 110, 111, 116, 32, 99, 111,
109, 112, 97, 114, 101, 32, 99, 108, 105, 101, 110, 116, 68, 97, 116, 97, 74, 83, 79, 78, 32, 97, 103, 97, 105, 110, 115, 116, 32, 97, 32, 116, 101, 109, 112, 108, 97, 116, 101, 46, 32, 83,
101, 101, 32, 104, 116, 116, 112, 115, 58, 47, 47, 103, 111, 111, 46, 103, 108, 47, 121, 97, 98, 80, 101, 120, 34, 125], signature: [48, 69, 2, 32, 55, 9, 68, 27, 185, 104, 226, 201, 85, 207,
236, 63, 33, 2, 153, 136, 182, 223, 15, 49, 23, 126, 103, 221, 19, 97, 201, 67, 85, 193, 13, 167, 2, 33, 0, 248, 185, 221, 241, 208, 103, 211, 163, 138, 144, 72, 0, 171, 77, 1, 85, 185, 135,
243, 188, 155, 64, 119, 215, 149, 253, 88, 225, 18, 106, 193, 15], userHandle: []}}