Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update on ondc-crypto-utility node js #71

Open
wants to merge 294 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
294 commits
Select commit Hold shift + click to select a range
f10f9e2
Create auth_header_signing_and_verification.md
ShubhneetChawla1805 Jun 19, 2023
ebd0893
Merge pull request #32 from ShubhneetChawla1805/patch-1
92shreyansh Jun 19, 2023
bb77347
patch/fixes (#34)
sandeepshahi Jun 19, 2023
b070544
Update README.md
yashb042 Jun 27, 2023
025e6ce
patch/on_update/order/updated_at (#36)
sandeepshahi Jun 29, 2023
cf6541b
ONDC Registry Subscribe
khuzema786 Aug 24, 2023
cb70463
Log Verification utility for B2B and Logistics
Sep 18, 2023
e97e267
Updated Readme
Sep 18, 2023
5b20eb8
Updated Readme
Sep 18, 2023
0a68abf
Custom keyword - validate days
Sep 18, 2023
5941390
Modified return statement
Sep 19, 2023
48c9bb6
feat: ondc crypto sdk nodejs utility added (#31)
AbhijeetONDC Sep 21, 2023
7d44b6d
Fixing Padding issue
nitinmish Sep 23, 2023
25e7699
Merge pull request #40 from ONDC-Official/crypto
jainneerajnj Sep 23, 2023
8a7f4f3
Merge pull request #38 from khuzema786/main
92shreyansh Sep 24, 2023
d8dd896
Merge pull request #35 from yashb042/patch-1
92shreyansh Sep 24, 2023
539c6ee
feat(subscribe): added nodejs subscribe utility
sahilsharma9 Oct 9, 2023
a24b028
Merge pull request #41 from sharmasahil0331/node_subscribe_util
92shreyansh Oct 9, 2023
720a096
Deep Links
Oct 13, 2023
a08451a
Update readme.md
Sumitkumar0503 Oct 17, 2023
cd10136
Merge pull request #42 from Sumitkumar0503/patch-1
92shreyansh Oct 17, 2023
3e504cb
Android manifest
Oct 19, 2023
c952867
Updated log utility with Reverse geo coding & log server
Oct 25, 2023
526b96c
Merge pull request #44 from ONDC-Official/draft
tanya-ondc Oct 25, 2023
341f71f
Schema changes
Oct 31, 2023
d43c937
Updated node service readme.md
ssumitkv Nov 8, 2023
4f9690c
Merge pull request #45 from ssumitkv/patch-1
92shreyansh Nov 9, 2023
5db6442
Fix auth header string and optimise code
adityapatil123 Nov 11, 2023
a9e5502
Merge pull request #46 from ONDC-Official/fix/signing-and-verification
navdeep710 Nov 11, 2023
fe5ed71
Validations added
Dec 11, 2023
3cf103d
feat: node.js lookup service
sahilsharma9 Dec 19, 2023
344d58c
Merge pull request #49 from sharmasahil0331/main
92shreyansh Dec 19, 2023
2d536a1
Merge branch 'main' of https://github.com/ONDC-Official/reference-imp…
sahilsharma9 Dec 19, 2023
d7a7c1e
ref: added package.json and .gitignore
sahilsharma9 Dec 19, 2023
3c71da6
Merge pull request #50 from sharmasahil0331/main
92shreyansh Dec 19, 2023
724fe7f
minor bug fixes
abhinavv245 Dec 20, 2023
d162983
bug fixes
abhinavv245 Dec 20, 2023
890768e
feat: added vlookup signature method
Dec 20, 2023
b7b29c3
minor fixes
abhinavv245 Dec 20, 2023
4bb7f62
Update readme.md
nishthamongaondc Dec 27, 2023
36c1d32
Update readme.md
nishthamongaondc Dec 27, 2023
1fb6653
Update README.md
nishthamongaondc Dec 27, 2023
06f5213
Update cryptic_utils.py
nishthamongaondc Dec 27, 2023
261d138
Update readme.md
nishthamongaondc Dec 27, 2023
8d924ef
Update readme.md
nishthamongaondc Dec 27, 2023
bef41d8
Update readme.md
nishthamongaondc Dec 27, 2023
c6b3120
Update index.js
nishthamongaondc Dec 27, 2023
f6856eb
b2b and logistics fixes
abhinavv245 Dec 28, 2023
87fe16e
minor change
abhinavv245 Dec 28, 2023
3207c0c
updated
abhinavv245 Dec 28, 2023
07fd00c
Merge pull request #52 from nishthamongaondc/main
92shreyansh Dec 28, 2023
9269087
ref: Update index.js
nishthamongaondc Dec 29, 2023
7370364
Merge pull request #55 from nishthamongaondc/main
92shreyansh Dec 29, 2023
c6dd73b
feedback updated
abhinavv245 Dec 29, 2023
482fe86
Merge pull request #1 from abhinavv245/draft_log_utility
tanyamadaan Dec 29, 2023
96b1036
Merge pull request #2 from tanyamadaan/draft_log_utility
tanya-ondc Dec 29, 2023
c288590
minor bug fixes
abhinavv245 Dec 20, 2023
57a5cbf
bug fixes
abhinavv245 Dec 20, 2023
20a19a8
minor fixes
abhinavv245 Dec 20, 2023
57471e1
b2b and logistics fixes
abhinavv245 Dec 28, 2023
c6a5e11
minor change
abhinavv245 Dec 28, 2023
5101927
updated
abhinavv245 Dec 28, 2023
e44332f
feedback updated
abhinavv245 Dec 29, 2023
3f3a0ef
fixed bugs and exceptions
abhinavv245 Jan 4, 2024
6385d9e
fix: python util
pratikmazumdar Jan 11, 2024
c83bd58
feat: node.js lookup service
sahilsharma9 Dec 19, 2023
834f831
ref: added package.json and .gitignore
sahilsharma9 Dec 19, 2023
e3c979d
Update readme.md
nishthamongaondc Dec 27, 2023
b3cbbc5
Update readme.md
nishthamongaondc Dec 27, 2023
d0cf079
Update README.md
nishthamongaondc Dec 27, 2023
460012a
Update cryptic_utils.py
nishthamongaondc Dec 27, 2023
22172ce
Update readme.md
nishthamongaondc Dec 27, 2023
5bf2ada
Update readme.md
nishthamongaondc Dec 27, 2023
9ed419f
Update readme.md
nishthamongaondc Dec 27, 2023
f4911ef
Update index.js
nishthamongaondc Dec 27, 2023
06cbfeb
ref: Update index.js
nishthamongaondc Dec 29, 2023
b541d7f
QR code update
Jan 12, 2024
73429c2
Update readme.md
nishthamongaondc Dec 27, 2023
744b663
QR code update
Jan 12, 2024
9258340
Update readme.md
nishthamongaondc Dec 27, 2023
90b0f6c
Update readme.md
nishthamongaondc Dec 27, 2023
4b23c15
readme updated
Jan 12, 2024
fb978f3
readme updated
Jan 12, 2024
e123506
readme updated
Jan 12, 2024
f45f51d
feat: signing keys generation using node-js
sahilsharma9 Jan 14, 2024
afb4235
updated b2b schema
abhinavv245 Jan 15, 2024
059221d
Merge pull request #56 from pratikmazumdar/main
92shreyansh Jan 15, 2024
6eadb8a
added b2b validations
abhinavv245 Jan 17, 2024
4aa0f67
bug fix
abhinavv245 Jan 18, 2024
bd3441f
added b2b val
abhinavv245 Jan 22, 2024
9918bd5
updated
abhinavv245 Jan 22, 2024
95b72a2
added b2b checks
abhinavv245 Jan 23, 2024
bc5c327
minor fix
abhinavv245 Jan 23, 2024
ae45864
Merge pull request #4 from abhinavv245/draft_log_utility
tanyamadaan Jan 24, 2024
95d81ac
Merge pull request #5 from tanyamadaan/draft_log_utility
tanyamadaan Jan 24, 2024
3792c8f
Update readme.md
nishthamongaondc Dec 27, 2023
f1c0623
Update readme.md
nishthamongaondc Dec 27, 2023
6102b45
Update readme.md
nishthamongaondc Dec 27, 2023
ca95725
readme updated
Jan 12, 2024
b0fb46f
readme updated
Jan 12, 2024
8b76897
readme updated
Jan 12, 2024
4c8b76e
fixed bugs and exceptions
abhinavv245 Jan 4, 2024
aff95d4
updated b2b schema
abhinavv245 Jan 15, 2024
0c7c6db
added b2b validations
abhinavv245 Jan 17, 2024
a61e2b7
bug fix
abhinavv245 Jan 18, 2024
d51a2a3
added b2b val
abhinavv245 Jan 22, 2024
b3afafc
updated
abhinavv245 Jan 22, 2024
1a2b7e2
added b2b checks
abhinavv245 Jan 23, 2024
4983e14
minor fix
abhinavv245 Jan 23, 2024
93fcc01
minor bug fixes
abhinavv245 Jan 29, 2024
6565a94
few checks added
abhinavv245 Jan 30, 2024
1c2948c
feat: added 1:1 implementation of PHP signing and verification utility
Feb 2, 2024
988fc65
fix: added .gitignore
Feb 2, 2024
4b558f4
fix: removed vendor
Feb 2, 2024
3146cff
feat: added 1:1 utility for signing and verification in PHP
Feb 2, 2024
9966b0d
updated cancellation terms
abhinavv245 Feb 5, 2024
a7a7326
Merge branch 'draft_log_utility'
abhinavv245 Feb 5, 2024
556566e
Merge branch 'main' of https://github.com/abhinavv245/patch-reference…
abhinavv245 Feb 5, 2024
2d7911c
minor change
abhinavv245 Feb 6, 2024
76b271a
bug fixes
abhinavv245 Feb 6, 2024
2fad383
Merge pull request #59 from CharanpreetChawla/feature/signverPHP
92shreyansh Feb 6, 2024
aacf4b9
few additions
abhinavv245 Feb 6, 2024
c795fd8
Merge pull request #7 from abhinavv245/main
tanyamadaan Feb 7, 2024
4b3317c
Update readme.md
nishthamongaondc Dec 27, 2023
4c2a7bb
Update readme.md
nishthamongaondc Dec 27, 2023
f13a556
Update readme.md
nishthamongaondc Dec 27, 2023
bb7d61d
minor bug fixes
abhinavv245 Jan 29, 2024
f9f5deb
few checks added
abhinavv245 Jan 30, 2024
86001eb
updated cancellation terms
abhinavv245 Feb 5, 2024
5ff1958
minor change
abhinavv245 Feb 6, 2024
52f3196
bug fixes
abhinavv245 Feb 6, 2024
5560a45
few additions
abhinavv245 Feb 6, 2024
8103fd5
Update readme.md
nishthamongaondc Dec 27, 2023
26c7e9a
Update readme.md
nishthamongaondc Dec 27, 2023
db41506
Update readme.md
nishthamongaondc Dec 27, 2023
8a1ceed
Update readme.md
nishthamongaondc Dec 27, 2023
937a06e
Update readme.md
nishthamongaondc Dec 27, 2023
31f408d
added few vals
abhinavv245 Feb 8, 2024
9165eee
feat: added subscription utility in PHP
Feb 12, 2024
e3ec6c8
Update readme.md
nishthamongaondc Dec 27, 2023
7d52c9a
Update readme.md
nishthamongaondc Dec 27, 2023
ab6ea4a
Update readme.md
nishthamongaondc Dec 27, 2023
3d68eda
Update readme.md
nishthamongaondc Dec 27, 2023
ec1a109
Update readme.md
nishthamongaondc Dec 27, 2023
308df39
Update readme.md
nishthamongaondc Dec 27, 2023
211c7eb
Update readme.md
nishthamongaondc Dec 27, 2023
b1f5e26
Update readme.md
nishthamongaondc Dec 27, 2023
44508e8
Update readme.md
nishthamongaondc Dec 27, 2023
cb6502b
Update readme.md
nishthamongaondc Dec 27, 2023
7743767
Update readme.md
nishthamongaondc Dec 27, 2023
9a995eb
Update readme.md
nishthamongaondc Dec 27, 2023
1dc39ca
Update readme.md
nishthamongaondc Dec 27, 2023
f72ba45
Update readme.md
nishthamongaondc Dec 27, 2023
61433ce
Update readme.md
nishthamongaondc Dec 27, 2023
bea39e4
Update readme.md
nishthamongaondc Dec 27, 2023
fe4ab05
Merge pull request #57 from sahil-ondc/main
sandeepshahi Feb 13, 2024
19920a5
added cancel on_cancel schema val for b2b
abhinavv245 Feb 15, 2024
cc90b23
updated error messages
abhinavv245 Feb 16, 2024
fd4ac8f
Merge branch 'tanyamadaan:main' into main
abhinavv245 Feb 16, 2024
9b08b9a
fixed conflict
abhinavv245 Feb 16, 2024
db91c36
fixed conflicts
abhinavv245 Feb 16, 2024
7ab3759
on_cancel schema val added
abhinavv245 Feb 16, 2024
7419f79
Merge pull request #61 from abhinavv245/main
tanya-ondc Feb 16, 2024
2c794cb
minor bug fix
abhinavv245 Feb 19, 2024
621c33d
Merge pull request #51 from AbhijeetONDC/main
92shreyansh Feb 19, 2024
ef672b6
minor fixes
abhinavv245 Feb 20, 2024
e1dce97
Merge branch 'ONDC-Official:main' into main
abhinavv245 Feb 20, 2024
0a160eb
bug fix
abhinavv245 Feb 20, 2024
5cd1e12
updated linked order val in on_confirm for logistics
abhinavv245 Feb 20, 2024
bed7df7
Merge pull request #62 from abhinavv245/main
tanya-ondc Feb 20, 2024
3ff593c
feat: on_sub java util
pratik-mazumdar Feb 21, 2024
a269829
feat: on_sub java util
pratik-mazumdar Feb 21, 2024
9d2cbc0
feat: on_sub java util
pratik-mazumdar Feb 21, 2024
806f812
feat: on_sub java util
pratik-mazumdar Feb 21, 2024
86f0ba6
feat: on_sub java util
pratik-mazumdar Feb 21, 2024
22519a0
feat: on_sub java util
pratik-mazumdar Feb 21, 2024
a18e69b
feat: on_sub java util
pratik-mazumdar Feb 21, 2024
5822584
Create Readme.md
pratikmazumdar Feb 21, 2024
f4c6ef6
feat: on_sub java util
pratik-mazumdar Feb 22, 2024
9d88182
feat: on_sub java util
pratik-mazumdar Feb 22, 2024
d97a8bc
Merge pull request #63 from pratikmazumdar/main
92shreyansh Feb 26, 2024
516fe64
Merge pull request #60 from CharanpreetChawla/feature/on_subscribePHP
92shreyansh Feb 26, 2024
b2e8b33
fix: signing key generation using nodejs
poojapaul-ondc Feb 27, 2024
4a42015
added srv val
abhinavv245 Mar 5, 2024
836e8ec
deleted log report.md
abhinavv245 Mar 5, 2024
a55719e
updated validation
abhinavv245 Mar 5, 2024
7fa25f2
Merge pull request #64 from poojapaul-ondc/fix/KeyGeneration
92shreyansh Mar 11, 2024
3240ab2
added services validations
abhinavv245 Mar 13, 2024
e1a5224
added vals
abhinavv245 Mar 14, 2024
60a7b00
updated checks
abhinavv245 Mar 20, 2024
ed2d26b
Merge branch 'ONDC-Official:main' into main
abhinavv245 Mar 20, 2024
1df0475
removed services from main
abhinavv245 Mar 20, 2024
345c310
Merge branch 'main' of https://github.com/abhinavv245/reference-imple…
abhinavv245 Mar 20, 2024
eff0f6c
updated services schemas
abhinavv245 Mar 22, 2024
0089249
updated
abhinavv245 Mar 26, 2024
bbe246d
added vals
abhinavv245 Mar 27, 2024
ed325f2
updated
abhinavv245 Apr 1, 2024
6ad68a5
feat: java auth header
pratik-mazumdar Apr 1, 2024
58dc0cc
Update Readme.md for auth header
pratik-mazumdar Apr 1, 2024
fc97c0c
updated srv schema
abhinavv245 Apr 2, 2024
d1a6002
Merge pull request #65 from abhinavv245/main
tanya-ondc Apr 2, 2024
5d513c2
Merge pull request #67 from pratik-mazumdar/main
sandeepshahi Apr 2, 2024
e0cf612
feat: java verify header
pratik-mazumdar Apr 8, 2024
f3dd8cb
Update Readme.md
pratik-mazumdar Apr 8, 2024
2be5cc1
Merge pull request #68 from pratik-mazumdar/main
sandeepshahi Apr 9, 2024
a68eb98
QR code generation utility updated
Apr 13, 2024
d25a929
added val
abhinavv245 Apr 17, 2024
c540789
Merge branch 'main' of https://github.com/abhinavv245/reference-imple…
abhinavv245 Apr 17, 2024
158f999
updated srv schema
abhinavv245 Apr 23, 2024
dbebce6
added b2b validations
abhinavv245 Apr 24, 2024
de82d61
added b2b val
abhinavv245 Apr 24, 2024
44b6a3a
updated b2b vals
abhinavv245 Apr 24, 2024
d278c34
updated b2b schema and business vals
abhinavv245 Apr 25, 2024
180bfdf
updated
abhinavv245 Apr 25, 2024
f2bfd95
fixed bugs
abhinavv245 Apr 25, 2024
ffbf5e5
added logistics vals
abhinavv245 Apr 25, 2024
478377d
updated checks
abhinavv245 Apr 29, 2024
304b23e
added b2b vals
abhinavv245 May 1, 2024
28f2b2c
updated schema
abhinavv245 May 2, 2024
85ad29b
updated checks
abhinavv245 May 3, 2024
48b94da
updated
abhinavv245 May 3, 2024
c62cd9b
minor updates to logistics
abhinavv245 May 6, 2024
518b75f
added validations
abhinavv245 May 7, 2024
91bc297
added checks
abhinavv245 May 8, 2024
ad6b6aa
Merge pull request #69 from abhinavv245/main
tanya-ondc May 8, 2024
8d564f6
fix: crypto package
May 9, 2024
468f45b
fix: npm crypto package
May 16, 2024
b28cad8
fix: issue in header.
NishthaMonga May 21, 2024
86e58cf
Merge pull request #73 from NishthaMonga/main
92shreyansh May 21, 2024
d530625
fix: Node js crypto utilities and added IGM utility
May 23, 2024
89e6401
Merge branch 'ONDC-Official:main' into main
robinchauhan5000 May 23, 2024
21acc66
chore: removed dsstore file
May 23, 2024
88efb78
Merge pull request #72 from robinchauhan5000/main
sandeepshahi May 24, 2024
0399412
fix : signature mismatch between python and other utilities due to di…
mofahsan May 30, 2024
cea0ad6
Fix: Utility fixes in functions , missing composer and env file
Jun 19, 2024
f47f912
fix: env changed and error handling
NishthaMonga Jun 20, 2024
d6585ca
chore: env and readme.md changed and error handling
NishthaMonga Jun 20, 2024
03a3a75
Merge pull request #78 from NishthaMonga/main
92shreyansh Jun 21, 2024
4f5a7ea
Merge pull request #75 from mofahsan/main
92shreyansh Jun 21, 2024
a37f56c
added vlookup and signuature endpoint
Jun 25, 2024
415d0d7
updated readme
Jun 26, 2024
100a3dd
removed comments
Jun 26, 2024
7aa64ce
Merge pull request #79 from amitsinha07/main
sandeepshahi Jun 28, 2024
51d21f8
Vlookup in Python
shivang1131 Jul 4, 2024
a9eed84
Readme change
shivang1131 Jul 4, 2024
c0c5f88
Merge pull request #80 from shivang1131/main
sandeepshahi Jul 4, 2024
0e8e987
Chore: Added package.json file
NishthaMonga Jul 17, 2024
9787b66
Merge pull request #83 from NishthaMonga/main
92shreyansh Jul 17, 2024
6aa190f
skd update
extedcouD Jul 24, 2024
8020e18
merge
extedcouD Jul 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[submodule "protocol-layer/python-based-protocol-layer"]
path = protocol-layer/python-based-buyer-app-side-protocol-layer
url = https://github.com/Open-network-for-digital-commerce/py-protocol-layer.git
[submodule "protocol-layer/kotlin-based-buyer-app-side-protocol-layer"]
path = protocol-layer/kotlin-based-buyer-app-side-protocol-layer
url = https://github.com/beckn/biab-bap-protocol.git
[submodule "server-side-clients/node-js-based-buyer-app-client"]
path = server-side-clients/node-js-based-buyer-app-client
url = https://github.com/Open-network-for-digital-commerce/biap-client-node-js.git
[submodule "server-side-clients/kotlin-based-buyer-app-client"]
path = server-side-clients/kotlin-based-buyer-app-client
url = https://github.com/beckn/biab-bap-client.git
[submodule "frontend-ui/frontend-react-js-based-buyer-app"]
path = frontend-ui/frontend-react-js-based-buyer-app
url = https://github.com/Open-network-for-digital-commerce/biap-app-ui-front.git
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 ONDC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,3 @@ c. Reference buyer app
## SwaggerHub links

`https://app.swaggerhub.com/organizations/ONDC`


1 change: 1 addition & 0 deletions frontend-ui/frontend-react-js-based-buyer-app
1 change: 1 addition & 0 deletions server-side-clients/kotlin-based-buyer-app-client
1 change: 1 addition & 0 deletions server-side-clients/node-js-based-buyer-app-client
Binary file added utilities/.DS_Store
Binary file not shown.
37 changes: 37 additions & 0 deletions utilities/deep-links/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Beckn_application"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.Beckn_application">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<!-- Separate intent filter for the deep link -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="beckn"
android:host="ondc" />
</intent-filter>
</activity>
</application>

</manifest>
1 change: 1 addition & 0 deletions utilities/deep-links/qr_code_generator/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .core import generate_deep_link, generate_qr_code, bulk_read
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions utilities/deep-links/qr_code_generator/constants/mapping.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
KEY_MAPPING = {
"bpp_id": "context.bpp_id",
"domain": "context.domain",
"provider_id": "message.intent.provider.id"
}
BASE_URL = "beckn://ondc"

DEFAULT_PARAMS = {
"context.action": "search"
}
86 changes: 86 additions & 0 deletions utilities/deep-links/qr_code_generator/core.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import qrcode
from PIL import Image
import os
import csv
from qr_code_generator.constants import mapping




def bulk_read(data_file, qr_data={}, qr_list = []):
with open(data_file, mode ='r', encoding='utf-8-sig') as file:
csvFile = csv.DictReader(file)
for row in csvFile:
data = dict(row)
for key, value in data.items():
k = mapping.KEY_MAPPING[key]
qr_data[k] = value
qr_list.append(qr_data)
return qr_list

# Generate deep link
def generate_deep_link(deep_link):
params = mapping.DEFAULT_PARAMS.copy()
params.update(deep_link)
query_string = '&'.join([f"{k}={v}" for k, v in params.items()])
# fallback_url = "https://google.com"
print(f"{mapping.BASE_URL}?{query_string}")
return f"{mapping.BASE_URL}?{query_string}"

# Generate QR code with deep link embedded

def generate_qr_code(deep_link, output):
"""
Generate a QR code from a given deep link.

Parameters:
- deep_link (str): The deep link to encode in the QR code.
- file_name (str): The name of the file to save the QR code image. Default is "qr_code.png".

Returns:
- None
"""
try:
# load ONDC logo
logo_path = os.path.join(os.path.dirname(__file__), "assets/ondc-network-vertical.png")

# Create QR code with deep link embedded
qr = qrcode.QRCode(
# version=1,
error_correction=qrcode.constants.ERROR_CORRECT_H,
box_size=8,
border=4,
)
qr.add_data(deep_link)
qr.make(fit=True)

img = qr.make_image(fill_color="black", back_color="white")
qr_img = img.convert("RGBA")

# # Load the logo image
logo = Image.open(logo_path)
logo = logo.convert("RGBA")

# taking base width
basewidth = 150

# adjust image size
wpercent = (basewidth/float(logo.size[0]))
hsize = int((float(logo.size[1])*float(wpercent)))
logo = logo.resize((basewidth, hsize), Image.LANCZOS)

# # Calculate the position to center the logo on the QR code
logo_position = ((qr_img.size[0] - logo.size[0]) // 2, (qr_img.size[1] - logo.size[1]) // 2)

# # Paste the logo onto the QR code
qr_img.paste(logo, logo_position, logo)


qr_img.save(output)

except FileNotFoundError:
print(f"Logo file not found at: {logo_path}")
raise
except Exception as e:
print(f"Exception at: {e}")
raise
37 changes: 37 additions & 0 deletions utilities/deep-links/qr_generate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import argparse
import json
import os
from qr_code_generator import generate_deep_link, generate_qr_code, bulk_read

def generate_qr(query_string):
deep_link = generate_deep_link(query_string)
output_path = f"./qr_code_generator/output/{(query_string['context.bpp_id']).split('/')[0]}"
if not os.path.isdir(output_path):
os.makedirs(output_path, exist_ok=True)
output_path = f"{output_path}/{query_string['message.intent.provider.id']}.png"

generate_qr_code(deep_link, output_path)
return True

try:
parser = argparse.ArgumentParser()
parser.add_argument('--data', type=str, help='JSON data')
parser.add_argument('--file', type=str, help='CSV file')

args = parser.parse_args()

if args.data:
query_string = json.loads(args.data)
generate_qr(query_string)
elif args.file:
for query_string in bulk_read(args.file):
generate_qr(query_string)
else:
parser.print_help()

except json.JSONDecodeError:
print("Error: Invalid JSON input.")
raise
except Exception as e:
print(f"An unexpected error occurred: {e}")
raise
65 changes: 65 additions & 0 deletions utilities/deep-links/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Beckn Enabled Deep Links

To facilitate seamless and standardized user interactions across digital ecosystems on ONDC, it is crucial to create a universally recognized and standardized "beckn" URI scheme, similar to what Unified Payments Interface (UPI), and WhatsApp, has achieved for major platforms like Web, Android and iOS, thus enhancing deep linking capabilities for entities using the Beckn protocol. Furthermore, the scheme should have easy integration and accessibility through software languages like Java, Python, among others.

As the first use case, ONDC proposes to enable QR code (with deep link embedded) features for merchants facilitated by their respective BPPs (Seller Apps in this context).

Please refer to the detailed [concept note](https://docs.google.com/document/d/17H8gpY1U2dRiZE6DccWYRh__BuVQ2kiMxEw5ZFJ7ULo/edit) on beckn enabled deep links, which details on the deep link schema and example use cases that could be enabled.

## Steps for generating QR code:

### Install dependencies:

```bash
pip3 install -r requirements.txt

```

**Usage - The utility can be used to generate singlw QR code or bulk QR codes.**

### Generate Single QR code:

Create query string for generating single QR code based on use case

##### Catalog Access through Seller-Generated QR Codes

```python
query_string = {
"context.bpp_id": "webapi.magicpin.in",
"message.intent.provider.id": "P1",
"context.domain": "nic2004:52110"
}
```

##### Category-Specific Browsing via Seller-Generated QR Codes

```python
query_string = {
"context.bpp_id": "sellerapp.com",
"message.intent.provider.id": "P1",
"context.domain": "RET10",
"message.intent.category.id": "Foodgrains"
}
```

##### And so on for the rest of the use cases...

**Run this utility**

**Pass the query_string data as a data argument**

```bash
python3 qr_generate.py --data '{"context.bpp_id": "sellerapp.com", "message.intent.provider.id": "P1", "context.domain": "RET10", "message.intent.category.id": "Foodgrains"}'
```

### Generate Bulk QR codes:

**Pass the csv file as a file argument**

```bash
python3 qr_generate.py --file data.csv
```

## Buyer App Platform Integration

Different platforms have different handling mechanisms, for example, Android uses Intent Filters and iOS uses URL schemes or Universal links to identify which apps can handle which URI schemes or use fallback URLs to redirect the consumer to a fallback web URL, usually prompting them to download the relevant app. If multiple apps have registered the same URI scheme, it will either redirect to the default app or prompt the user to select the app they would like to use. Please refer [detailed guide](https://docs.google.com/document/d/1pmwQvF9G37_KwcFViub7m_qYDUjbGLrwvgkv1XZEc08/edit?usp=sharing) on implementation.
2 changes: 2 additions & 0 deletions utilities/deep-links/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
qrcode==7.4.2
Pillow==9.4.0
76 changes: 76 additions & 0 deletions utilities/docs/allclasses-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Thu Oct 20 15:50:28 IST 2022 -->
<title>All Classes and Interfaces</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2022-10-20">
<meta name="description" content="class index">
<meta name="generator" content="javadoc/AllClassesIndexWriter">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
</head>
<body class="all-classes-index-page">
<script type="text/javascript">var pathtoroot = "./";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="org/ondc/crypto/util/package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li><a href="org/ondc/crypto/util/package-tree.html">Tree</a></li>
<li><a href="index-files/index-1.html">Index</a></li>
<li><a href="help-doc.html#all-classes">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<div class="header">
<h1 title="All Classes and Interfaces" class="title">All Classes and Interfaces</h1>
</div>
<div id="all-classes-table">
<div class="caption"><span>Classes</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="org/ondc/crypto/util/CryptoFunctions.html" title="class in org.ondc.crypto.util">CryptoFunctions</a></div>
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
<div class="block">The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption.</div>
</div>
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="org/ondc/crypto/util/CryptoKeyPair.html" title="class in org.ondc.crypto.util">CryptoKeyPair</a></div>
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
<div class="block">The Class CryptoKeyPair is used to store keypair</div>
</div>
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="org/ondc/crypto/util/CryptoTest.html" title="class in org.ondc.crypto.util">CryptoTest</a></div>
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
<div class="block">The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions</div>
</div>
</div>
</div>
</main>
</div>
</div>
</body>
</html>
Loading